[BioRuby] Bio::Sequence and Bio::Sequence::NA
Anthony Underwood
email2ants at gmail.com
Mon May 16 09:07:47 UTC 2011
Here's something that has alway puzzled me about BioRuby
If I start with a Bio::EMBL object and want to extract the features I can do the following
biosequence = embl_object.to_biosequence
This returns an instance of a Bio::Sequence class. I can now access the features
features = biosequence.features
However if the sequence is nucleotide and I want to translate it I have to do the following
biosequence.na
OR
biosequence = biosequence.auto
This returns a Bio::Sequence::NA instance and I can now translate
protein = biosequence.translate(1,11)
Why can I not now get at the features
biosequence.features #=> undefined method `features' for #<Bio::Sequence::NA:0x00000100cae5f8>
I would have though that after converting to Bio::Sequence::NA or Bio::Sequence:AA the methods available to Bio::Sequence should still be available.
Can anyone tell me what's going on here. Is there another method I should use?
Thanks
Anthony
More information about the BioRuby
mailing list