mspire 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +60 -0
- data/Rakefile +16 -4
- data/VERSION +1 -1
- data/lib/mspire/imzml/writer/commandline.rb +1 -1
- data/lib/mspire/imzml/writer.rb +20 -1
- data/lib/mspire/mzml/cv.rb +3 -4
- data/obo/ims.obo +2 -4
- data/obo/ms.obo +708 -56
- data/obo/unit.obo +1 -1
- data/spec/mspire/imzml/writer_spec.rb +30 -0
- data/spec/testfiles/mspire/mzml/1_BB7_SIM_478.5.CHECK.ibd +0 -0
- data/spec/testfiles/mspire/mzml/1_BB7_SIM_478.5.CHECK.imzML +3975 -0
- data/spec/testfiles/mspire/mzml/mspire_simulated.MSn.check.mzML +2 -2
- metadata +6 -4
- data/README.rdoc +0 -24
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
|
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
|
Binary file
|