protk 1.1.7 → 1.1.8
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/bin/feature_finder.rb +1 -1
- data/bin/protk_setup.rb +19 -24
- data/bin/toppas_pipeline.rb +1 -1
- data/lib/protk/constants.rb +10 -0
- metadata +1 -1
data/bin/feature_finder.rb
CHANGED
@@ -72,7 +72,7 @@ ARGV.each do |filen|
|
|
72
72
|
if ( tool.over_write || !Pathname.new(output_file).exist? )
|
73
73
|
output_base_filename=Pathname.new(output_file).basename.to_s
|
74
74
|
cmd=""
|
75
|
-
cmd<<"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
75
|
+
cmd<<"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{genv.openms_root}/lib;
|
76
76
|
#{genv.featurefinderisotopewavelet} -in #{Pathname.new(input_file).realpath.to_s} -out #{output_dir}/#{output_base_filename} -ini #{ini_file}"
|
77
77
|
|
78
78
|
run_ff(genv,tool,cmd,output_file,tool.jobid_from_filename(input_basename))
|
data/bin/protk_setup.rb
CHANGED
@@ -6,8 +6,19 @@
|
|
6
6
|
# Post-install setup for protk.
|
7
7
|
# Installs third party tools
|
8
8
|
#
|
9
|
-
|
10
9
|
require 'protk/constants'
|
10
|
+
|
11
|
+
toolname=ARGV[0]
|
12
|
+
|
13
|
+
if ARGV[1]=='--change-location'
|
14
|
+
location=ARGV[2]
|
15
|
+
p "Changing default location for #{toolname} to #{location}"
|
16
|
+
env=Constants.new
|
17
|
+
env.update_user_config({"#{toolname}_root"=>location})
|
18
|
+
exit
|
19
|
+
end
|
20
|
+
|
21
|
+
|
11
22
|
require 'protk/setup_tool'
|
12
23
|
require 'yaml'
|
13
24
|
require 'pp'
|
@@ -26,28 +37,12 @@ if ( ARGV.length < 1)
|
|
26
37
|
exit
|
27
38
|
end
|
28
39
|
|
29
|
-
# Checking for required options
|
30
|
-
# begin
|
31
|
-
# tool.option_parser.parse!
|
32
|
-
# mandatory = [:gff_predicted, :protxml,:sixframe]
|
33
|
-
# missing = mandatory.select{ |param| tool.send(param).nil? }
|
34
|
-
# if not missing.empty?
|
35
|
-
# puts "Missing options: #{missing.join(', ')}"
|
36
|
-
# puts tool.option_parser
|
37
|
-
# exit
|
38
|
-
# end
|
39
|
-
# rescue OptionParser::InvalidOption, OptionParser::MissingArgument
|
40
|
-
# puts $!.to_s
|
41
|
-
# puts tool.option_parser
|
42
|
-
# exit
|
43
|
-
# end
|
44
|
-
|
45
|
-
|
46
|
-
# Create install directory if it doesn't already exist
|
47
|
-
#
|
48
40
|
env=Constants.new
|
49
41
|
|
50
|
-
ARGV.
|
51
|
-
|
52
|
-
|
53
|
-
|
42
|
+
toolname=ARGV.shift
|
43
|
+
|
44
|
+
p ARGV
|
45
|
+
p toolname
|
46
|
+
|
47
|
+
p "Installing #{toolname}"
|
48
|
+
tool.install toolname
|
data/bin/toppas_pipeline.rb
CHANGED
@@ -66,7 +66,7 @@ trf_path = "#{tool.toppas_file}.trf"
|
|
66
66
|
generate_trf(ARGV,trf_path)
|
67
67
|
|
68
68
|
cmd=""
|
69
|
-
cmd<<"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
69
|
+
cmd<<"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{genv.openms_root}/lib;
|
70
70
|
#{genv.executepipeline} -in #{Pathname.new(tool.toppas_file).realpath.to_s} -out_dir #{Pathname.new(tool.outdir).realpath.to_s} -resource_file #{Pathname.new(trf_path).realpath.to_s}"
|
71
71
|
|
72
72
|
run_pipeline(genv,tool,cmd,tool.outdir,tool.jobid_from_filename(tool.toppas_file))
|
data/lib/protk/constants.rb
CHANGED
@@ -240,6 +240,16 @@ class Constants
|
|
240
240
|
|
241
241
|
end
|
242
242
|
|
243
|
+
def update_user_config(dict)
|
244
|
+
user_config_yml = YAML.load_file "#{self.protk_dir}/config.yml" if File.exist? "#{self.protk_dir}/config.yml"
|
245
|
+
|
246
|
+
if ( user_config_yml !=nil )
|
247
|
+
dict = dict.merge user_config_yml
|
248
|
+
end
|
249
|
+
|
250
|
+
File.open("#{self.protk_dir}/config.yml", "w") {|file| file.puts(dict.to_yaml) }
|
251
|
+
|
252
|
+
end
|
243
253
|
|
244
254
|
def initialize_loggers
|
245
255
|
log_dir = Pathname.new(self.log_file).dirname
|