[BioRuby] restriction enzyme module
Trevor Wennblom
trevor at corevx.com
Thu Apr 5 23:21:58 UTC 2007
On Apr 5, 2007, at 9:55 AM, Toshiaki Katayama wrote:
>
> I'll forward the patch I sent to you.
> Do you think this is applicable?
Looks good to me, patch applied. Now how about taking care of AA:
def to_re(seq)
str = seq.to_s.upcase
str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".")
str.gsub!("B", "[DN]")
str.gsub!("Z", "[EQ]")
Regexp.new(str)
end
What if we changed it to:
def to_re(seq)
str = seq.to_s.upcase
str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".")
str.gsub!("B", "[BDN]")
str.gsub!("Z", "[ZEQ]")
str.gsub!("J", "[JIL]")
Regexp.new(str)
end
Note i've added Xle to the list.
Trevor
More information about the BioRuby
mailing list