lib/ms/sequest/srf/search.rb in ms-sequest-0.1.2 vs lib/ms/sequest/srf/search.rb in ms-sequest-0.2.1

- old
+ new

@@ -2,11 +2,11 @@ require 'ms/sequest/srf' require 'ms/mass' # These are for outputting formats used in MS/MS Search engines -module Ms +module MS module Sequest class Srf module Search # Writes an MGF file to given filename or base_name + '.mgf' if no # filename given. @@ -19,11 +19,11 @@ filename = if filename ; filename else base_name + '.mgf' end - h_plus = Ms::Mass::MASCOT_H_PLUS + h_plus = MS::Mass::H_PLUS File.open(filename, 'wb') do |out| dta_files.zip(index) do |dta, i_ar| chrg = dta.charge out.print "BEGIN IONS\n" out.print "TITLE=#{[base_name, *i_ar].push('dta').join('.')}\n" @@ -102,15 +102,15 @@ include Search end # Srf end # Sequest -end # Ms +end # MS require 'optparse' -module Ms::Sequest::Srf::Search +module MS::Sequest::Srf::Search def self.commandline(argv, progname=$0) opt = { :format => 'mgf' } opts = OptionParser.new do |op| @@ -143,10 +143,10 @@ base when 'mgf' base << '.' << format end end - srf = Ms::Sequest::Srf.new(srf_file, :link_protein_hits => false, :filter_by_precursor_mass_tolerance => false, :read_pephits => false ) + srf = MS::Sequest::Srf.new(srf_file, :link_protein_hits => false, :filter_by_precursor_mass_tolerance => false, :read_pephits => false ) # options just speed up reading since we don't need .out info anyway case format when 'mgf' srf.to_mgf(newfile) when 'dta'