mspire 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/obo/unit.obo CHANGED
@@ -332,7 +332,7 @@ created_by: george gkoutos
332
332
  [Term]
333
333
  id: UO:0000035
334
334
  name: month
335
- def: "A time unit which is approximately equal to the length of time of one of cycle of the moon's phases which is science is taken to be equal to 30 days." [Wikipedia:Wikipedia "http://www.wikipedia.org/"]
335
+ def: "A time unit which is approximately equal to the length of time of one of cycle of the moon's phases which in science is taken to be equal to 30 days." [Wikipedia:Wikipedia "http://www.wikipedia.org/"]
336
336
  subset: unit_slim
337
337
  is_a: UO:0000003 ! time unit
338
338
  created_by: george gkoutos
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  require 'mspire/imzml/writer'
4
+ require 'mspire/imzml/writer/commandline'
4
5
  require 'mspire/spectrum'
5
6
 
6
7
  describe Mspire::Imzml::Writer do
@@ -97,5 +98,34 @@ describe Mspire::Imzml::Writer do
97
98
  File.unlink(write_to) if File.exist?(write_to)
98
99
  end
99
100
 
101
+ describe 'full conversion of a file' do
102
+
103
+ before do
104
+ @file = TESTFILES + "/mspire/mzml/1_BB7_SIM_478.5.mzML"
105
+ end
106
+
107
+ # reads file and removes parts that change run to run
108
+ def sanitize(file)
109
+ reject = ['xmlns="http://psi.hupo.org/ms/mzml', 'universally unique identifier', 'ibd SHA-1']
110
+ IO.readlines(file).reject do |line|
111
+ reject.any? {|fragment| line.include?(fragment) }
112
+ end.join
113
+ end
114
+
115
+ it 'converts sim files' do
116
+ Mspire::Imzml::Writer::Commandline.run([@file, @file, "--max-dimensions-microns", "72x2", "--max-dimensions-pixels", "72x2"])
117
+ # checking ibd is hard, reserved for above specs
118
+ imzml_check = TESTFILES + "/mspire/mzml/1_BB7_SIM_478.5.CHECK.imzML"
119
+ ibd_check = TESTFILES + "/mspire/mzml/1_BB7_SIM_478.5.CHECK.ibd"
120
+ # really just frozen for now until I inspect it more critically
121
+ imzml = imzml_check.sub('.CHECK','')
122
+ ibd = ibd_check.sub('.CHECK','')
123
+ File.exist?(ibd).should be_true
124
+ File.exist?(imzml).should be_true
125
+ sanitize(imzml_check).should == sanitize(imzml)
126
+ File.unlink(ibd) ; File.unlink(imzml)
127
+ end
128
+ end
129
+
100
130
 
101
131
  end