Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa my $fastaFile = shift; my $querySizeST = shift; my $quer...2529 days ago
Download the genome from NCBI using bash script/command
.../bash # Download the genome from NCBI using command # Create a Directory mkdir genome cd genome # Look for genome assembly summary and extract the URL # USER need to provi...2529 days ago
Download the gff files from NCBI using bash script/command
...# Download the genome from NCBI using command # Create a Directory mkdir genome_gff cd genome_gff # Look for genome assembly summary and extract the URL # USER need to provi...2520 days ago
Extract fasta sequence from a multifasta file with fasta header Ids
#!/usr/bin/perl use strict; use warnings; #Usage: perl my $list = shift @ARGV; my $fasta = shift @ARGV; my $out = shift @ARGV; my %select; open LIST,...2515 days ago
Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2465 days ago
Extract fasta sequence with Ids with Bash script
#!/bin/bash while IFS='' read -r line || [[ -n "$line" ]]; do echo "Text read from file: $line" samtools faidx ONT.fasta $line > $line.faa done < "$1"2351 days ago
Extract the values between to user defined string with Perl
...printout spacer for next record } __DATA__ XXXX YYYY START These are the first set of lines which are to be extracted END START New line And new Will be extracted? END XXX ZZZ YYY START...2289 days ago
Perl script to extract the uniq Ids
#!/usr/bin/perl -w use strict; use warnings; use List::Uniq ':all'; open(my $val, "2236 days ago
Perl script to find coding regions in DNA sequences
...nucleotides or codon my %pcodons; my ($codon,$freq); my $line; # for each line in the file (tableofcodons) do while ($line = ) { # extract the two values or columns wit...2152 days ago
Perl script to convert GFF 2 FASTA !
#!/usr/bin/perl use strict; use warnings; use Bio::Seq; use Bio::SeqIO; use Bio::DB::Fasta; $| = 1; # Flush output my $outfile_cds = Bio::SeqIO->new( -forma...2136 days ago