[BioRuby] Bio::Sequence forces a DNA sequence to lowercase?
agrobertson at telus.net
Mon Jan 14 04:02:24 UTC 2008
I'm new to BioRuby, so apologize for asking about something that's
very basic, and that likely was discussed and resolved in the distant
I'm parsing PWM scan 'hits' from a report. The hit sequences have the
form "accattAATTAt", where the uppercase letters mark the positions
corrsponding to the five most highly conserved bases in the PWM.
Given the output format of the PWM scanner, which I don't control, I
need to reverse-complement the (-)-strand hits. And I want to
preserve the uppercase characters, getting 'aTAATTaatggt' back.
I could write something to do this, but thought that this might be a
good time to simplify things by using BioRuby. However, when I load
BioRuby 1.2.1 into 'irb', and start to look at Bio::Sequence methods,
I find that the example code given at http://dev.bioruby.org/wiki/en/?
Tutorial.rd immediately forces the input sequence to lowercase -
seq = Bio::Sequence::NA.new("atgcATGcaaaa")
Inspecting the list of methods available (seq.methods.sort), I see
several standard case-control methods, but nothing that appears to
permit me to 'lock' or 'freeze' the cases of the input sequence
letters, in order that lowercase and uppercase letters are returned
Is there such a method, or another (simple) way to have upper and
lower case characters passed through DNA/RNA methods?
Canada's Michael Smith Genome Sciences Centre
Vancouver BC Canada
More information about the BioRuby