[BioRuby] Bio::Sequence forces a DNA sequence to lowercase?

Jan Aerts jan.aerts at bbsrc.ac.uk
Wed Jan 30 16:10:58 UTC 2008


> > I find that the example code given at http://dev.bioruby.org/wiki/en/?
> > Tutorial.rd immediately forces the input sequence to lowercase -
> >    require 'bio'
> >    seq = Bio::Sequence::NA.new("atgcATGcaaaa")
> >   "atgcatgcaaaa"
> > ...
> > Is there such a method, or another (simple) way to have upper and
> > lower case characters passed through DNA/RNA methods?
The very first thing that happens when you create a new sequence is a
downcase on it. That actually makes sense in the way that a
Bio::Sequence is just that: a sequence. The ATG in your example above
should be seen as a "feature" on the "sequence".
So the 'right' way to do it is to create a Bio::Sequence object as you
did above and then attach a Bio::Feature object to it describing the
start codon.

However, it's understandable that you'd like to keep the upper/lowercase
information after you've made the Bio::Sequence object. The person
who'll have to look into that will be Toshiaki. The change might just be
a bit more difficult than it looks at first sight.

jan.

-- 
Dr Jan Aerts
Bioinformatics Group
Roslin Institute
Roslin EH25 9PS
Scotland, UK
tel: +44 131 527 4198

----...and the obligatory disclaimer----
Roslin Institute is a company limited by guarantee, registered in
Scotland (registered number SC157100) and a Scottish Charity (registered
number SC023592). Our registered office is at Roslin, Midlothian, EH25
9PS. VAT registration number 847380013.

The information contained in this e-mail (including any attachments) is
confidential and is intended for the use of  the addressee only. The
opinions expressed within this e-mail (including any attachments) are
the opinions of the sender and do not necessarily constitute those of
Roslin Institute (Edinburgh) ("the Institute") unless specifically
stated by a sender who is duly authorised to do so on behalf of the
Institute.



More information about the BioRuby mailing list