[Bioperl-l] Bio::DB::DBFetch question

Jason Stajich jason at cgt.duhs.duke.edu
Thu May 27 12:16:09 EDT 2004


Strike part of message about something being wrong.

Bio::DB::DBFetch is a superclass.  You do not use it directly as the
SYNOPSIS in fact says:

 # do not use this module directly.

Use  Bio::DB::EMBL as I showed in my script.

-jason
On Thu, 27 May 2004, Sean O'Keeffe wrote:

> Hi There,
> I'm trying to convert a list of genbank/est ids to fasta sequences. I
> want to use the Bio::DB::DBFetch module.
> Script I have written/plagiarised is as follows:
>
> #!/usr/bin/perl
>
> use lib "/usr/local/ensembl-20/bioperl-live";
> use Bio::DB::DBFetch;
> use Bio::SeqIO;
>
> open (IN, "est-id.txt") || die "can't open input file $! \n";     # get
> filehandle to file containing list of id's
>
> my $db = Bio::DB::DBFetch->new();    # make a new connection to DBFetch
>
> my $seqio = $db->get_Stream_by_id(<IN>);    # get stream obj using
> filehandle
>
> my $out = Bio::SeqIO->new(-file => ">est-id.fa", -format => 'Fasta');
> # specify output format
>
> while ( my $seq = $seqio->next_seq() ) {$out->write_seq($seq); }    # do
> the conversion
>
>
>
>
> Error to stdout is as follows:
>
> "Can't use string ("") as a HASH ref while "strict refs" in use at
> /usr/local/ensembl-20/bioperl-live/Bio/DB/DBFetch.pm line 286, <IN> line
> 4515188."
>
>
> I've used the filename, filehandle (as shown) as well as an array
> reference to the id list.
> A sample of the file list is below
>
> AA000575
> AA001887
> AA002222
> AA003931
> AA004784
> AA009419
> AA009723
> AA010084
> AA010160
> AA010193
> AA010220
> AA010230
> AA012989
> AA014259
> AA018136
> AA018184
> AA018858
> AA019868
> AA020505
> AA022701
> AA023333
>
> Can anyone open my eyes?
> Thanks,
> Sean.
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list