bio-signalp 0.2.2 → 0.2.3
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.
- data/VERSION +1 -1
- data/bin/signalp.rb +97 -101
- data/bio-signalp.gemspec +2 -2
- metadata +15 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/bin/signalp.rb
CHANGED
@@ -2,118 +2,114 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'bio'
|
5
|
+
require 'optparse'
|
6
|
+
|
5
7
|
|
6
8
|
# always load from the directory relative to the current script's directory
|
7
9
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
8
10
|
require 'bio-signalp'
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
12
|
+
runner = Bio::SignalP::Wrapper.new
|
13
|
+
|
14
|
+
options = ARGV.getopts("sShvfF") #s for summary, no args required
|
15
|
+
if options['h']
|
16
|
+
$stderr.puts "Usage: signalp.rb [-svf] <my.fasta>"
|
17
|
+
$stderr.puts "Where my.fasta is the name of the fasta file you want to analyse. Default output is all the sequences with their signal sequences cleaved."
|
18
|
+
$stderr.puts "-s: summary: print a tab separated table indicating if the sequence had a signal peptide according to the HMM and NN results, respectively."
|
19
|
+
$stderr.puts "-S: bigger_summary: like -s, except also includes where the cleavage site is predicted"
|
20
|
+
$stderr.puts "-v: verbose summary: much like -s except more details of the prediction are predicted."
|
21
|
+
$stderr.puts "-f: filter in: print those sequences that have a signal peptide"
|
22
|
+
$stderr.puts "-F: filter out: print those sequences that don't have a signal peptide"
|
23
|
+
exit
|
24
|
+
end
|
25
|
+
|
26
|
+
# Print headers if required
|
27
|
+
if options['s']
|
28
|
+
puts [
|
29
|
+
'Name',
|
30
|
+
'NN Prediction',
|
31
|
+
'HMM Prediction'
|
32
|
+
].join("\t")
|
33
|
+
elsif options['S']
|
34
|
+
puts [
|
35
|
+
'Name',
|
36
|
+
'NN Prediction',
|
37
|
+
'HMM Prediction',
|
38
|
+
'Predicted?',
|
39
|
+
'Cleavege site (if predicted)'
|
40
|
+
].join("\t")
|
41
|
+
|
42
|
+
elsif options['v']
|
43
|
+
# [:nn_Cmax, :nn_Cmax_position, :nn_Cmax_prediction,
|
44
|
+
# :nn_Ymax, :nn_Ymax_position, :nn_Ymax_prediction,
|
45
|
+
# :nn_Smax, :nn_Smax_position, :nn_Smax_prediction,
|
46
|
+
# :nn_Smean, :nn_Smean_prediction,
|
47
|
+
# :nn_D, :nn_D_prediction]
|
48
|
+
# @@hmm_results = [
|
49
|
+
# :hmm_result, :hmm_Cmax, :hmm_Cmax_position, :hmm_Cmax_prediction, :hmm_Sprob, :hmm_Sprob_prediction]
|
50
|
+
puts [
|
51
|
+
'Name',
|
52
|
+
'NN Cmax',
|
53
|
+
'NN Cmax position',
|
54
|
+
'NN Cmax prediction',
|
55
|
+
'NN Ymax',
|
56
|
+
'NN Ymax position',
|
57
|
+
'NN Ymax prediction',
|
58
|
+
'NN Smax',
|
59
|
+
'NN Smax position',
|
60
|
+
'NN Smax prediction',
|
61
|
+
'NN Smean',
|
62
|
+
'NN Smean prediction',
|
63
|
+
'NN D',
|
64
|
+
'NN D prediction',
|
65
|
+
'HMM result',
|
66
|
+
'HMM Cmax',
|
67
|
+
'HMM Cmax position',
|
68
|
+
'HMM Cmax prediction',
|
69
|
+
'HMM Sprob',
|
70
|
+
'HMM Sprob prediction',
|
71
|
+
].join("\t")
|
72
|
+
end
|
73
|
+
|
74
|
+
Bio::FlatFile.open(ARGF).each do |seq|
|
75
|
+
result = runner.calculate(seq.seq)
|
76
|
+
if result.nil?
|
77
|
+
$stderr.puts "Unexpected empty sequence detected, ignoring: #{seq.definition}"
|
78
|
+
elsif options['s']
|
31
79
|
puts [
|
32
|
-
|
33
|
-
|
34
|
-
|
80
|
+
seq.entry_id,
|
81
|
+
result.nn_D_prediction ? 'T' : 'F',
|
82
|
+
result.hmm_Sprob_prediction ? 'T' : 'F'
|
35
83
|
].join("\t")
|
36
84
|
elsif options['S']
|
37
85
|
puts [
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
86
|
+
seq.entry_id,
|
87
|
+
result.nn_D_prediction ? 'T' : 'F',
|
88
|
+
result.hmm_Sprob_prediction ? 'T' : 'F',
|
89
|
+
result.signal? ? 'T' : 'F',
|
90
|
+
result.signal? ? result.cleavage_site : 0,
|
43
91
|
].join("\t")
|
44
|
-
|
45
92
|
elsif options['v']
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
'NN Smean',
|
65
|
-
'NN Smean prediction',
|
66
|
-
'NN D',
|
67
|
-
'NN D prediction',
|
68
|
-
'HMM result',
|
69
|
-
'HMM Cmax',
|
70
|
-
'HMM Cmax position',
|
71
|
-
'HMM Cmax prediction',
|
72
|
-
'HMM Sprob',
|
73
|
-
'HMM Sprob prediction',
|
74
|
-
].join("\t")
|
75
|
-
end
|
76
|
-
|
77
|
-
Bio::FlatFile.open(ARGF).each do |seq|
|
78
|
-
result = runner.calculate(seq.seq)
|
79
|
-
if result.nil?
|
80
|
-
$stderr.puts "Unexpected empty sequence detected, ignoring: #{seq.definition}"
|
81
|
-
elsif options['s']
|
82
|
-
puts [
|
83
|
-
seq.entry_id,
|
84
|
-
result.nn_D_prediction ? 'T' : 'F',
|
85
|
-
result.hmm_Sprob_prediction ? 'T' : 'F'
|
86
|
-
].join("\t")
|
87
|
-
elsif options['S']
|
88
|
-
puts [
|
89
|
-
seq.entry_id,
|
90
|
-
result.nn_D_prediction ? 'T' : 'F',
|
91
|
-
result.hmm_Sprob_prediction ? 'T' : 'F',
|
92
|
-
result.signal? ? 'T' : 'F',
|
93
|
-
result.signal? ? result.cleavage_site : 0,
|
94
|
-
].join("\t")
|
95
|
-
elsif options['v']
|
96
|
-
taputs = [seq.definition]
|
97
|
-
[:nn_Cmax, :nn_Cmax_position, :nn_Cmax_prediction,
|
98
|
-
:nn_Ymax, :nn_Ymax_position, :nn_Ymax_prediction,
|
99
|
-
:nn_Smax, :nn_Smax_position, :nn_Smax_prediction,
|
100
|
-
:nn_Smean, :nn_Smean_prediction,
|
101
|
-
:nn_D, :nn_D_prediction,
|
102
|
-
:hmm_result, :hmm_Cmax, :hmm_Cmax_position, :hmm_Cmax_prediction,
|
103
|
-
:hmm_Sprob, :hmm_Sprob_prediction].each do |meth|
|
104
|
-
taputs.push result.send(meth)
|
105
|
-
end
|
106
|
-
puts taputs.join("\t")
|
107
|
-
elsif options['f']
|
108
|
-
if result.signal?
|
109
|
-
puts seq
|
110
|
-
end
|
111
|
-
elsif options['F']
|
112
|
-
if !result.signal?
|
113
|
-
puts seq
|
114
|
-
end
|
115
|
-
else
|
116
|
-
puts ">#{seq.entry_id}\n#{result.cleave(seq.seq)}"
|
93
|
+
taputs = [seq.definition]
|
94
|
+
[:nn_Cmax, :nn_Cmax_position, :nn_Cmax_prediction,
|
95
|
+
:nn_Ymax, :nn_Ymax_position, :nn_Ymax_prediction,
|
96
|
+
:nn_Smax, :nn_Smax_position, :nn_Smax_prediction,
|
97
|
+
:nn_Smean, :nn_Smean_prediction,
|
98
|
+
:nn_D, :nn_D_prediction,
|
99
|
+
:hmm_result, :hmm_Cmax, :hmm_Cmax_position, :hmm_Cmax_prediction,
|
100
|
+
:hmm_Sprob, :hmm_Sprob_prediction].each do |meth|
|
101
|
+
taputs.push result.send(meth)
|
102
|
+
end
|
103
|
+
puts taputs.join("\t")
|
104
|
+
elsif options['f']
|
105
|
+
if result.signal?
|
106
|
+
puts seq
|
107
|
+
end
|
108
|
+
elsif options['F']
|
109
|
+
if !result.signal?
|
110
|
+
puts seq
|
117
111
|
end
|
112
|
+
else
|
113
|
+
puts ">#{seq.entry_id}\n#{result.cleave(seq.seq)}"
|
118
114
|
end
|
119
115
|
end
|
data/bio-signalp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bio-signalp"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben J Woodcroft"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-04-04"
|
13
13
|
s.description = "A wrapper for the signal peptide prediction algorith SignalP. Not very well supported, but seems to work for the author, at least."
|
14
14
|
s.email = "donttrustben near gmail.com"
|
15
15
|
s.executables = ["signalp.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-signalp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bio
|
16
|
-
requirement: &
|
16
|
+
requirement: &75320500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.4.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *75320500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &75320020 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *75320020
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &75318990 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *75318990
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &75318160 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.6.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *75318160
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bio
|
60
|
-
requirement: &
|
60
|
+
requirement: &75317190 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.4.1
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *75317190
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
|
-
requirement: &
|
71
|
+
requirement: &75316460 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '3.12'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *75316460
|
80
80
|
description: A wrapper for the signal peptide prediction algorith SignalP. Not very
|
81
81
|
well supported, but seems to work for the author, at least.
|
82
82
|
email: donttrustben near gmail.com
|
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
segments:
|
116
116
|
- 0
|
117
|
-
hash:
|
117
|
+
hash: 903911101
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|