Method: Bio::Sequence::NA#at_skew
- Defined in:
- lib/bio/sequence/na.rb
#at_skew ⇒ Object
Calculate the ratio of (A - T) / (A + T) bases. U is regarded as T.
s = Bio::Sequence::NA.new('atgttgttgttc')
puts s.at_skew #=> -0.75
- Returns
-
Float
347 348 349 350 351 352 353 |
# File 'lib/bio/sequence/na.rb', line 347 def at_skew count = self.composition a = count['a'] t = count['t'] + count['u'] return 0.0 if a + t == 0 return (a - t).quo(a + t) end |