[Bioperl-l] clone ID to Accession ID genbank

Cook, Malcolm MEC at stowers.org
Thu Feb 4 17:15:12 UTC 2010


remove the -reldate

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

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org 
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Iris Buiton
> Sent: Thursday, February 04, 2010 10:06 AM
> To: bioperl-l at bioperl.org
> Subject: [Bioperl-l] clone ID to Accession ID genbank
> 
> 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
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 



More information about the Bioperl-l mailing list