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 +4 -4
- data/lib/mspire/mzml.rb +1 -1
- data/lib/mspire/version.rb +1 -1
- data/script/mzml_to_mgf.rb +1 -2
- data/spec/mspire/mzml_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df274039d16839cbdf35f56f1e7ecf32ca47bac
|
4
|
+
data.tar.gz: b5c1d079ff977beca71a96b6ae104eabca0c0d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8441a8f5be0b660115d2da8e8c1b738cfecdc3f03aa2611032cf7c346288c25028e47802bc04566d4adb39abd09bbebabd6a37cdc81cd83ef91d7bc28ffd295a
|
7
|
+
data.tar.gz: d9f25609b05e3629d04db3b4906f2323cf1988bb1aa42034f8ba7d2c8f2dba167670d0b9a0b435b15920cd8e91192acdf6668d3379ae41e1c6e1a3fb94ac0341
|
data/lib/mspire/mzml.rb
CHANGED
@@ -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].
|
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])
|
data/lib/mspire/version.rb
CHANGED
data/script/mzml_to_mgf.rb
CHANGED
@@ -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
|
data/spec/mspire/mzml_spec.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|