[Bioperl-l] Sequence Version from Bio::Seq

Jason Stajich jason@cgt.mc.duke.edu
Fri, 14 Dec 2001 10:18:44 -0500 (EST)


To handle the extra information in EMBL/GenBank we've subclassed Seq and
made  Bio::Seq::RichSeq - the interface is defined in Bio::Seq::RichSeqI

You can get the seq version by calling
$seq->seq_version

Note: you may want to protect this code if you may be interchanging embl
data input with fasta input, somthing like the following will suffice.

if( $seq->can('seq_version') ) {
	# do something with seqversion
$seq->seq_version()
}

alternatively you can be more efficient about protecting if you will be
using a lot of the methods from a RichSeqI with the following

if( $seq->isa('Bio::Seq::RichSeqI') ) {
	print	$seq->seq_version, " ";
	print   join(',', $seq->get_secondary_accessions), "\n";
	print   $seq->keywords, "\n";

}

-jason
On Fri, 14 Dec 2001, simon andrews (BI) wrote:

> Hi there.
>
> I'm trying to get at the sequence version information from a Bio::Seq object
> read from an EMBL flat file with SeqIO.  I can get the accession number with
> $seq->accession_number, but I can't find an equivalent syntax for the
> sequence version.
>
> I'm assuming that the version is stored somewhere, because if I write the
> sequence back out in EMBL format it is still there.
>
> Can someone suggest how I can get at this information please.
>
> 	Many thanks
>
> 	Simon.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

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