protk 1.2.6.pre3 → 1.2.6.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/interprophet.rb +6 -5
- data/bin/msgfplus_search.rb +2 -0
- data/bin/peptide_prophet.rb +6 -5
- data/bin/protein_prophet.rb +6 -10
- data/lib/protk/constants.rb +13 -128
- data/lib/protk/galaxy_stager.rb +2 -2
- data/lib/protk/galaxy_util.rb +5 -9
- data/lib/protk/setup_rakefile.rake +13 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f779db7583731b118880ba56e4c465b0a75856a3
|
4
|
+
data.tar.gz: 459bfa1d39a6c8b11d6b04f4c2c30a0b85115f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 340df071b94a8658354e08d2c30a642cd1d715d2312b9e0eec7c67fd6be36a16ab77430cdf4160cb0365d53f747c3af7471168af39a0afdbc7c761801f853671
|
7
|
+
data.tar.gz: 2e19a8b4ecd4af37077157f1eafbcb4d9dc7850b135e55853199ffd7637f417e264459fec0818fc298854d96afae96a53e2f0b5f2454e9b2c8898bdfd51612a1
|
data/bin/interprophet.rb
CHANGED
@@ -12,6 +12,7 @@ require 'protk/command_runner'
|
|
12
12
|
require 'protk/prophet_tool'
|
13
13
|
require 'protk/galaxy_util'
|
14
14
|
|
15
|
+
for_galaxy = GalaxyUtil.for_galaxy?
|
15
16
|
|
16
17
|
# Setup specific command-line options for this tool. Other options are inherited from ProphetTool
|
17
18
|
#
|
@@ -72,13 +73,13 @@ if ( !Pathname.new(output_file).exist? || prophet_tool.over_write )
|
|
72
73
|
cmd << " MINPROB=#{prophet_tool.min_prob}" if ( prophet_tool.min_prob !="" )
|
73
74
|
|
74
75
|
inputs = ARGV.collect {|file_name|
|
75
|
-
|
76
|
-
unless input_name !~/pep\.xml$/
|
77
|
-
input_name = GalaxyStager.new(input_name, :extension => ".pep.xml").staged_path
|
78
|
-
end
|
79
|
-
input_name
|
76
|
+
file_name.chomp
|
80
77
|
}
|
81
78
|
|
79
|
+
if for_galaxy
|
80
|
+
inputs = inputs.collect {|ip| GalaxyUtil.stage_pepxml(ip) }
|
81
|
+
end
|
82
|
+
|
82
83
|
cmd << " #{inputs.join(" ")} #{output_file}"
|
83
84
|
|
84
85
|
genv.log("Running #{cmd}",:info)
|
data/bin/msgfplus_search.rb
CHANGED
data/bin/peptide_prophet.rb
CHANGED
@@ -12,7 +12,8 @@ require 'protk/command_runner'
|
|
12
12
|
require 'protk/prophet_tool'
|
13
13
|
require 'protk/galaxy_util'
|
14
14
|
|
15
|
-
|
15
|
+
for_galaxy = GalaxyUtil.for_galaxy?
|
16
|
+
input_stager = nil
|
16
17
|
|
17
18
|
# Setup specific command-line options for this tool. Other options are inherited from ProphetTool
|
18
19
|
#
|
@@ -120,15 +121,15 @@ genv=Constants.new
|
|
120
121
|
|
121
122
|
|
122
123
|
inputs=ARGV.collect { |file_name| file_name.chomp}
|
123
|
-
if
|
124
|
-
inputs = inputs.collect {|ip|
|
124
|
+
if for_galaxy
|
125
|
+
inputs = inputs.collect {|ip| GalaxyUtil.stage_pepxml(ip) }
|
125
126
|
end
|
126
127
|
|
127
128
|
# Interrogate all the input files to obtain the database and search engine from them
|
128
129
|
#
|
129
130
|
genv.log("Determining search engine and database used to create input files ...",:info)
|
130
131
|
file_info={}
|
131
|
-
|
132
|
+
inputs.each {|file_name|
|
132
133
|
name=file_name.chomp
|
133
134
|
|
134
135
|
engine=prophet_tool.extract_engine(name)
|
@@ -167,7 +168,7 @@ end
|
|
167
168
|
|
168
169
|
def generate_command(genv,prophet_tool,inputs,output,database,engine)
|
169
170
|
|
170
|
-
cmd="
|
171
|
+
cmd="xinteract -N#{output} -l7 -eT -D'#{database}' "
|
171
172
|
|
172
173
|
if prophet_tool.glyco
|
173
174
|
cmd << " -Og "
|
data/bin/protein_prophet.rb
CHANGED
@@ -15,15 +15,6 @@ require 'protk/galaxy_util'
|
|
15
15
|
|
16
16
|
for_galaxy = GalaxyUtil.for_galaxy?
|
17
17
|
|
18
|
-
if for_galaxy
|
19
|
-
# Stage files for galaxy
|
20
|
-
original_input_file = ARGV[0]
|
21
|
-
original_input_path = Pathname.new("#{original_input_file}")
|
22
|
-
input_stager = GalaxyStager.new("#{original_input_file}", :extension => '.pep.xml')
|
23
|
-
ARGV.push("-o")
|
24
|
-
ARGV.push("protein_prophet_results.prot.xml")
|
25
|
-
end
|
26
|
-
|
27
18
|
# Setup specific command-line options for this tool. Other options are inherited from ProphetTool
|
28
19
|
#
|
29
20
|
prophet_tool=ProphetTool.new([:glyco,:explicit_output,:over_write,:prefix_suffix])
|
@@ -112,12 +103,17 @@ p output_file
|
|
112
103
|
|
113
104
|
if ( !Pathname.new(output_file).exist? || prophet_tool.over_write )
|
114
105
|
|
115
|
-
cmd="
|
106
|
+
cmd="ProteinProphet "
|
116
107
|
|
117
108
|
inputs = ARGV.collect {|file_name|
|
118
109
|
file_name.chomp
|
119
110
|
}
|
120
111
|
|
112
|
+
if for_galaxy
|
113
|
+
inputs = inputs.collect {|ip| GalaxyUtil.stage_pepxml(ip) }
|
114
|
+
end
|
115
|
+
|
116
|
+
|
121
117
|
cmd << " #{inputs.join(" ")} #{output_file}"
|
122
118
|
|
123
119
|
if ( prophet_tool.glyco )
|
data/lib/protk/constants.rb
CHANGED
@@ -35,7 +35,9 @@ class Constants
|
|
35
35
|
# This will be used for all constants other than paths
|
36
36
|
#
|
37
37
|
def method_missing(method)
|
38
|
-
@env[method.to_s]
|
38
|
+
from_env = @env[method.to_s]
|
39
|
+
throw "#{method} is undefined" unless from_env!=nil
|
40
|
+
from_env
|
39
41
|
end
|
40
42
|
|
41
43
|
# Some constants are paths. They need to be translated into real paths before being returned
|
@@ -46,137 +48,33 @@ class Constants
|
|
46
48
|
end
|
47
49
|
|
48
50
|
def tpp_root
|
49
|
-
|
50
|
-
if ( path =~ /^\// )
|
51
|
-
return path
|
52
|
-
else
|
53
|
-
return "#{@protk_dir}/#{@env['tpp_root']}"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def xinteract
|
58
|
-
return "#{self.tpp_root}/bin/xinteract"
|
59
|
-
end
|
60
|
-
|
61
|
-
def xtandem
|
62
|
-
return "#{self.tpp_root}/bin/tandem"
|
63
|
-
end
|
64
|
-
|
65
|
-
def tandem2xml
|
66
|
-
return "#{self.tpp_root}/bin/Tandem2XML"
|
67
|
-
end
|
68
|
-
|
69
|
-
def interprophetparser
|
70
|
-
return "#{self.tpp_root}/bin/InterProphetParser"
|
71
|
-
end
|
72
|
-
|
73
|
-
def proteinprophet
|
74
|
-
return "#{self.tpp_root}/bin/ProteinProphet"
|
75
|
-
end
|
76
|
-
|
77
|
-
def asapratiopeptideparser
|
78
|
-
return "#{self.tpp_root}/bin/ASAPRatioPeptideParser"
|
51
|
+
"#{@protk_dir}/tools/tpp"
|
79
52
|
end
|
80
53
|
|
81
|
-
def asapratioproteinparser
|
82
|
-
return "#{self.tpp_root}/bin/ASAPRatioProteinRatioParser"
|
83
|
-
end
|
84
|
-
|
85
|
-
def asaprationpvalueparser
|
86
|
-
return "#{self.tpp_root}/bin/ASAPRatioPvalueParser"
|
87
|
-
end
|
88
|
-
|
89
|
-
def librapeptideparser
|
90
|
-
return "#{self.tpp_root}/bin/LibraPeptideParser"
|
91
|
-
end
|
92
|
-
|
93
|
-
def libraproteinratioparser
|
94
|
-
return "#{self.tpp_root}/bin/LibraProteinRatioParser"
|
95
|
-
end
|
96
|
-
|
97
|
-
def xpresspeptideparser
|
98
|
-
return "#{self.tpp_root}/bin/XPressPeptideParser"
|
99
|
-
end
|
100
|
-
|
101
|
-
def xpressproteinratioparser
|
102
|
-
return "#{self.tpp_root}/bin/XPressProteinRatioParser"
|
103
|
-
end
|
104
|
-
|
105
|
-
def mascot2xml
|
106
|
-
return "#{self.tpp_root}/bin/Mascot2XML"
|
107
|
-
end
|
108
54
|
|
109
55
|
def omssa_root
|
110
|
-
|
111
|
-
if ( path =~ /^\// )
|
112
|
-
return path
|
113
|
-
else
|
114
|
-
return "#{@protk_dir}/#{@env['omssa_root']}"
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
def omssacl
|
119
|
-
return "#{self.omssa_root}/omssacl"
|
120
|
-
end
|
121
|
-
|
122
|
-
def omssa2pepxml
|
123
|
-
return "#{self.omssa_root}/omssa2pepXML"
|
56
|
+
"#{@protk_dir}/tools/omssa"
|
124
57
|
end
|
125
58
|
|
126
59
|
def msgfplus_root
|
127
|
-
|
128
|
-
if ( path =~ /^\// )
|
129
|
-
return path
|
130
|
-
else
|
131
|
-
return "#{@protk_dir}/#{@env['msgfplus_root']}"
|
132
|
-
end
|
60
|
+
"#{@protk_dir}/tools/msgfplus"
|
133
61
|
end
|
134
62
|
|
135
63
|
def msgfplusjar
|
136
|
-
|
64
|
+
msgfplus_path=%x[which MSGFPlus.jar]
|
65
|
+
msgfplus_path.chomp
|
137
66
|
end
|
138
67
|
|
139
68
|
def pwiz_root
|
140
|
-
|
141
|
-
if ( path =~ /^\// )
|
142
|
-
return path
|
143
|
-
else
|
144
|
-
return "#{@protk_dir}/#{@env['pwiz_root']}"
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
def msconvert
|
149
|
-
return "#{self.pwiz_root}/msconvert"
|
69
|
+
return "#{@protk_dir}/tools/pwiz"
|
150
70
|
end
|
151
71
|
|
152
72
|
def openms_root
|
153
|
-
|
154
|
-
if ( path =~ /^\//)
|
155
|
-
return path
|
156
|
-
else
|
157
|
-
return "#{@protk_dir}/#{@env['openms_root']}"
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
def featurefinderisotopewavelet
|
162
|
-
return "#{self.openms_root}/bin/FeatureFinderIsotopeWavelet"
|
163
|
-
end
|
164
|
-
|
165
|
-
def executepipeline
|
166
|
-
return "#{self.openms_root}/bin/ExecutePipeline"
|
73
|
+
"#{@protk_dir}/tools/openms"
|
167
74
|
end
|
168
75
|
|
169
76
|
def tandem_root
|
170
|
-
|
171
|
-
if ( path =~ /^\//)
|
172
|
-
return path
|
173
|
-
else
|
174
|
-
return "#{@protk_dir}/#{@env['tandem_root']}"
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
def gpmtandem
|
179
|
-
return "#{self.tandem_root}/bin/tandem"
|
77
|
+
"#{@protk_dir}/tools/tandem"
|
180
78
|
end
|
181
79
|
|
182
80
|
def protein_database_root
|
@@ -193,20 +91,7 @@ class Constants
|
|
193
91
|
end
|
194
92
|
|
195
93
|
def blast_root
|
196
|
-
|
197
|
-
if ( path =~ /^\// )
|
198
|
-
return path
|
199
|
-
else
|
200
|
-
return "#{@protk_dir}/#{@env['blast_root']}"
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
def makeblastdb
|
205
|
-
return "makeblastdb"
|
206
|
-
end
|
207
|
-
|
208
|
-
def searchblastdb
|
209
|
-
return "#{self.blast_root}/bin/blastdbcmd"
|
94
|
+
"#{@protk_dir}/blast"
|
210
95
|
end
|
211
96
|
|
212
97
|
def log_file
|
@@ -247,7 +132,7 @@ class Constants
|
|
247
132
|
@env=default_config_yml
|
248
133
|
end
|
249
134
|
|
250
|
-
protk_tool_dirs=["tpp","omssa","openms","msgfplus","blast","pwiz","tandem"]
|
135
|
+
protk_tool_dirs=["tpp/bin","omssa","openms/bin","msgfplus","blast/bin","pwiz","tandem/bin"]
|
251
136
|
|
252
137
|
# Construct the PATH variable by prepending our preferred paths
|
253
138
|
#
|
data/lib/protk/galaxy_stager.rb
CHANGED
@@ -15,8 +15,8 @@ class GalaxyStager
|
|
15
15
|
@staged_path = "#{@staged_base}#{@extension}"
|
16
16
|
if options[:force_copy]
|
17
17
|
FileUtils.copy(@original_path, @staged_path)
|
18
|
-
else
|
19
|
-
File.symlink(@original_path, @staged_path)
|
18
|
+
else
|
19
|
+
File.symlink(@original_path, @staged_path) unless File.symlink?@staged_path
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/lib/protk/galaxy_util.rb
CHANGED
@@ -6,18 +6,14 @@ require 'fileutils'
|
|
6
6
|
|
7
7
|
class GalaxyUtil
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
@for_galaxy= ARGV[0]=="--galaxy"
|
14
|
-
ARGV.shift if @for_galaxy
|
15
|
-
@stagers=[]
|
9
|
+
def self.for_galaxy?
|
10
|
+
fg = ARGV[0]=="--galaxy"
|
11
|
+
ARGV.shift if fg
|
12
|
+
fg
|
16
13
|
end
|
17
14
|
|
18
|
-
def stage_pepxml(input_pepxml_path)
|
15
|
+
def self.stage_pepxml(input_pepxml_path)
|
19
16
|
stager = GalaxyStager.new(input_pepxml_path, :extension => ".pep.xml")
|
20
|
-
@stagers << stager
|
21
17
|
stager.staged_path
|
22
18
|
end
|
23
19
|
|
@@ -133,10 +133,10 @@ task :perl_locallib => [perl_locallib_installed_file]
|
|
133
133
|
#
|
134
134
|
# TPP
|
135
135
|
#
|
136
|
-
tpp_version="4.6.
|
136
|
+
tpp_version="4.6.3"
|
137
137
|
tpp_packagefile="TPP-#{tpp_version}.tgz"
|
138
|
-
tpp_installed_file = "#{env.xinteract
|
139
|
-
tpp_url = "https://dl.dropbox.com/u/226794/TPP-4.6.
|
138
|
+
tpp_installed_file = "#{env.tpp_root}/bin/xinteract"
|
139
|
+
tpp_url = "https://dl.dropbox.com/u/226794/TPP-4.6.3.tgz"
|
140
140
|
|
141
141
|
tpp_download_file = download_task tpp_url, tpp_packagefile
|
142
142
|
|
@@ -198,7 +198,7 @@ def omssa_platform
|
|
198
198
|
end
|
199
199
|
|
200
200
|
omssa_packagefile="omssa-#{omssa_platform}.tar.gz"
|
201
|
-
omssa_installed_file = "#{env.omssacl
|
201
|
+
omssa_installed_file = "#{env.omssa_root}/omssacl"
|
202
202
|
omssa_url = "ftp://ftp.ncbi.nih.gov/pub/lewisg/omssa/CURRENT/omssa-#{omssa_platform}.tar.gz"
|
203
203
|
|
204
204
|
download_task omssa_url, omssa_packagefile
|
@@ -229,7 +229,7 @@ end
|
|
229
229
|
blast_version="2.2.27+"
|
230
230
|
blast_packagefile="ncbi-blast-#{blast_version}-#{blast_platform}.tar.gz"
|
231
231
|
blast_url="ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/#{blast_version.chomp('+')}/#{blast_packagefile}"
|
232
|
-
blast_installed_file="#{env.makeblastdb
|
232
|
+
blast_installed_file="#{env.blast_root}/bin/makeblastdb"
|
233
233
|
|
234
234
|
download_task blast_url, blast_packagefile
|
235
235
|
|
@@ -248,10 +248,10 @@ task :blast => blast_installed_file
|
|
248
248
|
#
|
249
249
|
# MSGFPlus
|
250
250
|
#
|
251
|
-
msgfplus_version="
|
251
|
+
msgfplus_version="20140210"
|
252
252
|
msgfplus_packagefile="MSGFPlus.#{msgfplus_version}.zip"
|
253
|
-
msgfplus_url="http://proteomics.ucsd.edu/
|
254
|
-
msgfplus_installed_file="#{env.
|
253
|
+
msgfplus_url="http://proteomics.ucsd.edu/Software/MSGFPlus/MSGFPlus.#{msgfplus_version}.zip"
|
254
|
+
msgfplus_installed_file="#{env.msgfplus_root}/MSGFPlus.jar"
|
255
255
|
|
256
256
|
download_task msgfplus_url, msgfplus_packagefile
|
257
257
|
|
@@ -285,7 +285,7 @@ pwiz_version="3_0_4388"
|
|
285
285
|
pwiz_folder_name="pwiz-bin-#{pwiz_platform}-release-#{pwiz_version}"
|
286
286
|
pwiz_packagefile="#{pwiz_folder_name}.tar.bz2"
|
287
287
|
pwiz_url="https://dl.dropbox.com/u/226794/#{pwiz_packagefile}"
|
288
|
-
pwiz_installed_file="#{env.idconvert
|
288
|
+
pwiz_installed_file="#{env.pwiz_root}/idconvert"
|
289
289
|
|
290
290
|
download_task pwiz_url, pwiz_packagefile
|
291
291
|
|
@@ -313,7 +313,7 @@ end
|
|
313
313
|
openms_version="1.10.0"
|
314
314
|
openms_packagefile="OpenMS-#{openms_version}.tar.gz"
|
315
315
|
openms_url="https://dl.dropbox.com/u/226794/#{openms_packagefile}"
|
316
|
-
openms_installed_file="#{env.
|
316
|
+
openms_installed_file="#{env.openms_root}/bin/FileConverter"
|
317
317
|
|
318
318
|
download_task openms_url, openms_packagefile
|
319
319
|
|
@@ -340,10 +340,10 @@ def tandem_platform
|
|
340
340
|
'linux'
|
341
341
|
end
|
342
342
|
|
343
|
-
tandem_version="13-
|
343
|
+
tandem_version="13-09-01-1"
|
344
344
|
tandem_packagefile="tandem-#{tandem_platform}-#{tandem_version}.zip"
|
345
|
-
tandem_url="
|
346
|
-
tandem_installed_file="#{env.
|
345
|
+
tandem_url="https://dl.dropboxusercontent.com/u/226794/galaxy/#{tandem_packagefile}"
|
346
|
+
tandem_installed_file="#{env.tandem_root}/bin/tandem.exe"
|
347
347
|
|
348
348
|
download_task tandem_url, tandem_packagefile
|
349
349
|
|