Class: Bioinform::PCM
- Inherits:
-
PM
show all
- Defined in:
- lib/bioinform/data_models/pcm.rb
Instance Attribute Summary
Attributes inherited from PM
#matrix, #parameters
Instance Method Summary
collapse
Methods inherited from PM
#==, #as_pcm, #as_ppm, #as_pwm, choose_parser, #discrete, #discrete!, #dup, #each_position, #initialize, #left_augment, #left_augment!, #length, #pretty_string, #probability, #reverse_complement, #reverse_complement!, #right_augment, #right_augment!, split_on_motifs, #to_hash, #to_s, #valid?, valid_matrix?, #vocabulary_volume, zero_column
Methods included from Parameters
#get_parameters, included, #parameter_defined?, #parameters, #set_parameters
Constructor Details
This class inherits a constructor from Bioinform::PM
Instance Method Details
8
9
10
|
# File 'lib/bioinform/data_models/pcm.rb', line 8
def count
matrix.first.inject(&:+)
end
|
12
13
14
|
# File 'lib/bioinform/data_models/pcm.rb', line 12
def to_pcm
self
end
|
#to_pwm(pseudocount = Math.log(count)) ⇒ Object