ms-core 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,3 +1,8 @@
1
+ == version 0.0.6
2
+
3
+ * added cv_param (CvParam) object
4
+ * added spectrum documentation
5
+
1
6
  == version 0.0.3
2
7
 
3
8
  * switched specs to spec/more
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/lib/cv_param.rb ADDED
@@ -0,0 +1,16 @@
1
+
2
+ # Controlled vocabulary
3
+ class CvParam
4
+ attr_accessor :cv_ref, :accession, :name, :value
5
+
6
+ def initialize(cv_ref, accession, name, value=nil)
7
+ (@cv_ref, @accession, @name, @value) = [cv_ref, accession, name, value]
8
+ end
9
+
10
+ def to_xml(xml, name=:cvParam)
11
+ hash_to_send = {:cvRef => @cvref, :accession => @accession, :name => @name}
12
+ hash_to_send[:value] = @value if @value
13
+ xml.send(name, hash_to_send)
14
+ end
15
+ end
16
+
data/lib/ms/spectrum.rb CHANGED
@@ -36,6 +36,7 @@ module Ms
36
36
  [@data[0], @data[1]]
37
37
  end
38
38
 
39
+ # retrieve an m/z and intensity doublet at that index
39
40
  def [](array_index)
40
41
  [mzs[array_index], intensities[array_index]]
41
42
  end
data/spec/ms/calc_spec.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + "/../spec_helper.rb"
1
+ require "spec_helper.rb"
2
2
  require 'ms/calc'
3
3
 
4
4
  describe 'Ms::Calc - calculating ppm tolerances' do
data/spec/ms/data_spec.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + "/../spec_helper.rb"
1
+ require "spec_helper.rb"
2
2
  require 'ms/data'
3
3
 
4
4
  describe "Data.new" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + "/../../spec_helper.rb"
1
+ require "spec_helper.rb"
2
2
  require 'ms/support/binary_search'
3
3
 
4
4
  describe 'binary searching' do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Simon Chiang
@@ -15,13 +15,14 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-04 00:00:00 -06:00
18
+ date: 2011-02-09 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: molecules
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
@@ -36,6 +37,7 @@ dependencies:
36
37
  name: spec-more
37
38
  prerelease: false
38
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
39
41
  requirements:
40
42
  - - ">="
41
43
  - !ruby/object:Gem::Version
@@ -53,12 +55,12 @@ extensions: []
53
55
  extra_rdoc_files:
54
56
  - README.rdoc
55
57
  files:
56
- - .gitignore
57
58
  - History
58
59
  - MIT-LICENSE
59
60
  - README.rdoc
60
61
  - Rakefile
61
62
  - VERSION
63
+ - lib/cv_param.rb
62
64
  - lib/ms.rb
63
65
  - lib/ms/calc.rb
64
66
  - lib/ms/data.rb
@@ -84,11 +86,12 @@ homepage: http://github.com/jtprince/ms-core/rdoc
84
86
  licenses: []
85
87
 
86
88
  post_install_message:
87
- rdoc_options:
88
- - --charset=UTF-8
89
+ rdoc_options: []
90
+
89
91
  require_paths:
90
92
  - lib
91
93
  required_ruby_version: !ruby/object:Gem::Requirement
94
+ none: false
92
95
  requirements:
93
96
  - - ">="
94
97
  - !ruby/object:Gem::Version
@@ -96,6 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
99
  - 0
97
100
  version: "0"
98
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
99
103
  requirements:
100
104
  - - ">="
101
105
  - !ruby/object:Gem::Version
@@ -105,12 +109,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
109
  requirements: []
106
110
 
107
111
  rubyforge_project:
108
- rubygems_version: 1.3.6
112
+ rubygems_version: 1.3.7
109
113
  signing_key:
110
114
  specification_version: 3
111
115
  summary: basic, shared functionality for mspire libraries
112
116
  test_files:
113
- - spec/ms/support/binary_search_spec.rb
114
117
  - spec/ms/calc_spec.rb
115
118
  - spec/ms/data_spec.rb
119
+ - spec/ms/support/binary_search_spec.rb
116
120
  - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- .DS_Store
2
- pkg/
3
- rdoc/
4
- backup/
5
- config/
6
- data/
7
- doc/
8
- *.swp
9
- *.gemspec