[Bioperl-l] Bio::Annotations::Collection confusion
Kevin.M.Brown at asu.edu
Thu Apr 30 16:01:03 EDT 2009
That's nice in some regards, but makes it hard to use the function in
code without having to always process the result, which seems to be
counter to what one would expect.
E.g. Bio::Seq->seq returns the sequence, not "Seq: sequence".
Is there a better way to get the number directly without having to strip
off the text that never existed in the first place?
> -----Original Message-----
> From: Scott Markel [mailto:SMarkel at accelrys.com]
> Sent: Thursday, April 30, 2009 12:57 PM
> To: Kevin Brown; BioPerl List
> Subject: RE: Bio::Annotations::Collection confusion
> I believe the extra text was added for readability when printing
> to the console. In our code we just add the following post-
> processing step.
> (my $text = $annotation->as_text()) =~ s/(Comment|Value): //;
> Scott Markel, Ph.D.
> Principal Bioinformatics Architect email: smarkel at accelrys.com
> Accelrys (SciTegic R&D) mobile: +1 858 205 3653
> 10188 Telesis Court, Suite 100 voice: +1 858 799 5603
> San Diego, CA 92121 fax: +1 858 799 5222
> USA web: http://www.accelrys.com
> Vice President, Board of Directors:
> International Society for Computational Biology
> Co-chair: ISCB Publications Committee
> Associate Editor: PLoS Computational Biology
> Editorial Board: Briefings in Bioinformatics
> > -----Original Message-----
> > From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> > bounces at lists.open-bio.org] On Behalf Of Kevin Brown
> > Sent: Thursday, 30 April 2009 12:27 PM
> > To: BioPerl List
> > Subject: [Bioperl-l] Bio::Annotations::Collection confusion
> > So, I'm parsing Genbank sequences to pull out the various
> exons. I found
> > the way to get the NCBI Exon number from each feature, but
> am confused
> > about one of the methods. When I do annotation->as_text I'm
> expecting to
> > get back 1 from the feature, but instead get back Value: 1
> ??!? Why is
> > the value from the NCBI file getting that text tagged onto it?
> > http://www.ncbi.nlm.nih.gov/nuccore/73622129
> > exon 1..774
> > /gene="BOLA2"
> > /gene_synonym="BOLA2A; My016"
> > /inference="alignment:Splign"
> > /number=1
> > print ($f->annotation->get_Annotations('number'))->as_text;
> > Value: 1
> > _______________________________________________
> > 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