Sha256: 22356c9aaebdca1cd28dc6421270d42bfaa3e3dad5d096fb7ad1666718259cc6
Contents?: true
Size: 907 Bytes
Versions: 1
Compression:
Stored size: 907 Bytes
Contents
#!/usr/bin/ruby require 'rubygems' require 'optparse' require 'ms/sequest/srf/search' opt = { :format => 'mgf' } opts = OptionParser.new do |op| op.banner = "usage: #{File.basename(__FILE__)} <file>.srf" op.separator "outputs: <file>.mgf" op.on("-f", "--format <mgf|dat>", "the output format (default: #{opt[:format]})") {|v| opt[:format] = v } end if ARGV.size == 0 puts opts exit end format = opt[:format] ARGV.each do |srf_file| base = srf_file.sub(/\.srf$/i, '') newfile = case format when 'dta' base when 'mgf' base << '.' << format end 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' srf.to_dta_files(newfile) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ms-sequest-0.0.13 | bin/srf_to_search.rb |