ms-msrun 0.3.2 → 0.3.3

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/History CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.3.3 / 2011-01-27
2
+ * bug fixes on plms1
3
+
1
4
  == 0.3.1 / 2011-01-26
2
5
  * (since 0.1.1): added support for mzML and parsing zlib compressed spectra
3
6
  * added read/write for the .plms1 filetype, an ad hoc binary filetype for ms1 data
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -14,7 +14,7 @@ module Ms
14
14
 
15
15
  unless scans
16
16
  scans = []
17
- ms.each(:ms_level => 1, :precursor => false) do |scan|
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 = times
34
+ plms1.scan_numbers = scan_numbers
35
35
  plms1.spectra = spectra
36
36
  plms1
37
37
  end
@@ -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
- - 2
9
- version: 0.3.2
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-26 00:00:00 -07:00
17
+ date: 2011-01-27 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency