Skip to content

Instantly share code, notes, and snippets.

Created April 2, 2011 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/899123 to your computer and use it in GitHub Desktop.
Save anonymous/899123 to your computer and use it in GitHub Desktop.
#! /usr/bin/perl
use strict;
use Bio::DB::Query::GenBank;
use Bio::DB::GenBank;
my $genBank = Bio::DB::GenBank->new(-strand => 1, -complexity => 1);
foreach my $arg (@ARGV) {
eval {
my $sequence = $genBank->get_Seq_by_gi($arg);
print "Sequence ", $sequence->id, "\n";
# Here comes the code for extracting CDS
# subsequence and writing it down in a file.
};
if($@) {
print STDERR "An unexpected error occured: ", $@, "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment