lib/bio/data/na.rb in bio-0.7.1 vs lib/bio/data/na.rb in bio-1.0.0
- old
+ new
@@ -1,13 +1,13 @@
#
# = bio/data/na.rb - Nucleic Acids
#
# Copyright:: Copyright (C) 2001, 2005
# Toshiaki Katayama <k@bioruby.org>
-# License:: LGPL
+# License:: Ruby's
#
-# $Id: na.rb,v 0.19 2005/12/10 18:14:22 k Exp $
+# $Id: na.rb,v 0.20 2006/02/08 12:15:42 k Exp $
#
# == Synopsis
#
# Bio::NucleicAcid class contains data related to nucleic acids.
#
@@ -36,28 +36,10 @@
# p na.weight('atgc')
#
# puts "# Bio::NucleicAcid.weight('atgc')"
# p Bio::NucleicAcid.weight('atgc')
#
-#--
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#++
-#
module Bio
class NucleicAcid
@@ -174,10 +156,10 @@
def name(x)
NAMES[x.to_s.upcase]
end
def to_re(seq, rna = false)
- str = seq.to_s
+ str = seq.to_s.downcase
str.gsub!(/[^atgcu]/) { |base|
NAMES[base] || '.'
}
if rna
str.tr!("t", "u")