sequence_logo 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,21 +1,21 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/sequence_logo/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Ilya Vorontsov"]
6
- gem.email = ["prijutme4ty@gmail.com"]
7
- gem.description = %q{SequenceLogo is a tool for drawing sequence logos of motifs. It gets Positional Count Matrices(PCMs) or IUPAC sequences as input and generates png-logos for a motif. Also one can create logo for reverse complement or even generate logos for a whole collection of motifs.
8
- Sequence logos are a graphical representation of an amino acid or nucleic acid multiple sequence alignment developed by Tom Schneider and Mike Stephens. Each logo consists of stacks of symbols, one stack for each position in the sequence. The overall height of the stack indicates the sequence conservation at that position, while the height of symbols within the stack indicates the relative frequency of each amino or nucleic acid at that position. In general, a sequence logo provides a richer and more precise description of, for example, a binding site, than would a consensus sequence (see http://weblogo.berkeley.edu/)
9
- }
10
- gem.summary = %q{Tool for drawing sequence logos of motifs}
11
- gem.homepage = ""
12
-
13
- gem.files = `git ls-files`.split($\)
14
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
- gem.name = "sequence_logo"
17
- gem.require_paths = ["lib"]
18
- gem.version = SequenceLogo::VERSION
19
-
20
- gem.add_dependency('rmagick', '~> 2.13.1')
21
- end
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/sequence_logo/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Ilya Vorontsov"]
6
+ gem.email = ["prijutme4ty@gmail.com"]
7
+ gem.description = %q{SequenceLogo is a tool for drawing sequence logos of motifs. It gets Positional Count Matrices(PCMs) or IUPAC sequences as input and generates png-logos for a motif. Also one can create logo for reverse complement or even generate logos for a whole collection of motifs.
8
+ Sequence logos are a graphical representation of an amino acid or nucleic acid multiple sequence alignment developed by Tom Schneider and Mike Stephens. Each logo consists of stacks of symbols, one stack for each position in the sequence. The overall height of the stack indicates the sequence conservation at that position, while the height of symbols within the stack indicates the relative frequency of each amino or nucleic acid at that position. In general, a sequence logo provides a richer and more precise description of, for example, a binding site, than would a consensus sequence (see http://weblogo.berkeley.edu/)
9
+ }
10
+ gem.summary = %q{Tool for drawing sequence logos of motifs}
11
+ gem.homepage = ""
12
+
13
+ gem.files = `git ls-files`.split($/)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.name = "sequence_logo"
17
+ gem.require_paths = ["lib"]
18
+ gem.version = SequenceLogo::VERSION
19
+
20
+ gem.add_dependency('rmagick', '~> 2.13.1')
21
+ end
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ AHR_si
2
+ 40.51343240527031 18.259112547756697 56.41253757072521 38.77363485291994
3
+ 10.877470982533044 11.870876719950774 34.66312982331297 96.54723985087516
4
+ 21.7165707818416 43.883079837598544 20.706746561638717 67.6523201955933
5
+ 2.5465132509466635 1.3171620263517245 145.8637051322628 4.231336967110781
6
+ 0.0 150.35847450464382 1.4927836298652875 2.1074592421627525
7
+ 3.441039751299748 0.7902972158110341 149.37613720253387 0.3512432070271259
8
+ 0.0 3.441039751299748 0.7024864140542533 149.81519121131782
9
+ 0.0 0.0 153.95871737667187 0.0
10
+ 43.07922333291745 66.87558226865211 16.159862546986584 27.844049228115868
@@ -0,0 +1,19 @@
1
+ AIRE_f2
2
+ 16.428571428571484 10.795918367346953 5.1632653061224625 8.918367346938803
3
+ 7.51020408163268 7.51020408163268 5.632653061224489 20.65306122448985
4
+ 5.632653061224489 5.632653061224489 8.448979591836776 21.591836734693906
5
+ 1.877551020408166 0.0 36.612244897959265 2.8163265306122534
6
+ 0.0 0.0 33.79591836734698 7.51020408163268
7
+ 13.14285714285717 1.877551020408166 0.938775510204083 25.346938775510242
8
+ 15.959183673469415 3.755102040816336 0.938775510204083 20.65306122448985
9
+ 15.02040816326536 5.632653061224489 5.632653061224489 15.02040816326536
10
+ 14.081632653061265 2.8163265306122534 5.632653061224489 18.775510204081698
11
+ 21.591836734693945 3.755102040816336 5.632653061224489 10.326530612244925
12
+ 15.959183673469415 1.877551020408166 2.8163265306122534 20.65306122448985
13
+ 9.38775510204083 5.632653061224489 2.8163265306122534 23.469387755102094
14
+ 0.0 0.938775510204083 36.612244897959265 3.755102040816336
15
+ 0.0 0.0 40.36734693877556 0.938775510204083
16
+ 9.38775510204083 3.755102040816336 10.326530612244925 17.836734693877606
17
+ 2.8163265306122534 7.51020408163268 7.51020408163268 23.469387755102094
18
+ 18.77551020408166 0.938775510204083 6.571428571428585 15.02040816326536
19
+ 16.663265306122497 11.030612244898006 4.45918367346938 9.153061224489816
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequence_logo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
5
- prerelease:
4
+ version: 1.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ilya Vorontsov
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-07-31 00:00:00.000000000 Z
11
+ date: 2013-04-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rmagick
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,28 +20,18 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
26
  version: 2.13.1
30
- description: ! "SequenceLogo is a tool for drawing sequence logos of motifs. It gets
31
- Positional Count Matrices(PCMs) or IUPAC sequences as input and generates png-logos
32
- for a motif. Also one can create logo for reverse complement or even generate logos
33
- for a whole collection of motifs.\n Sequence logos are a graphical representation
34
- of an amino acid or nucleic acid multiple sequence alignment developed by Tom Schneider
35
- and Mike Stephens. Each logo consists of stacks of symbols, one stack for each position
36
- in the sequence. The overall height of the stack indicates the sequence conservation
37
- at that position, while the height of symbols within the stack indicates the relative
38
- frequency of each amino or nucleic acid at that position. In general, a sequence
39
- logo provides a richer and more precise description of, for example, a binding site,
40
- than would a consensus sequence (see http://weblogo.berkeley.edu/)\n"
27
+ description: |
28
+ SequenceLogo is a tool for drawing sequence logos of motifs. It gets Positional Count Matrices(PCMs) or IUPAC sequences as input and generates png-logos for a motif. Also one can create logo for reverse complement or even generate logos for a whole collection of motifs.
29
+ Sequence logos are a graphical representation of an amino acid or nucleic acid multiple sequence alignment developed by Tom Schneider and Mike Stephens. Each logo consists of stacks of symbols, one stack for each position in the sequence. The overall height of the stack indicates the sequence conservation at that position, while the height of symbols within the stack indicates the relative frequency of each amino or nucleic acid at that position. In general, a sequence logo provides a richer and more precise description of, for example, a binding site, than would a consensus sequence (see http://weblogo.berkeley.edu/)
41
30
  email:
42
31
  - prijutme4ty@gmail.com
43
32
  executables:
44
- - create_all_logos
45
- - generate_logo
46
- - pmflogo
33
+ - glue_logos
34
+ - sequence_logo
47
35
  extensions: []
48
36
  extra_rdoc_files: []
49
37
  files:
@@ -52,17 +40,17 @@ files:
52
40
  - LICENSE
53
41
  - README.md
54
42
  - Rakefile
55
- - bin/create_all_logos
56
- - bin/generate_logo
57
- - bin/pmflogo
43
+ - TODO.txt
44
+ - bin/glue_logos
45
+ - bin/sequence_logo
58
46
  - lib/sequence_logo.rb
59
47
  - lib/sequence_logo/assets/nucl_simpa/a.png
60
48
  - lib/sequence_logo/assets/nucl_simpa/c.png
61
49
  - lib/sequence_logo/assets/nucl_simpa/g.png
62
50
  - lib/sequence_logo/assets/nucl_simpa/t.png
63
- - lib/sequence_logo/exec/create_all_logos.rb
64
- - lib/sequence_logo/exec/generate_logo.rb
65
- - lib/sequence_logo/exec/pmflogo.rb
51
+ - lib/sequence_logo/cli.rb
52
+ - lib/sequence_logo/exec/glue_logos.rb
53
+ - lib/sequence_logo/exec/sequence_logo.rb
66
54
  - lib/sequence_logo/pmflogo_lib.rb
67
55
  - lib/sequence_logo/version.rb
68
56
  - lib/sequence_logo/ytilib.rb
@@ -73,31 +61,44 @@ files:
73
61
  - lib/sequence_logo/ytilib/iupac.rb
74
62
  - lib/sequence_logo/ytilib/pm.rb
75
63
  - lib/sequence_logo/ytilib/pmsd.rb
64
+ - lib/sequence_logo/ytilib/ppm_support.rb
76
65
  - lib/sequence_logo/ytilib/randoom.rb
77
66
  - lib/sequence_logo/ytilib/ytilib.rb
78
67
  - sequence_logo.gemspec
68
+ - test/data/logo/AHR_si_direct.png
69
+ - test/data/logo/AHR_si_revcomp.png
70
+ - test/data/logo/AIRE_f2_direct.png
71
+ - test/data/logo/AIRE_f2_revcomp.png
72
+ - test/data/pcm/AHR_si.pcm
73
+ - test/data/pcm/AIRE_f2.pcm
79
74
  homepage: ''
80
75
  licenses: []
76
+ metadata: {}
81
77
  post_install_message:
82
78
  rdoc_options: []
83
79
  require_paths:
84
80
  - lib
85
81
  required_ruby_version: !ruby/object:Gem::Requirement
86
- none: false
87
82
  requirements:
88
- - - ! '>='
83
+ - - '>='
89
84
  - !ruby/object:Gem::Version
90
85
  version: '0'
91
86
  required_rubygems_version: !ruby/object:Gem::Requirement
92
- none: false
93
87
  requirements:
94
- - - ! '>='
88
+ - - '>='
95
89
  - !ruby/object:Gem::Version
96
90
  version: '0'
97
91
  requirements: []
98
92
  rubyforge_project:
99
- rubygems_version: 1.8.24
93
+ rubygems_version: 2.0.3
100
94
  signing_key:
101
- specification_version: 3
95
+ specification_version: 4
102
96
  summary: Tool for drawing sequence logos of motifs
103
- test_files: []
97
+ test_files:
98
+ - test/data/logo/AHR_si_direct.png
99
+ - test/data/logo/AHR_si_revcomp.png
100
+ - test/data/logo/AIRE_f2_direct.png
101
+ - test/data/logo/AIRE_f2_revcomp.png
102
+ - test/data/pcm/AHR_si.pcm
103
+ - test/data/pcm/AIRE_f2.pcm
104
+ has_rdoc:
data/bin/create_all_logos DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'sequence_logo/exec/create_all_logos.rb'
data/bin/generate_logo DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'sequence_logo/exec/generate_logo.rb'
data/bin/pmflogo DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'sequence_logo/exec/pmflogo.rb'
@@ -1,25 +0,0 @@
1
- require 'sequence_logo'
2
- require 'fileutils'
3
-
4
- motifs_folder = ARGV.shift
5
- unless motifs_folder && Dir.exist?(motifs_folder)
6
- puts('Specified input folder not exists')
7
- exit(1)
8
- end
9
-
10
- logo_folder = ARGV.shift
11
- unless logo_folder
12
- puts('Output logo folder must be specified')
13
- exit(1)
14
- end
15
-
16
- Dir.mkdir(logo_folder) unless Dir.exist?(logo_folder)
17
-
18
- Dir.glob(File.join(motifs_folder, '*')).to_enum.each do |filename|
19
- filename_wo_ext = File.basename(filename, File.extname(filename))
20
- direct_output = File.join(logo_folder,"#{filename_wo_ext}_direct.png")
21
- revcomp_output = File.join(logo_folder,"#{filename_wo_ext}_revcomp.png")
22
-
23
- draw_logo(filename, direct_output, words_count: 'default', x_unit: 30, y_size: 60, icd_mode: 'discrete', revcomp: 'direct')
24
- draw_logo(filename, revcomp_output, words_count: 'default', x_unit: 30, y_size: 60, icd_mode: 'discrete', revcomp: 'revcomp')
25
- end
@@ -1,18 +0,0 @@
1
- require 'sequence_logo'
2
- require 'fileutils'
3
-
4
- filename = ARGV.shift
5
- unless filename && File.exist?(filename)
6
- puts 'Existing input file should be specified'
7
- exit(1)
8
- end
9
-
10
- logo_dir = ARGV.shift || File.dirname(filename)
11
- FileUtils.mkdir(logo_dir) unless Dir.exist?(logo_dir)
12
-
13
- filename_wo_ext = File.basename(filename, File.extname(filename))
14
- direct_output = File.join(logo_dir,"#{filename_wo_ext}_direct.png")
15
- revcomp_output = File.join(logo_dir,"#{filename_wo_ext}_revcomp.png")
16
-
17
- draw_logo(filename, direct_output, x_unit: 30, y_size: 60, revcomp: 'direct')
18
- draw_logo(filename, revcomp_output, x_unit: 30, y_size: 60, revcomp: 'revcomp')
@@ -1,26 +0,0 @@
1
- # pmflogo <input_file> <output_logo_filename> [words_count] [x_unit=100] [y_size=200] [icd_mode=discrete|weblogo] [revcomp=no|yes] [scheme=nucl_simpa] [paper_mode=no|yes] [threshold_lines=yes|no]
2
- # Any optional argument can be set as 'default' e.g.
3
- # pmflogo motif.pcm logo.png default 30 60 default yes
4
- # skipped parameters are also substituted as default (in example above icd_mode is default, and also scheme, paper_mode and threshold_lines)
5
-
6
- require 'sequence_logo'
7
-
8
- if ARGV.size < 2
9
- puts('At least two arguments must be specified, see usage of pmflogo')
10
- exit(2)
11
- end
12
-
13
- input_file, output_logo_filename = ARGV.shift(2)
14
- unless File.exist?(input_file)
15
- puts('Specified input file not exists')
16
- exit(1)
17
- end
18
-
19
- options = {}
20
- options[:words_count] = ARGV.shift
21
- options[:x_unit], options[:y_size] = ARGV.shift(2)
22
- options[:icd_mode], options[:revcomp], options[:scheme], options[:paper_mode], options[:threshold_lines] = ARGV.shift(5)
23
-
24
- options.reject!{|k,v| v.nil?}
25
-
26
- draw_logo(input_file, output_logo_filename, options)