sequence_logo 1.3.4 → 1.3.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aacbb291ed0f82d334fc8cffa3a0f0cb6114a529e2cdcfb485d496d81034045a
4
- data.tar.gz: 0b3f07113305a892f56980c0307a1191eb044bed1787925d47e5b4094041efc6
3
+ metadata.gz: c619eecefa46220873c431f87a9c8d20a9a8d8d26093c213df04c366d19c0434
4
+ data.tar.gz: a587739504949d122f6cf13691db350bf566bd9089c45b3c59035e6c78aa16e3
5
5
  SHA512:
6
- metadata.gz: 0c0983d52701e388a909f60ee296945cc0d0803c323531a06b31a23a59b03a443d4b15bdd3b13500b9ff700e78e78782ec530ee489104a5de1cc55b3156e6a38
7
- data.tar.gz: b2fd4c8d19b1fa5e982c00cfdf0cb10178ab98f1528a2ecf44af7f4ee048aaf006eb8df8e35c0fd5ff02ab2b4519b66a664f8a3f213f24c83cc072e1b16e4c7f
6
+ metadata.gz: a8b8cfe480444b5aa07e07577ba4911827fcb36ddbb18c1b6e55c27fb0ea2aad796ccdd6c7bf5df810389850b342ed539d5751dcad3fe6592b86b0a672e435c8
7
+ data.tar.gz: ff374cc30952e3c124b8ac8b2673e2f64ed1a15f4b31a37bc9eaae26e7ececaf330c7dac27b62b1780568675b6b89ee4def1636be27c382b1ca568a839510ba6
@@ -82,6 +82,8 @@ begin
82
82
  }
83
83
 
84
84
  parser.on('--dinucleotide'){ options[:from_dinucleotide] = true }
85
+
86
+ parser.on('--ppm-count N', 'Multiply PPM by N to get PCM'){|value| options[:ppm_count] = Float(value) }
85
87
  end
86
88
  options = cli.parse_options!(argv)
87
89
 
@@ -123,6 +125,14 @@ begin
123
125
  ppm = Bioinform::MotifModel::PCM.from_file(filename, validator: Bioinform::MotifModel::PCM::DIFFERENT_COUNTS_VALIDATOR)
124
126
  end
125
127
 
128
+ if options[:ppm_count]
129
+ new_matrix = ppm.matrix.map{|position|
130
+ sum = position.sum(0.0)
131
+ position.map{|el| el * options[:ppm_count] / sum}
132
+ }
133
+ ppm = Bioinform::MotifModel::PCM.new(new_matrix)
134
+ end
135
+
126
136
  logo = SequenceLogo::PPMLogo.new( ppm,
127
137
  icd_mode: options[:icd_mode],
128
138
  enable_threshold_lines: options[:threshold_lines])
@@ -1,3 +1,3 @@
1
1
  module SequenceLogo
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequence_logo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Vorontsov