This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get Fasta file with Protein Sequences given a file with Genbank Ids using Perl

The following code allows you to download a protein sequence from Genbank and the store it in a fasta file.

use Bio::DB::GenBank;
my $gb=new Bio::DB::GenBank;
my $seq= $gb->get_Seq_by_id ('ADE06225');

write_sequence (">roar.fa", 'fasta',$seq );

But what if i want to make Perl download all the sequences given a file with protein Ids and then store it to a fasta file?

ADE06225
KJU84168
CEJ19818
AEG68532
......
.....
perl database download sequences database bioperl

1 answer

Read the file with the ids into an array in perl.

Log in to answer this question.