in reply to NCBI sequence fetching
#!usr/bin/perl use English '-no_match_vars'; use strict; use warnings; use Bio::Perl; my $database = 'genbank'; my $format = 'fasta'; my @accessions = ( "bunch", "of", "accession", "numbers"); for my $i ( 0 ... 2000 ) { my $entry_id = $accessions[$i]; eval { my $sequence = get_sequence($database, $entry_id); write_sequence( '>-', $format, $sequence ); }; if ( $EVAL_ERROR ) { # Log Error here if an error occured print {*STDERR} "Could not download sequence: [$entry_id]\n"; } # If you need to keep track of count my $count = $i + 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: NCBI sequence fetching
by capemaster (Initiate) on May 12, 2009 at 10:06 UTC | |
by binf-jw (Monk) on May 12, 2009 at 11:31 UTC | |
by capemaster (Initiate) on May 12, 2009 at 15:50 UTC |