lib/validator/cmdline.rb in mspire-0.4.4 vs lib/validator/cmdline.rb in mspire-0.4.5

- old
+ new

@@ -39,11 +39,11 @@ }, :decoy => { :hits_together => true, :decoy_on_match => true, - :decoy_to_target_ratio => 1.0, + :pi_zero => 1.0, }, :bad_aa => { :false_if_found => true, :bkg => 0.0, @@ -59,26 +59,23 @@ :proteins_expected => true, }, :ties => true, } COMMAND_LINE = { - :decoy => ["--decoy /REGEXP/|FILENAME[,DTR,DOM]", Array, "REGEXP for decoy proteins (catenated searches) or a", + :decoy => ["--decoy /REGEXP/|FILENAME[,PI0,DOM]", Array, "REGEXP for decoy proteins (catenated searches) or a", "FILENAME of separate search on decoys.", "All regular expressions must be surrounded by '/'", "(no extended options [trailing modifiers]).", "e.g., a run using concatenated reversed proteins that", "includes 'REVERSE' in the fasta heading:", " --decoy /REVERSE/", "Anything fancier should be quoted:", " --decoy '/^\\s*REVERSE/'", "If decoys proteins were searched in a separate file,", "then give the FILENAME (e.g., --decoy decoy.srg)", - "DTR = Decoy to Target Ratio (default: #{DEFAULTS[:decoy][:decoy_to_target_ratio]})", + "PI0 = Incorrect Targets to Decoy Ratio (default: #{DEFAULTS[:decoy][:pi_zero]})", "DOM = *true/false, decoy on match",], - :decoy_pi_zero => ["--decoy_pi_zero", "uses sequest Xcorrs to estimate the", - "percentage of incorrect target hits.", - "This over-rides any given DTR (above)"], :tps => ["--tps <fasta>", "for a completely defined sample, this is the", "fasta file containing the true protein hits"], # may require digestion: :fasta => ["--fasta FASTA", "fasta file for phobius transmembrane", "(needed if PEPS options is not false)"], @@ -157,10 +154,10 @@ else # assume that it is a filename raise ArgumentError, "File does not exist: #{first_arg}\n(was this supposed to be a regular expression? if so, should be given: /#{first_arg}/)" unless File.exist?(first_arg) first_arg end - val_opts[:decoy_to_target_ratio] = (ar[1] || DEFAULTS[:decoy][:decoy_to_target_ratio]).to_f + val_opts[:pi_zero] = (ar[1] || DEFAULTS[:decoy][:pi_zero]).to_f val_opts[:decoy_on_match] = self.boolean(ar[2], DEFAULTS[:decoy][:decoy_on_match]) myargs.push(val_opts) opts[:validators].push(myargs) }, :fasta => lambda {|arg, opts|