Sha256: 0016cb422def530ba9649061f0379727b79b27435cc0a11f14f09585a271665a
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
require 'test/unit' class TestMzXML2LMat < Test::Unit::TestCase ROOT_DIR = File.join(File.dirname(__FILE__), '..') def initialize(arg) super(arg) @tfiles = File.dirname(File.expand_path(__FILE__)) + '/tfiles/' @mzxml = @tfiles + "opd1/twenty_scans.mzXML" @mzxml_big = @tfiles + "yeast_gly_mzXML/000.mzXML" @cmd = "ruby -I #{File.join(ROOT_DIR, 'lib')} -S #{File.join(ROOT_DIR, 'bin', 'mzxml_to_lmat.rb')} " @ans_lmata = @tfiles + "opd1/twenty_scans_answ.lmata" @ans_lmat = @tfiles + "opd1/twenty_scans_answ.lmat" end def test_basic_ascii cmd = "#{@cmd} #{@mzxml} --ascii" puts `#{cmd}` newfile = @mzxml.sub(".mzXML", ".lmata") assert(File.exist?(newfile), "#{newfile} exists") assert(IO.read(@ans_lmata), IO.read(newfile)) File.unlink(newfile) end def test_basic_binary cmd = "#{@cmd} #{@mzxml}" puts `#{cmd}` newfile = @mzxml.sub(".mzXML", ".lmat") assert(File.exist?(newfile), "#{newfile} exists") assert(IO.read(@ans_lmat), IO.read(newfile)) File.unlink(newfile) end end
Version data entries
6 entries across 6 versions & 1 rubygems