mascot-mgf 0.2.2 → 0.2.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.
@@ -2,7 +2,7 @@ module Mascot
2
2
  class MGF
3
3
  class Query
4
4
 
5
- attr_accessor :ions, :title, :pepmass, :entry, :charge
5
+ attr_accessor :ions, :title, :pepmass, :entry, :charge, :rtinseconds
6
6
 
7
7
  # Initializes a spectrum entry from a MGF formatted string or from an Array
8
8
  # that is the newline split of MGF 'BEGIN IONS\n...\nEND IONS'
@@ -15,6 +15,7 @@ module Mascot
15
15
  @atts = {}
16
16
  @ions = []
17
17
  @charge = nil
18
+ @rtinseconds = nil
18
19
  parse(entry)
19
20
  end
20
21
 
@@ -52,6 +53,8 @@ module Mascot
52
53
  @title = $2
53
54
  when "CHARGE"
54
55
  @charge = $2.to_i
56
+ when "RTINSECONDS"
57
+ @rtinseconds = $2.to_f
55
58
  else
56
59
  @atts[$1.downcase.to_sym] = $2
57
60
  end
@@ -1,5 +1,5 @@
1
1
  module Mascot
2
2
  class MGF < File
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -48,7 +48,7 @@ class TestMascotMgf < Test::Unit::TestCase
48
48
  # move cursor to tenth query
49
49
  tenth_query = mgf.query(9)
50
50
  assert_equal(tenth_query_title, tenth_query.title)
51
- assert_equal(tenth_query_rtinseconds, tenth_query_rtinseconds)
51
+ assert_equal(tenth_query_rtinseconds, tenth_query.rtinseconds)
52
52
  assert_equal(tenth_query_charge, tenth_query.charge)
53
53
  assert_equal(tenth_query_pepmass[0], tenth_query.pepmass[0])
54
54
  assert_equal(tenth_query_pepmass[1], tenth_query.pepmass[1])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mascot-mgf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-16 00:00:00.000000000 Z
12
+ date: 2012-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70321602593720 !ruby/object:Gem::Requirement
16
+ requirement: &70230942814940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70321602593720
24
+ version_requirements: *70230942814940
25
25
  description: A parser for Mascot Generic Format (MGF) files
26
26
  email:
27
27
  - delagoya@gmail.com
@@ -57,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  segments:
59
59
  - 0
60
- hash: -3179264156540033479
60
+ hash: 4477718745204745076
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  segments:
68
68
  - 0
69
- hash: -3179264156540033479
69
+ hash: 4477718745204745076
70
70
  requirements: []
71
71
  rubyforge_project:
72
72
  rubygems_version: 1.8.11