Sha256: f8c5d39d501554c178c61614611ac8eb50d560ff150f4b905929b7b69a3c17bb
Contents?: true
Size: 1.35 KB
Versions: 4
Compression:
Stored size: 1.35 KB
Contents
#!/usr/bin/ruby -w require 'optparse' require 'spec/mzxml' require 'fileutils' progname = File.basename(__FILE__) opt = {} opts = OptionParser.new do |op| op.banner = "usage: #{progname} [OPTIONS] <file>.RAW ..." op.separator "" op.on("-p", "--profile", "uses profile output instead of centroid (default)") {|v| opt[:profile] = v} end opts.parse! if ARGV.size == 0 puts opts exit end converter = Spec::MzXML.find_mzxml_converter if converter $stderr.puts "using #{converter} to convert files" else puts "cannot find [#{Spec::MzXML::Potential_mzxml_converters.join(', ')}] in the paths:" puts ENV['PATH'].split(/[:;]/).join(", ") abort end files = ARGV.to_a files.each do |file| puts "******************************************" puts "Converting: #{file}" if converter =~ /readw/ centroid_or_profile = 'c' if opt[:profile] centroid_or_profile = 'p' end outfile = file.sub(/\.RAW$/i, '.mzXML') cmd = "#{converter} #{file} #{centroid_or_profile} #{outfile}" puts "Performing: '#{cmd}'" puts `#{cmd}` else ## t2x only outputs in cwd! Dir.chdir(File.dirname(file)) do |dir| puts "Performing: '#{cmd}' in #{dir}" puts `#{cmd}` system "#{converter} #{File.basename(file)}" end end puts "******************************************" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mspire-0.2.0 | bin/raw_to_mzXML.rb |
mspire-0.2.1 | bin/raw_to_mzXML.rb |
mspire-0.2.2 | bin/raw_to_mzXML.rb |
mspire-0.2.4 | bin/raw_to_mzXML.rb |