[Bioperl-l] extracting 'species' from ncbi records

Brian Osborne brian_osborne@cognia.com
Fri Jan 17 17:02:05 EST 2003


Chuck,

Right. So first you have to do:

$species_obj = $seq_obj->species;

Then you have to do:

next unless $species_obj->species =~ /reinhardtii/;

In the old days your code would have worked but the developers decided,
correctly, that one should be able to store all sorts of information about a
species besides the binomial so they created a separate object for species.

Is there some old-style documentation floating around somewhere that misled
you? Take a look at the Bio::Seq documentation, it describes the Seq object
and associated objects fairly well.


Brian O.

-----Original Message-----
From: bioperl-l-admin@bioperl.org [mailto:bioperl-l-admin@bioperl.org]On
Behalf Of Charles Hauser
Sent: Friday, January 17, 2003 11:28 AM
To: BioPerl-List
Subject: [Bioperl-l] extracting 'species' from ncbi records

All,

I am trying to parse species names from GenBank records.

the following code fails:

my $seqio = Bio::SeqIO->new('-format' => 'GenBank', -fh => \*FH);
while( my $seq = $seqio->next_seq ) {
        next unless $seq->species() =~/reinhardtii/;
        foreach my $feat ( $seq->top_SeqFeatures ) {
        ............



Do I need to call Bio::Species directly?

        my $species = Bio::Species->new();

Chuck




_______________________________________________
Bioperl-l mailing list
Bioperl-l@bioperl.org
http://bioperl.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list