macroape 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/Rakefile +28 -7
  2. data/lib/macroape.rb +14 -26
  3. data/lib/macroape/aligned_pair_intersection.rb +24 -24
  4. data/lib/macroape/collection.rb +1 -2
  5. data/lib/macroape/count_by_threshold.rb +8 -26
  6. data/lib/macroape/exec/eval_alignment.rb +19 -19
  7. data/lib/macroape/exec/eval_similarity.rb +18 -16
  8. data/lib/macroape/exec/find_pvalue.rb +8 -6
  9. data/lib/macroape/exec/find_threshold.rb +7 -5
  10. data/lib/macroape/exec/preprocess_collection.rb +10 -7
  11. data/lib/macroape/exec/scan_collection.rb +13 -10
  12. data/lib/macroape/pwm_compare.rb +33 -2
  13. data/lib/macroape/pwm_compare_aligned.rb +38 -2
  14. data/lib/macroape/threshold_by_pvalue.rb +48 -43
  15. data/lib/macroape/version.rb +3 -3
  16. data/macroape.gemspec +2 -0
  17. data/test/data/test_collection.yaml +70 -4
  18. data/test/eval_alignment_similarity_test.rb +19 -0
  19. data/test/eval_similarity_test.rb +26 -0
  20. data/test/find_pvalue_test.rb +25 -0
  21. data/test/find_threshold_test.rb +29 -0
  22. data/test/preprocess_collection_test.rb +9 -0
  23. data/test/scan_collection_test.rb +17 -0
  24. data/test/test_helper.rb +10 -0
  25. metadata +33 -16
  26. data/lib/macroape/aligned_pair_metrics.rb +0 -24
  27. data/lib/macroape/aligned_pair_transformations.rb +0 -23
  28. data/lib/macroape/extract_pwm.rb +0 -32
  29. data/lib/macroape/gauss_estimation.rb +0 -30
  30. data/lib/macroape/matrix_information.rb +0 -29
  31. data/lib/macroape/matrix_on_background.rb +0 -16
  32. data/lib/macroape/matrix_transformations.rb +0 -29
  33. data/lib/macroape/pair_metrics.rb +0 -9
  34. data/lib/macroape/pair_transformations.rb +0 -28
  35. data/lib/macroape/single_matrix.rb +0 -45
  36. data/lib/macroape/support.rb +0 -34
  37. data/test/macroape_test.rb +0 -125
@@ -20,7 +20,9 @@ Example:
20
20
  ruby find_threshold.rb motifs/KLF4.pat -p 0.001 0.0001 0.0005 -d 1000 -b 0.4 0.3 0.2 0.1
21
21
  }
22
22
 
23
+ $:.unshift File.join(File.dirname(__FILE__),'./../../')
23
24
  require 'macroape'
25
+ require 'bioinform'
24
26
 
25
27
  if ARGV.empty? or ARGV.include? '-h' or ARGV.include? '-help' or ARGV.include? '--help' or ARGV.include? '--h'
26
28
  STDERR.puts help_string
@@ -41,7 +43,7 @@ begin
41
43
  when '-b'
42
44
  background = ARGV.shift(4).map(&:to_f)
43
45
  when '-m'
44
- PWM::MaxHashSize = ARGV.shift.to_f
46
+ Macroape::MaxHashSizeSingle = ARGV.shift.to_f
45
47
  when '-p'
46
48
  loop do
47
49
  begin
@@ -57,16 +59,16 @@ begin
57
59
  end
58
60
  pvalues = default_pvalues if pvalues.empty?
59
61
 
60
- PWM::MaxHashSize = 1000000 unless defined? PWM::MaxHashSize
62
+ Macroape::MaxHashSizeSingle = 1000000 unless defined? Macroape::MaxHashSizeSingle
61
63
 
62
64
  if filename == '.stdin'
63
- pwm = PWM::SingleMatrix.load_from_stdin(STDIN)
65
+ ## TODO
64
66
  else
65
67
  raise "Error! File #{filename} doesn't exist" unless File.exist?(filename)
66
- pwm = PWM::SingleMatrix.load_pat(filename)
68
+ pwm = Bioinform::PWM.new( File.read(filename) )
67
69
  end
68
70
 
69
- pwm = pwm.with_background(background)
71
+ pwm.background(background)
70
72
 
71
73
  pwm.discrete(discretization).thresholds(*pvalues) do |pvalue, threshold, real_pvalue|
72
74
  puts "#{pvalue}\t#{threshold / discretization}\t#{real_pvalue}"
@@ -9,13 +9,16 @@ Options:
9
9
  [-o <output file>]
10
10
  [--silent] - don't show current progress information during scan (by default this information's written into stderr)
11
11
 
12
- The tool stores preprocessed PWM collection to the specified YAML-file.
12
+ The tool stores preprocessed Macroape collection to the specified YAML-file.
13
13
 
14
14
  Example:
15
15
  ruby preprocess_collection.rb ./motifs -p 0.001 0.0005 0.0001 -d 1 10 -b 0.2 0.3 0.2 0.3 -o collection.yaml
16
16
  }
17
17
 
18
+ $:.unshift File.join(File.dirname(__FILE__),'./../../')
18
19
  require 'macroape'
20
+ require 'bioinform'
21
+ require 'yaml'
19
22
 
20
23
  if ARGV.empty? or ARGV.include? '-h' or ARGV.include? '-help' or ARGV.include? '--help' or ARGV.include? '--h'
21
24
  STDERR.puts help_string
@@ -54,24 +57,24 @@ begin
54
57
  when '-o'
55
58
  output_file = ARGV.shift
56
59
  when '-m'
57
- PWM::MaxHashSize = ARGV.shift.to_f
60
+ Macroape::MaxHashSizeSingle = ARGV.shift.to_f
58
61
  when '-md'
59
- PWMCompare::MaxHashSize = ARGV.shift.to_f
62
+ Macroape::MaxHashSizeDouble = ARGV.shift.to_f
60
63
  when '--silent'
61
64
  silent = true
62
65
  end
63
66
  end
64
67
  pvalues = default_pvalues if pvalues.empty?
65
68
 
66
- PWM::MaxHashSize = 1000000 unless defined? PWM::MaxHashSize
67
- PWMCompare::MaxHashSize = 1000 unless defined? PWMCompare::MaxHashSize
69
+ Macroape::MaxHashSizeSingle = 1000000 unless defined? Macroape::MaxHashSizeSingle
70
+ Macroape::MaxHashSizeDouble = 1000 unless defined? Macroape::MaxHashSizeDouble
68
71
 
69
- collection = PWM::Collection.new(rough_discretization, precise_discretization, background, pvalues)
72
+ collection = Macroape::Collection.new(rough_discretization, precise_discretization, background, pvalues)
70
73
 
71
74
  current_dir = File.dirname(__FILE__)
72
75
  Dir.glob(File.join(folder,'*')) do |filename|
73
76
  STDERR.puts filename unless silent
74
- pwm = PWM::SingleMatrix.load_pat(filename)
77
+ pwm = Bioinform::PWM.new(File.read(filename))
75
78
  info = {rough: {}, precise: {}}
76
79
  output = `ruby "#{File.join current_dir,'find_threshold.rb'}" #{filename} -p #{pvalues.join(' ')} -b #{background.join(' ')} -d #{rough_discretization}`.split("\n")
77
80
  output.each do |line|
@@ -23,7 +23,10 @@ Example:
23
23
  cat motifs/KLF4.pat | ruby scan_collection.rb .stdin collection.yaml -p 0.005 --precise 0.03
24
24
  }
25
25
 
26
+ $:.unshift File.join(File.dirname(__FILE__),'./../../')
26
27
  require 'macroape'
28
+ require 'bioinform'
29
+ require 'yaml'
27
30
 
28
31
  if ARGV.empty? or ARGV.include? '-h' or ARGV.include? '-help' or ARGV.include? '--help' or ARGV.include? '--h'
29
32
  STDERR.puts help_string
@@ -52,9 +55,9 @@ begin
52
55
  when '-p'
53
56
  pvalue = ARGV.shift.to_f
54
57
  when '-m'
55
- PWM::MaxHashSize = ARGV.shift.to_f
58
+ Macroape::MaxHashSizeSingle = ARGV.shift.to_f
56
59
  when '-md'
57
- PWMCompare::MaxHashSize = ARGV.shift.to_f
60
+ Macroape::MaxHashSizeDouble = ARGV.shift.to_f
58
61
  when '-c'
59
62
  cutoff = ARGV.shift.to_f
60
63
  when '--all'
@@ -71,21 +74,21 @@ begin
71
74
  end
72
75
  end
73
76
  end
74
- PWM::MaxHashSize = 1000000 unless defined? PWM::MaxHashSize
75
- PWMCompare::MaxHashSize = 1000 unless defined? PWMCompare::MaxHashSize
77
+ Macroape::MaxHashSizeSingle = 1000000 unless defined? Macroape::MaxHashSizeSingle
78
+ Macroape::MaxHashSizeDouble = 1000 unless defined? Macroape::MaxHashSizeDouble
76
79
 
77
80
  raise "Thresholds for pvalue #{pvalue} aren't presented in collection (#{collection.pvalues.join(', ')}). Use one of listed pvalues or recalculate the collection with needed pvalue" unless collection.pvalues.include? pvalue
78
81
 
79
82
  if filename == '.stdin'
80
- query_pwm = PWM::SingleMatrix.load_from_stdin(STDIN)
83
+ # query_pwm = Macroape::SingleMatrix.load_from_stdin(STDIN)
81
84
  else
82
85
  raise "Error! File #{filename} doesn't exist" unless File.exist?(filename)
83
- query_pwm = PWM::SingleMatrix.load_pat(filename)
86
+ query_pwm = Bioinform::PWM.new(File.read(filename))
84
87
  end
85
88
 
86
89
 
87
- query_pwm_rough = query_pwm.with_background(background_query).discrete(collection.rough_discretization)
88
- query_pwm_precise = query_pwm.with_background(background_query).discrete(collection.precise_discretization)
90
+ query_pwm_rough = query_pwm.background(background_query).discrete(collection.rough_discretization)
91
+ query_pwm_precise = query_pwm.background(background_query).discrete(collection.precise_discretization)
89
92
 
90
93
  threshold = query_pwm_rough.threshold(pvalue)
91
94
  threshold_precise = query_pwm_precise.threshold(pvalue)
@@ -98,13 +101,13 @@ begin
98
101
  pwm = collection.pwms[name]
99
102
  pwm_info = collection.infos[name]
100
103
  STDERR.puts pwm.name unless silent
101
- cmp = PWMCompare::PWMCompare.new(query_pwm_rough, pwm.with_background(collection.background).discrete(collection.rough_discretization))
104
+ cmp = Macroape::PWMCompare.new(query_pwm_rough, pwm.background(collection.background).discrete(collection.rough_discretization))
102
105
  info = cmp.jaccard(threshold, pwm_info[:rough][pvalue] * collection.rough_discretization)
103
106
  name = pwm.name || "Unnamed #{unnamed_index += 1}"
104
107
  precision_file_mode[name] = :rough
105
108
 
106
109
  if precision_mode == :precise and info[:similarity] >= minimal_similarity
107
- cmp = PWMCompare::PWMCompare.new(query_pwm_precise, pwm.with_background(collection.background).discrete(collection.precise_discretization))
110
+ cmp = Macroape::PWMCompare.new(query_pwm_precise, pwm.background(collection.background).discrete(collection.precise_discretization))
108
111
  info = cmp.jaccard(threshold_precise, pwm_info[:precise][pvalue] * collection.precise_discretization)
109
112
  precision_file_mode[name] = :precise
110
113
  end
@@ -1,10 +1,41 @@
1
- module PWMCompare
1
+ module Macroape
2
2
  class PWMCompare
3
3
  attr_reader :first, :second
4
4
  def initialize(first, second)
5
5
  @first = first
6
6
  @second = second
7
7
  end
8
- include PairTransformations, PairMetrics
8
+
9
+ def jaccard(threshold_first, threshold_second)
10
+ self.map_each_align do |align, alignment_info|
11
+ align.jaccard(threshold_first, threshold_second).merge(alignment_info)
12
+ end.max_by {|alignment_info| alignment_info[:similarity]}
13
+ end
14
+
15
+
16
+ def each
17
+ second_rc = second.reverse_complement
18
+ (-second.length..first.length).to_a.product([:direct,:revcomp]) do |shift, orientation|
19
+ first_pwm_alignment = '.' * [-shift, 0].max + '>' * first.length
20
+ second_pwm_alignment = '.' * [shift, 0].max + (orientation == :direct ? '>' : '<') * second.length
21
+ overlap = [first.length + [-shift,0].max, second.length + [shift,0].max].min - shift.abs
22
+ alignment_length = [first_pwm_alignment.length, second_pwm_alignment.length].max
23
+ (first_pwm_alignment.length...alignment_length).each{|i| first_pwm_alignment[i] = '.'}
24
+ (second_pwm_alignment.length...alignment_length).each{|i| second_pwm_alignment[i] = '.'}
25
+
26
+ yield(PWMCompareAligned.new(first.left_augment([-shift,0].max),
27
+ (orientation == :direct ? second : second_rc).left_augment([shift,0].max)),
28
+ text: "#{first_pwm_alignment}\n#{second_pwm_alignment}",
29
+ shift: shift,
30
+ orientation: orientation,
31
+ overlap: overlap,
32
+ alignment_length: alignment_length
33
+ )
34
+ end
35
+ end
36
+ include Enumerable
37
+ alias :each_align :each
38
+ alias :map_each_align :map
39
+
9
40
  end
10
41
  end
@@ -1,4 +1,6 @@
1
- module PWMCompare
1
+ require 'macroape/aligned_pair_intersection'
2
+
3
+ module Macroape
2
4
  class PWMCompareAligned
3
5
  attr_reader :first, :second, :length
4
6
  def initialize(first, second)
@@ -7,7 +9,41 @@ module PWMCompare
7
9
  @second = second.right_augment(@length - second.length)
8
10
  end
9
11
 
10
- include AlignedPairTransformations, AlignedPairMetrics, AlignedPairIntersection
12
+ #def discrete(rate)
13
+ # PWMCompareAligned.new(first.discrete(rate), second.discrete(rate))
14
+ #end
15
+
16
+ def sort_pair_of_matrices_by(&block)
17
+ mat = first.pwm.zip(second.pwm).sort_by(&block).transpose
18
+ PWMCompareAligned.new(SinglePWM(mat[0],first.probabilities), SinglePWM(mat[1], second.probabilities))
19
+ end
20
+ def sort_decreasing_max
21
+ PWMCompareAligned.new(*sort_pair_of_matrices_by{|col_pair| -col_pair[0].max} )
22
+ end
23
+ def sort_increasing_min
24
+ PWMCompareAligned.new(*sort_pair_of_matrices_by{|col_pair| col_pair[0].min} )
25
+ end
26
+ def permute_columns(permutation_index)
27
+ PWMCompareAligned.new(first.permute(permutation_index), second.permute(permutation_index))
28
+ end
29
+
30
+ def jaccard(first_threshold, second_threshold)
31
+ f = first.counts_by_thresholds(first_threshold).first
32
+ s = second.counts_by_thresholds(second_threshold).first
33
+ if f == 0 or s == 0
34
+ return {similarity: -1, tanimoto: -1, recognized_by_both: 0,
35
+ recognized_by_first: f,
36
+ recognized_by_second: s,
37
+ }
38
+ end
39
+
40
+ intersect = counts_for_two_matrices(first_threshold, second_threshold)
41
+ intersect = Math.sqrt(intersect[0] * intersect[1])
42
+ union = f + s - intersect
43
+ similarity = intersect.to_f / union
44
+ { similarity: similarity, tanimoto: 1.0 - similarity, recognized_by_both: intersect,
45
+ recognized_by_first: f, recognized_by_second: s }
46
+ end
11
47
 
12
48
  end
13
49
  end
@@ -1,67 +1,72 @@
1
- module PWM
2
- module ThresholdByPvalue
1
+ module Bioinform
2
+ class PWM
3
3
  def threshold(pvalue)
4
4
  thresholds(pvalue){|_, thresh, _| return thresh }
5
5
  end
6
6
 
7
7
  def thresholds(*pvalues)
8
- thresholds_by_pvalues(*pvalues).each do |pvalue,(left_threshold, left_count, right_threshold, right_count)|
9
- threshold = left_threshold + 0.1
10
- real_pvalue = right_count.to_f / number_of_words
8
+ thresholds_by_pvalues(*pvalues).each do |pvalue,(thresholds, counts)|
9
+ threshold = thresholds.begin + 0.1 * (thresholds.end - thresholds.begin)
10
+ real_pvalue = counts.end.to_f / vocabulary_volume
11
11
  yield pvalue, threshold, real_pvalue
12
12
  end
13
13
  end
14
14
 
15
- # ret-value: hash {pvalue => [left_threshold, left_count, right_threshold, right_count]}
16
- def thresholds_by_pvalues(*pvalues)
17
- max_pvalue = pvalues.max
18
- max_look_for_count = max_pvalue * sum_of_probabilities ** length
19
- scores={}
20
- until scores.inject(0){|sum,(score,count)| sum + count} >= max_look_for_count
21
- scores = calculate_count_distribution_after_threshold(threshold_gauss_estimation(max_pvalue))
15
+ def count_distribution_under_pvalue(max_pvalue)
16
+ count_distribution={}
17
+ look_for_count = max_pvalue * vocabulary_volume
18
+ until count_distribution.inject(0.0){|sum,(score,count)| sum + count} >= look_for_count
19
+ count_distribution = count_distribution_after_threshold(threshold_gauss_estimation(max_pvalue))
22
20
  max_pvalue *=2 # if estimation counted too small amount of words - try to lower threshold estimation by doubling pvalue
23
21
  end
24
- pvalue_counts = pvalues.sort.inject(Hash.new){|h, pvalue| h.merge pvalue => pvalue * sum_of_probabilities**length }
25
- look_for_counts = pvalue_counts.to_a
26
- sum_count = 0
27
- scores = scores.sort.reverse
22
+
23
+ count_distribution
24
+ end
25
+
26
+
27
+ # ret-value: hash {pvalue => [thresholds, counts]}
28
+ # thresholds = left_threshold .. right_threshold (left_threshold < right_threshold)
29
+ # counts = left_count .. right_count (left_count > right_count)
30
+ def thresholds_by_pvalues(*pvalues)
31
+ count_distribution = count_distribution_under_pvalue(pvalues.max)
32
+ sorted_scores = count_distribution.sort.reverse
33
+ scores = sorted_scores.map{|score,count| score}
34
+ counts = sorted_scores.map{|score,count| count}
35
+ partial_sums = counts.partial_sums
36
+
28
37
  results = {}
29
- scores.size.times do |i|
30
- while !look_for_counts.empty? and sum_count + scores[i][1] > look_for_counts.first[1] # usually this 'while' works as 'if'
31
- cnt = look_for_counts.shift
32
- pval = cnt[0]
33
- score = cnt[1]
34
-
35
- threshold_2 = scores[i][0]
36
- sum_count_2 = sum_count + scores[i][1]
37
- if i>0
38
- threshold = scores[i-1][0]
39
- results[pval] = [threshold_2.to_f, sum_count_2, threshold.to_f, sum_count.to_f]
40
- else
41
- results[pval] = [threshold_2.to_f, sum_count_2.to_f, best_score + 1.0, 0.0]
42
- end
43
- end
44
- sum_count += scores[i][1]
38
+
39
+ pvalue_counts = pvalues.sort.collect_hash{|pvalue| [pvalue, pvalue * vocabulary_volume] }
40
+ pvalue_counts.map do |pvalue,look_for_count|
41
+ ind = partial_sums.index{|sum| sum >= look_for_count}
42
+ minscore, count_at_minscore = scores[ind], partial_sums[ind]
43
+ maxscore, count_at_maxscore = ind > 0 ? [ scores[ind-1], partial_sums[ind-1] ] : [ best_score + 1.0, 0.0 ]
44
+ results[pvalue] = [(minscore .. maxscore), (count_at_minscore .. count_at_maxscore)]
45
45
  end
46
+
46
47
  results
47
48
  end
48
49
 
49
- def calculate_count_distribution_after_threshold(threshold)
50
+ def count_distribution_after_threshold(threshold)
50
51
  scores = { 0 => 1 }
51
52
  length.times do |column|
52
- new_scores = Hash.new(0);
53
- scores.each do |score, count|
54
- 4.times do |letter|
55
- new_score = score + matrix[column][letter]
56
- if new_score + best_suffix[column + 1] >= threshold
57
- new_scores[new_score] += count * probabilities[letter]
58
- end
53
+ scores.replace recalc_score_hash(scores, @matrix[column], threshold - best_suffix[column + 1])
54
+ raise 'Hash overflow in PWM::ThresholdByPvalue#count_distribution_after_threshold' if defined? MaxHashSizeSingle and scores.size > MaxHashSizeSingle
55
+ end
56
+ scores
57
+ end
58
+
59
+ def recalc_score_hash(scores, column, least_sufficient)
60
+ new_scores = Hash.new(0)
61
+ scores.each do |score, count|
62
+ 4.times do |letter|
63
+ new_score = score + column[letter]
64
+ if new_score >= least_sufficient
65
+ new_scores[new_score] += count * @background[letter]
59
66
  end
60
67
  end
61
- raise 'Hash overflow in PWM::ThresholdByPvalue#calculate_count_distribution_after_threshold' if defined? MaxHashSize and new_scores.size > MaxHashSize
62
- scores = new_scores
63
68
  end
64
- scores
69
+ new_scores
65
70
  end
66
71
 
67
72
  end
@@ -1,3 +1,3 @@
1
- module Macroape
2
- VERSION = "3.2.2"
3
- end
1
+ module Macroape
2
+ VERSION = "3.3.0"
3
+ end
data/macroape.gemspec CHANGED
@@ -14,4 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "macroape"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Macroape::VERSION
17
+
18
+ gem.add_dependency('bioinform', '~> 0.1.0')
17
19
  end
@@ -1,4 +1,4 @@
1
- --- !ruby/object:PWM::Collection
1
+ --- !ruby/object:Macroape::Collection
2
2
  pvalues:
3
3
  - 0.0005
4
4
  - 0.0001
@@ -11,7 +11,27 @@ background:
11
11
  precise_discretization: 10
12
12
  rough_discretization: 1
13
13
  pwms:
14
- GABPA_f1: !ruby/object:PWM::SingleMatrix
14
+ GABPA_f1: !ruby/object:Bioinform::PWM
15
+ background:
16
+ - 1
17
+ - 1
18
+ - 1
19
+ - 1
20
+ input: ! "GABPA_f1\n-0.1106670158341858 0.013801606113892391 0.6054596108973699
21
+ -1.3518085041421573 \n0.37030668921643345 0.15761121480429963 0.009069314183831202
22
+ -0.9888619717703562 \n0.47526546359546684 -0.3011678534572083 0.4031522994412777
23
+ -1.8638752827041059 \n-1.5544255540164373 1.1082369687811506 -0.2814091552834454
24
+ -5.30708531823271 \n-0.6362037835776368 1.235338189985594 -3.5801322928552253
25
+ -5.717323067092849 \n-5.852906870733575 -5.852906870733575 1.3841383838057746
26
+ -5.852906870733575 \n-5.852906870733575 -5.852906870733575 1.3841383838057746
27
+ -5.852906870733575 \n1.3835219739184708 -5.2341956006430985 -5.852906870733575
28
+ -5.852906870733575 \n1.3756340514956562 -5.394962755562375 -5.394962755562375
29
+ -3.401117964959733 \n-1.2176198315414444 -3.109079898175411 1.2964067931472216
30
+ -5.717323067092849 \n-1.3716559438167257 -0.2761401935045069 -1.8504445165866068
31
+ 1.0404320473626856 \n-0.5440863133031895 -0.48103682561971345 0.907381908447086
32
+ -1.1280642594012078 \n0.10557340209290218 -0.01814819455289191 0.4381106695354074
33
+ -1.0304105539540915 \n"
34
+ parser: !ruby/class 'Bioinform::StringParser'
15
35
  matrix:
16
36
  - - -0.1106670158341858
17
37
  - 0.013801606113892391
@@ -66,7 +86,24 @@ pwms:
66
86
  - 0.4381106695354074
67
87
  - -1.0304105539540915
68
88
  name: GABPA_f1
69
- KLF4_f2: !ruby/object:PWM::SingleMatrix
89
+ KLF4_f2: !ruby/object:Bioinform::PWM
90
+ background:
91
+ - 1
92
+ - 1
93
+ - 1
94
+ - 1
95
+ input: ! "KLF4_f2\n0.30861857265872605 -2.254321000121579 0.13505703522674192
96
+ 0.3285194224375633 \n-1.227018967707036 -4.814127713368663 1.3059890687390967
97
+ -4.908681463544344 \n-2.443469374521196 -4.648238485031404 1.3588686548279805
98
+ -4.441801801188402 \n-2.7177827948276123 -3.8073538975356565 1.356272809724262
99
+ -3.504104725510225 \n-0.5563232977367343 0.5340697765121405 -3.61417723090579
100
+ 0.5270259776377405 \n-1.8687622060887386 -4.381483976582316 1.337932245336098
101
+ -3.815629658877517 \n-2.045671123823928 -2.384975142213679 0.7198551207724355
102
+ 0.5449254135616948 \n-1.373157530374372 -3.0063112097748217 1.285188335493552
103
+ -2.5026044231773543 \n-2.1030513122772208 -1.8941348100402244 1.249265758393991
104
+ -1.4284210948906104 \n-1.3277128628152939 0.8982415633049462 -0.8080773665408135
105
+ -0.18161647647456935 \n"
106
+ parser: !ruby/class 'Bioinform::StringParser'
70
107
  matrix:
71
108
  - - 0.30861857265872605
72
109
  - -2.254321000121579
@@ -109,7 +146,36 @@ pwms:
109
146
  - -0.8080773665408135
110
147
  - -0.18161647647456935
111
148
  name: KLF4_f2
112
- SP1_f1: !ruby/object:PWM::SingleMatrix
149
+ SP1_f1: !ruby/object:Bioinform::PWM
150
+ background:
151
+ - 1
152
+ - 1
153
+ - 1
154
+ - 1
155
+ input: ! '> SP1_f1
156
+
157
+ -0.24435707885585334 -0.6748234046937317 0.8657012535789861 -1.1060188862599292
158
+
159
+ -1.0631255752097801 -2.1119259694238686 1.0960627561110399 -0.6138563775211981
160
+
161
+ -0.387227623476054 -2.973985191321805 1.1807800242010371 -4.338927525031567
162
+
163
+ -4.563896055436894 -2.916163300253228 1.3684371349982631 -5.077972423609655
164
+
165
+ -2.2369752892820087 -3.719643631330185 1.3510439136452728 -4.8899306705082335
166
+
167
+ -0.07473964149330914 0.9449196547620103 -2.624685764808605 -0.851098348782244
168
+
169
+ -1.9643526491643326 -2.9784027708801153 1.3113096718240569 -2.3243342594990253
170
+
171
+ -4.015548413965584 -3.138426807809667 1.338748858978805 -2.0846739035376483
172
+
173
+ -0.4450938582835542 -2.2510053061629707 1.126543157436868 -1.7780413702431377
174
+
175
+ -1.1896356092245055 -1.2251832285630033 1.163676006374752 -1.6080243648157357
176
+
177
+ -0.5166047365590577 0.7641033353626651 -0.28626775700282125 -0.6825482097865606'
178
+ parser: !ruby/class 'Bioinform::StringParser'
113
179
  matrix:
114
180
  - - -0.24435707885585334
115
181
  - -0.6748234046937317