protk 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/annotate_ids.rb CHANGED
@@ -15,7 +15,7 @@ require 'protk/protein_annotator'
15
15
 
16
16
  # Setup specific command-line options for this tool. Other options are inherited from Tool
17
17
  #
18
- id_tool=ProphetTool.new([:explicit_output,:over_write])
18
+ id_tool=ProphetTool.new([:explicit_output,:over_write,:prefix_suffix])
19
19
  id_tool.option_parser.banner = "Run ID annotation on a prot.xml input file.\n\nUsage: annotate_ids.rb [options] file1.prot.xml"
20
20
  id_tool.options.output_prefix="annotated_"
21
21
 
@@ -17,7 +17,7 @@ require 'protk/omssa_util'
17
17
  #
18
18
  genv=Constants.new
19
19
 
20
- tool=Tool.new
20
+ tool=Tool.new([:over_write])
21
21
  tool.option_parser.banner = "Correct retention times on a pepxml file produced by omssa using information from an mgf file.\n\nUsage: correct_omssa_retention_times.rb [options] file1.pep.xml file2.mgf"
22
22
  tool.option_parser.parse!
23
23
 
data/bin/file_convert.rb CHANGED
@@ -14,6 +14,7 @@ require 'libxml'
14
14
 
15
15
  include LibXML
16
16
 
17
+ # Regex for cleaning mgf sed -i.bak 's/\(PEPMASS=[0-9]*.[0-9]*\)[ \t]*[0-9]*/\1/g'
17
18
 
18
19
  # Read the input file and search for an instance of the charge state cvParam inside a precursor tag. Return true if one is found. False otherwise
19
20
  #
data/bin/interprophet.rb CHANGED
@@ -13,7 +13,7 @@ require 'protk/prophet_tool'
13
13
 
14
14
  # Setup specific command-line options for this tool. Other options are inherited from ProphetTool
15
15
  #
16
- prophet_tool=ProphetTool.new([:explicit_output])
16
+ prophet_tool=ProphetTool.new([:explicit_output,:over_write,:prefix_suffix])
17
17
  prophet_tool.option_parser.banner = "Run InterProphet on a set of pep.xml input files.\n\nUsage: interprophet.rb [options] file1.pep.xml file2.pep.xml ..."
18
18
  prophet_tool.options.output_suffix="_iproph"
19
19
 
@@ -67,7 +67,7 @@ end
67
67
  if ( !Pathname.new(output_file).exist? || prophet_tool.over_write )
68
68
 
69
69
  cmd="#{genv.interprophetparser} #{prophet_tool.options.no_nss} #{prophet_tool.options.no_nrs} #{prophet_tool.options.no_nse} #{prophet_tool.options.no_nsi} #{prophet_tool.options.no_nsm}"
70
- cmd << " MINPROB=#{min_prob}" if ( prophet_tool.options.min_prob !="" )
70
+ cmd << " MINPROB=#{prophet_tool.min_prob}" if ( prophet_tool.min_prob !="" )
71
71
 
72
72
  inputs = ARGV.collect {|file_name|
73
73
  file_name.chomp
@@ -231,11 +231,11 @@ ARGV.each do |filename|
231
231
 
232
232
  # As a final part of the command we convert to pepxml
233
233
  if search_tool.no_pepxml
234
+ cmd << "; cp #{mzid_output_path} #{output_path}"
235
+ elsif search_tool.explicit_output
234
236
  cmd << "; #{genv.idconvert} #{mzid_output_path} --pepXML -o #{Pathname.new(mzid_output_path).dirname}"
235
237
  #Then copy the pepxml to the final output path
236
238
  cmd << "; cp #{mzid_output_path.chomp('.mzid')}.pepXML #{output_path}"
237
- elsif search_tool.explicit_output
238
- cmd << "; cp #{mzid_output_path} #{output_path}"
239
239
  end
240
240
 
241
241
 
@@ -13,7 +13,7 @@ require 'protk/prophet_tool'
13
13
 
14
14
  # Setup specific command-line options for this tool. Other options are inherited from ProphetTool
15
15
  #
16
- prophet_tool=ProphetTool.new([:glyco,:explicit_output,:maldi])
16
+ prophet_tool=ProphetTool.new([:glyco,:explicit_output,:over_write,:maldi,:prefix_suffix])
17
17
  prophet_tool.option_parser.banner = "Run PeptideProphet on a set of pep.xml input files.\n\nUsage: peptide_prophet.rb [options] file1.pep.xml file2.pep.xml ..."
18
18
  prophet_tool.options.output_suffix="_pproph"
19
19
 
@@ -256,7 +256,8 @@ else
256
256
 
257
257
  end
258
258
  cmd=generate_command(genv,prophet_tool,inputs,output_file_name,database,engine)
259
-
259
+ puts cmd
260
+ %x['ls']
260
261
  run_peptide_prophet(genv,prophet_tool,cmd,output_file_name,engine)
261
262
 
262
263
  end
@@ -71,13 +71,15 @@ spectrum_queries.each do |query|
71
71
  search_engine=""
72
72
  search_score_names=top_search_hit.find("./#{pepxml_ns_prefix}search_score/@name",pepxml_ns).collect {|s| s.to_s}
73
73
 
74
- if ( search_score_names.length==2 && search_score_names.grep(/^name.*=.*pvalue/))
75
- search_engine="omssa"
76
- elsif ( search_score_names.grep(/^name.*=.*ionscore/))
77
- search_engine="mascot"
78
- elsif ( search_score_names.grep(/^name.*=.*hyperscore/) )
79
- search_engine="x!tandem"
80
- end
74
+ search_engine=query.parent.attributes['search_engine']
75
+
76
+ # if ( search_score_names.length==2 && search_score_names.grep(/^name.*=.*pvalue/))
77
+ # search_engine="omssa"
78
+ # elsif ( search_score_names.grep(/^name.*=.*ionscore/))
79
+ # search_engine="mascot"
80
+ # elsif ( search_score_names.grep(/^name.*=.*hyperscore/) )
81
+ # search_engine="x!tandem"
82
+ # end
81
83
 
82
84
 
83
85
  pp_result=top_search_hit.find("./#{pepxml_ns_prefix}analysis_result/#{pepxml_ns_prefix}peptideprophet_result/@probability",pepxml_ns)
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  # Setup specific command-line options for this tool. Other options are inherited from ProphetTool
28
28
  #
29
- prophet_tool=ProphetTool.new([:glyco,:explicit_output])
29
+ prophet_tool=ProphetTool.new([:glyco,:explicit_output,:over_write,:prefix_suffix])
30
30
  prophet_tool.option_parser.banner = "Run ProteinProphet on a set of pep.xml input files.\n\nUsage: protein_prophet.rb [options] file1.pep.xml file2.pep.xml ..."
31
31
  prophet_tool.options.output_suffix="_protproph"
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: