mspire-lipidomics 0.1.9 → 0.1.10
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/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/mspire/lipid/modification.rb +2 -1
- data/mspire-lipidomics.gemspec +4 -4
- data/script/find_nearest_lipid.rb +8 -2
- metadata +3 -3
data/Rakefile
CHANGED
|
@@ -13,7 +13,7 @@ Jeweler::Tasks.new do |gem|
|
|
|
13
13
|
gem.description = %Q{does lipidomics}
|
|
14
14
|
gem.email = "jtprince@gmail.com"
|
|
15
15
|
gem.authors = ["John T. Prince"]
|
|
16
|
-
gem.add_dependency "mspire", "~> 0.8.
|
|
16
|
+
gem.add_dependency "mspire", "~> 0.8.4"
|
|
17
17
|
gem.add_development_dependency "rubabel", ">= 0.1.6"
|
|
18
18
|
gem.add_development_dependency "rspec", "~> 2.3.0"
|
|
19
19
|
gem.add_development_dependency "jeweler", "~> 1.6.4"
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.10
|
|
@@ -75,7 +75,8 @@ module Mspire
|
|
|
75
75
|
# if no mass or formula is given then it searches command mods for the name
|
|
76
76
|
# @param [Symbol] name the name of the mod
|
|
77
77
|
# A number of opts are expected if they are not found in the FORMULAS,
|
|
78
|
-
# CHARGE, or MASSDIFFS hashes
|
|
78
|
+
# CHARGE, or MASSDIFFS hashes. However, the massdiff will be inferred
|
|
79
|
+
# from the formula if it is not given:
|
|
79
80
|
#
|
|
80
81
|
# attributes:
|
|
81
82
|
# :formula = the chemical formula, lipidmaps style ("C2H4BrO") or
|
data/mspire-lipidomics.gemspec
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "mspire-lipidomics"
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.10"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["John T. Prince"]
|
|
@@ -63,20 +63,20 @@ Gem::Specification.new do |s|
|
|
|
63
63
|
s.specification_version = 3
|
|
64
64
|
|
|
65
65
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
66
|
-
s.add_runtime_dependency(%q<mspire>, ["~> 0.8.
|
|
66
|
+
s.add_runtime_dependency(%q<mspire>, ["~> 0.8.4"])
|
|
67
67
|
s.add_development_dependency(%q<rubabel>, [">= 0.1.6"])
|
|
68
68
|
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
|
69
69
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
70
70
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
|
71
71
|
else
|
|
72
|
-
s.add_dependency(%q<mspire>, ["~> 0.8.
|
|
72
|
+
s.add_dependency(%q<mspire>, ["~> 0.8.4"])
|
|
73
73
|
s.add_dependency(%q<rubabel>, [">= 0.1.6"])
|
|
74
74
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
|
75
75
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
76
76
|
s.add_dependency(%q<rcov>, [">= 0"])
|
|
77
77
|
end
|
|
78
78
|
else
|
|
79
|
-
s.add_dependency(%q<mspire>, ["~> 0.8.
|
|
79
|
+
s.add_dependency(%q<mspire>, ["~> 0.8.4"])
|
|
80
80
|
s.add_dependency(%q<rubabel>, [">= 0.1.6"])
|
|
81
81
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
|
82
82
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
@@ -14,6 +14,7 @@ parser = Trollop::Parser.new do
|
|
|
14
14
|
opt :top_n, "how many closest ions to print", :default => 3
|
|
15
15
|
banner ""
|
|
16
16
|
text "modifications: (at least 1 charged mod is required)"
|
|
17
|
+
#opt :newmod, "<name>:<formula>:<charge>:<L/G>:<#occurences> L/G=loss or gain", :type => :string, :multi => true
|
|
17
18
|
opt :lithium, "search for i down to 1 lithium adducts", :default => 0
|
|
18
19
|
opt :sodium, "search for i down to 1 sodium adducts", :default => 0
|
|
19
20
|
opt :ammonium, "search for i down to 1 ammonium adducts", :default => 0
|
|
@@ -22,6 +23,8 @@ parser = Trollop::Parser.new do
|
|
|
22
23
|
opt :proton_gain, "search for i down to 1 proton additions", :default => 0
|
|
23
24
|
opt :proton_loss, "search for i down to 1 proton losses", :default => 0
|
|
24
25
|
opt :water_loss, "if used, *all* mods are also considered with i down to 0 water losses", :default => 0
|
|
26
|
+
text ""
|
|
27
|
+
text "other:"
|
|
25
28
|
opt :textfile, "a text file with m/z values, one per line", :type => String
|
|
26
29
|
opt :lower_bound, "use lower bound searching (requires m/z's to be in sorted order)"
|
|
27
30
|
opt :sort, "sorts the m/z's"
|
|
@@ -35,6 +38,7 @@ if ARGV.size == 0
|
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
CHARGED_MODS = [:lithium, :sodium, :ammonium, :proton_gain, :proton_loss]
|
|
41
|
+
UNCHARGED_MODS = [:water_loss, :carbon_dioxide_loss, :ammonia_loss]
|
|
38
42
|
|
|
39
43
|
unless CHARGED_MODS.any? {|key| opts[key] > 0 }
|
|
40
44
|
puts "*" * 78
|
|
@@ -81,8 +85,10 @@ lipids.each do |lipid|
|
|
|
81
85
|
if opts[key] > 0
|
|
82
86
|
opts[key].downto(1) do |num_charge_mod|
|
|
83
87
|
mods_to_use = [mods[key]] * num_charge_mod
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
UNCHARGED_MODS.each do |umod|
|
|
89
|
+
opts[umod].downto(0) do |i|
|
|
90
|
+
ions << Mspire::Lipid::Ion.new(lipid, mods_to_use + ([mods[:umod]]*i))
|
|
91
|
+
end
|
|
86
92
|
end
|
|
87
93
|
end
|
|
88
94
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mspire-lipidomics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.8.
|
|
21
|
+
version: 0.8.4
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ~>
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.8.
|
|
29
|
+
version: 0.8.4
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: rubabel
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|