[Bioperl-l] clone ID to Accession ID genbank

0 views
Skip to first unread message

Iris Buiton

unread,
Feb 4, 2010, 11:06:25 AM2/4/10
to biop...@bioperl.org
Hi members of Bioperl,

I am trying to run some code that given a clone ID (for instance,
CH255-149A8) get the accesion ID (AC238489.2).

The problem is that using this ID, it works perfectly, but using this
other ID (CH251-558O8) I do not get anything (not $seq object is
obtained). Checking to Genbank, this clone exist, there is seqeunce,
and the accession ID should be AC147515.1

This is the code:

my $name_file="CH251-558O8";

my $query = Bio::DB::Query::GenBank->new
(-query => $name_file,
-reldate => '30',
-db => 'nucleotide');
#eval 'my $seqio = $gb->get_Stream_by_query($query)';
print $query->count,"\n";


my $gb = Bio::DB::GenBank->new();

my $seqio = $gb->get_Stream_by_query($query);

print "Running $name_file.....\n";


while( my $seq = $seqio->next_seq ) {
if ($seq->accession_number)
{
print "$name_file = ", $seq->accession_number," = ", $seq-
>length,"\n" ;
}else
{
print "$name_file = #N/A \n" ;
}
}

Any ideas what am I doing wrong?

Thanks!

Iris
_______________________________________________
Bioperl-l mailing list
Biop...@lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Cook, Malcolm

unread,
Feb 4, 2010, 12:15:12 PM2/4/10
to Iris Buiton, biop...@bioperl.org
remove the -reldate

Malcolm Cook
Stowers Institute for Medical Research - Bioinformatics
Kansas City, Missouri USA

Irisb...@gmail.com

unread,
Feb 4, 2010, 12:26:57 PM2/4/10
to Cook, Malcolm, biop...@bioperl.org
Many thanks!

Such a stupid mistake...

IRis.

Reply all
Reply to author
Forward
0 new messages