Sha256: 4a75b6f978fc66154eb2173066d9ad5b85c5d18c8c62dd13abc9477a4a67a0fa

Contents?: true

Size: 566 Bytes

Versions: 4

Compression:

Stored size: 566 Bytes

Contents

require_relative '../support'
require_relative '../data_models'
require_relative '../conversion_algorithms/pcm2ppm_converter'
require_relative '../conversion_algorithms/pcm2pwm_converter'

module Bioinform
  class PCM < PM
    def count
      matrix.first.inject(&:+)
    end

    def to_pcm
      self
    end

    def to_pwm(pseudocount = Math.log(count))
      ConversionAlgorithms::PCM2PWMConverter.convert(self, pseudocount: pseudocount)
    end

    def to_ppm
      ConversionAlgorithms::PCM2PPMConverter.convert(self)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bioinform-0.1.12 lib/bioinform/data_models/pcm.rb
bioinform-0.1.11 lib/bioinform/data_models/pcm.rb
bioinform-0.1.10 lib/bioinform/data_models/pcm.rb
bioinform-0.1.9 lib/bioinform/data_models/pcm.rb