Module: Wrnap::Global::Extensions::InstanceMethods
- Defined in:
- lib/wrnap/global/rna/extensions.rb
Instance Method Summary collapse
Instance Method Details
#boltzmann_probability(dangle: 2) ⇒ Object
51 52 53 |
# File 'lib/wrnap/global/rna/extensions.rb', line 51 def boltzmann_probability(dangle: 2) Math.exp(-run(:eval, d: dangle).mfe / Wrnap::RT) / Math.exp(-run(:fold, d: dangle, p: 0).ensemble_energy / Wrnap::RT) end |
#dishuffle ⇒ Object
43 44 45 |
# File 'lib/wrnap/global/rna/extensions.rb', line 43 def dishuffle self.class.shuffle(sequence, 2) end |
#gc_content ⇒ Object
47 48 49 |
# File 'lib/wrnap/global/rna/extensions.rb', line 47 def gc_content seq.split(//).select { |i| i =~ /[GC]/i }.size.to_f / seq.size end |