mspire 0.10.7.2 → 0.10.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c3d6fd2ccef3ca83f802127523c4518115d55d3
4
- data.tar.gz: 99910a0e278af6f0d096c3fb9f06902977681e3b
3
+ metadata.gz: 8df274039d16839cbdf35f56f1e7ecf32ca47bac
4
+ data.tar.gz: b5c1d079ff977beca71a96b6ae104eabca0c0d09
5
5
  SHA512:
6
- metadata.gz: b778a89bbe03de755756a267b772006aa26ced9780384519b194edbb40a2efb54055137e3f5ac81a10044a5d8f53d12ad514b17599d7923cb4bb85b78dc5cf6f
7
- data.tar.gz: 0692eef670311afebe4549e8d551ec621c0f5dcc366b7a87e4fa71e129fd165a32fd28293b11e071e99bb7b74787cb9cd4914ba61a77b3d0485f204c05ffe875
6
+ metadata.gz: 8441a8f5be0b660115d2da8e8c1b738cfecdc3f03aa2611032cf7c346288c25028e47802bc04566d4adb39abd09bbebabd6a37cdc81cd83ef91d7bc28ffd295a
7
+ data.tar.gz: d9f25609b05e3629d04db3b4906f2323cf1988bb1aa42034f8ba7d2c8f2dba167670d0b9a0b435b15920cd8e91192acdf6668d3379ae41e1c6e1a3fb94ac0341
@@ -251,7 +251,7 @@ module Mspire
251
251
  # @raise [ScanNumbersNotFound] if spectra exist but scan numbers were not
252
252
  # found
253
253
  def spectrum_from_scan_num(scan_num)
254
- @scan_to_index ||= @index_list[0].create_scan_index
254
+ @scan_to_index ||= @index_list[0].create_scan_to_index
255
255
  raise ScanNumbersNotUnique if @scan_to_index == false
256
256
  raise ScanNumbersNotFound if @scan_to_index == nil
257
257
  spectrum(@scan_to_index[scan_num])
@@ -1,3 +1,3 @@
1
1
  module Mspire
2
- VERSION = "0.10.7.2"
2
+ VERSION = "0.10.7.3"
3
3
  end
@@ -9,7 +9,6 @@ def mascot_charge(val)
9
9
  "#{val}#{val > 0 ? '+' : '-'}"
10
10
  end
11
11
 
12
-
13
12
  opt = {
14
13
  filter_zero_intensity: true,
15
14
  retention_times: true,
@@ -37,7 +36,7 @@ ARGV.each do |file|
37
36
 
38
37
  File.open(outfile, 'w') do |out|
39
38
  Mspire::Mzml.foreach(file).with_index do |spectrum,i|
40
- next unless spectrum.ms_level > 1
39
+ next unless spectrum.ms_level > 1 && spectrum.mzs.size > 0
41
40
  out.puts "BEGIN IONS"
42
41
  # id, spectrumid,
43
42
  rt = spectrum.retention_time
@@ -294,6 +294,12 @@ describe Mspire::Mzml do
294
294
  spectrum.mzs[2].should be_within(1e-10).of(164.32693481445312)
295
295
  end
296
296
 
297
+ specify '#spectrum_from_scan_num returns a spectrum given a scan number' do
298
+ # only for files with scan numbers embedded in id with "...scan=<scan_num>..."
299
+ spectrum = @mzml.spectrum_from_scan_num(2)
300
+ expect(spectrum.id).to match(/scan=2/)
301
+ end
302
+
297
303
  specify '#spectrum always returns spectrum with data_processing object (uses default if none given)' do
298
304
  @mzml.spectrum(1).data_processing.should be_a(Mspire::Mzml::DataProcessing)
299
305
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mspire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7.2
4
+ version: 0.10.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John T. Prince
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-05 00:00:00.000000000 Z
12
+ date: 2014-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri