I've got an array full of accession numbers, and I'm wondering if there's a way to automatically save genbank files using BioPerl. I know you can grab sequence information, but I want the entire GenBank record.
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::DB::GenBank;
my @accession;
open (REFINED, "./refine.txt") || die "Could not open: $!";
while(<REFINED>){
if(/^(\D+)\|(.*?)\|/){
push(@accession, $2);
}
}
close REFINED;
foreach my $number(@accession){
my $db_obj = Bio::DB::GenBank->new;
}
duplicate ot
How to retrieve GenBank records with range of accession numbers
Fetching genbank entries for list of accession numbers.
How can I programmatically retrieve the GenBank records with accession numbers in the form JN######?