sequence_logo 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sequence_logo/exec/glue_logos.rb +11 -8
- data/lib/sequence_logo/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a3490689a2063bc701ce8f9e50d270dfa22ba7f
|
4
|
+
data.tar.gz: 9ea7a0c46fdbeeb7d5a21ecd29b6959079ad19b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57241901c85514889fb98f22ac717a480e36f5ab5917217797532e6d647f9364f3353316bf632c30574411c666d55515d0ac12ca08f7f23bd713149a7ad99116
|
7
|
+
data.tar.gz: ca2a674b8f2fa4db523f09a7f468a57f499ff8ab0edeb8d532b20dfa3fd0234b3341925ff53c5509b5fecc1780b6bbfed74db9d57721f0328f149ebdb13206cb
|
@@ -6,13 +6,14 @@ def generate_glued_logo(alignment_infos, options, total_orientation, output_file
|
|
6
6
|
logos = {}
|
7
7
|
logo_filenames = []
|
8
8
|
rightmost_side = alignment_infos.map do |line|
|
9
|
-
filename, shift, orientation = line.strip.split("\t")
|
9
|
+
filename, shift, orientation, motif_name = line.strip.split("\t")
|
10
10
|
shift = shift.to_i
|
11
11
|
shift + get_ppm_from_file(filename).length
|
12
12
|
end.max
|
13
13
|
|
14
14
|
alignment_infos.each do |line|
|
15
|
-
filename, shift, orientation = line.strip.split("\t")
|
15
|
+
filename, shift, orientation, motif_name = line.strip.split("\t")
|
16
|
+
motif_name ||= CGI.unescape(File.basename(filename, File.extname(filename)))
|
16
17
|
ppm = get_ppm_from_file(filename)
|
17
18
|
shift = shift.to_i
|
18
19
|
raise 'Unknown orientation' unless %w[direct revcomp].include?(orientation.downcase)
|
@@ -29,9 +30,9 @@ def generate_glued_logo(alignment_infos, options, total_orientation, output_file
|
|
29
30
|
when 'revcomp'
|
30
31
|
SequenceLogo.draw_logo(ppm.revcomp, options).write(logo_filename)
|
31
32
|
else
|
32
|
-
raise "Unknown orientation #{orientation} for #{
|
33
|
+
raise "Unknown orientation #{orientation} for #{motif_name}"
|
33
34
|
end
|
34
|
-
logos[logo_filename] = {shift: shift, length: ppm.length, name:
|
35
|
+
logos[logo_filename] = {shift: shift, length: ppm.length, name: motif_name}
|
35
36
|
end
|
36
37
|
|
37
38
|
SequenceLogo.glue_files(logos, output_file, options)
|
@@ -45,10 +46,12 @@ begin
|
|
45
46
|
or
|
46
47
|
<alignment infos file> | glue_logos <output file>
|
47
48
|
|
48
|
-
Alignment infos has format
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
Alignment infos has the following format (tab separated)
|
50
|
+
if motif names not specified - filenames are used as labels:
|
51
|
+
pcm_file_1 shift_1 orientation_1 [motif_name_1]
|
52
|
+
pcm_file_2 shift_2 orientation_2 [motif_name_2]
|
53
|
+
pcm_file_3 shift_3 orientation_3 [motif_name_3]
|
54
|
+
|
52
55
|
EOS
|
53
56
|
|
54
57
|
argv = ARGV
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequence_logo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vorontsov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.13.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.13.1
|
27
27
|
description: |
|
@@ -35,7 +35,7 @@ executables:
|
|
35
35
|
extensions: []
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
|
-
- .gitignore
|
38
|
+
- ".gitignore"
|
39
39
|
- Gemfile
|
40
40
|
- LICENSE
|
41
41
|
- README.md
|
@@ -80,12 +80,12 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|