Perl script to convert GenBank records to FASTA format
The program reads a file with one or multiple genbank records and extract the senquences in FASTA format. The script can also retrieve some meta-data, such as voucher name and geographic location.
wget https://raw.githubusercontent.com/santiagosnchez/gb2fasta/master/gb2fasta.pl
git clone https://github.com/santiagosnchez/gb2fasta
cd gb2fasta
chmod +x gb2fasta.pl
sudo cp gb2fasta.pl /usr/local/bin
Use the -h
flag for more details:
perl gb2fasta.pl -h
Try:
perl gb2fasta.pl -gb <gb.file> -out <outfile.fasta> [options]
Options:
-geo will include only records with a geographic location
-oc will only include the country if the record has a geographic location
-nv will exclude the voucher label