ms-msrun 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History +3 -0
- data/VERSION +1 -1
- data/lib/ms/msrun/plms1.rb +2 -2
- data/spec/ms/msrun/plms1_spec.rb +13 -0
- metadata +3 -3
data/History
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/lib/ms/msrun/plms1.rb
CHANGED
@@ -14,7 +14,7 @@ module Ms
|
|
14
14
|
|
15
15
|
unless scans
|
16
16
|
scans = []
|
17
|
-
|
17
|
+
self.each(:ms_level => 1, :precursor => false) do |scan|
|
18
18
|
scans << scan
|
19
19
|
end
|
20
20
|
end
|
@@ -31,7 +31,7 @@ module Ms
|
|
31
31
|
end
|
32
32
|
plms1 = Plms1.new
|
33
33
|
plms1.times = times
|
34
|
-
plms1.scan_numbers =
|
34
|
+
plms1.scan_numbers = scan_numbers
|
35
35
|
plms1.spectra = spectra
|
36
36
|
plms1
|
37
37
|
end
|
data/spec/ms/msrun/plms1_spec.rb
CHANGED
@@ -38,4 +38,17 @@ describe 'plms1 - Prince Lab MS 1 specification' do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
it 'converts an Ms::Msrun object into a plms1 object' do
|
42
|
+
plms1_obj = Ms::Msrun.open(TESTFILES + '/opd1/000.v2.1.mzXML') do |ms|
|
43
|
+
ms.to_plms1
|
44
|
+
end
|
45
|
+
ok plms1_obj.is_a?(Ms::Msrun::Plms1)
|
46
|
+
plms1_obj.scan_numbers.enums [1, 5, 9, 13, 17]
|
47
|
+
plms1_obj.times.enums [0.44, 5.15, 10.69, 16.4, 22.37]
|
48
|
+
# below is just frozen, not checked for accuracy but it does look
|
49
|
+
# reasonable
|
50
|
+
plms1_obj.spectra.first.first[0,4].enums [300.50518798828125, 301.43011474609375, 302.09600830078125, 302.87347412109375]
|
51
|
+
plms1_obj.spectra.last.last[0,4].enums [7.0, 77503.0, 109867.0, 155067.0]
|
52
|
+
end
|
53
|
+
|
41
54
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 3
|
9
|
+
version: 0.3.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John T. Prince
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-27 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|