mspire 0.8.6.1 → 0.8.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +7 -8
- data/VERSION +1 -1
- data/lib/mspire/ident/peptide/db/creator.rb +38 -19
- data/lib/mspire/imzml/writer.rb +3 -3
- data/lib/mspire/mzml/io_index.rb +1 -1
- data/lib/mspire/mzml/io_indexable_list.rb +0 -1
- data/lib/mspire/mzml.rb +1 -1
- data/script/accession_quantifier.rb +90 -31
- data/script/peptide_hit_qvalues_to_spectral_counts_table.rb +1 -0
- data/spec/mspire/ident/peptide/db/creator_spec.rb +2 -2
- data/spec/mspire/mzml_spec.rb +3 -1
- metadata +16 -32
data/Rakefile
CHANGED
@@ -13,19 +13,18 @@ Jeweler::Tasks.new do |gem|
|
|
13
13
|
gem.description = %Q{mass spectrometry proteomics, lipidomics, and tools, a rewrite of mspire, merging of ms-* gems}
|
14
14
|
gem.email = "jtprince@gmail.com"
|
15
15
|
gem.authors = ["John T. Prince", "Simon Chiang"]
|
16
|
-
gem.add_dependency "nokogiri", "~> 1.5"
|
16
|
+
gem.add_dependency "nokogiri", "~> 1.5.9"
|
17
17
|
gem.add_dependency "bsearch", ">= 1.5.0"
|
18
|
-
gem.add_dependency "andand", ">= 1.3.
|
19
|
-
gem.add_dependency "obo", ">= 0.1.
|
20
|
-
gem.add_dependency "builder", "~> 3.
|
21
|
-
gem.add_dependency "bio", "~> 1.4.
|
18
|
+
gem.add_dependency "andand", ">= 1.3.3"
|
19
|
+
gem.add_dependency "obo", ">= 0.1.3"
|
20
|
+
gem.add_dependency "builder", "~> 3.2.0"
|
21
|
+
gem.add_dependency "bio", "~> 1.4.3"
|
22
22
|
gem.add_dependency "trollop", "~> 2.0.0"
|
23
|
-
gem.add_dependency "uuid", ">= 2.3.5"
|
24
23
|
# this should be a real dependency, but need to document getting this
|
25
24
|
# working on windows first!
|
26
25
|
gem.add_development_dependency "fftw3", "~> 0.3"
|
27
|
-
gem.add_development_dependency "rspec", "~> 2.
|
28
|
-
gem.add_development_dependency "jeweler", "~> 1.
|
26
|
+
gem.add_development_dependency "rspec", "~> 2.13"
|
27
|
+
gem.add_development_dependency "jeweler", "~> 1.8.4"
|
29
28
|
#gem.add_development_dependency "rcov", ">= 0"
|
30
29
|
end
|
31
30
|
Jeweler::RubygemsDotOrgTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.6.
|
1
|
+
0.8.6.2
|
@@ -12,20 +12,19 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
12
12
|
|
13
13
|
DEFAULT_PEPTIDE_CENTRIC_DB = {
|
14
14
|
missed_cleavages: 2,
|
15
|
-
min_length:
|
15
|
+
min_length: 5,
|
16
16
|
enzyme: Mspire::Digester[:trypsin],
|
17
17
|
remove_digestion_file: true,
|
18
18
|
cleave_initiator_methionine: true,
|
19
|
-
expand_aa:
|
20
|
-
uniprot: true
|
19
|
+
expand_aa: false,
|
20
|
+
uniprot: true,
|
21
|
+
data_type: :hash,
|
21
22
|
}
|
22
23
|
|
24
|
+
# sets defaults according to DEFAULT_PEPTIDE_CENTRIC_DB
|
23
25
|
def self.cmdline(argv)
|
26
|
+
opt = DEFAULT_PEPTIDE_CENTRIC_DB.dup
|
24
27
|
|
25
|
-
opt = {
|
26
|
-
:remove_digestion_file => true,
|
27
|
-
:enzyme => Mspire::Digester[:trypsin]
|
28
|
-
}
|
29
28
|
opts = OptionParser.new do |op|
|
30
29
|
op.banner = "usage: #{File.basename($0)} <file>.fasta ..."
|
31
30
|
op.separator "output: "
|
@@ -40,11 +39,12 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
40
39
|
op.on("--missed-cleavages <#{opt[:missed_cleavages]}>", Integer, "max num of missed cleavages") {|v| opt[:missed_cleavages] = v }
|
41
40
|
op.on("--min-length <#{opt[:min_length]}>", Integer, "the minimum peptide aaseq length") {|v| opt[:min_length] = v }
|
42
41
|
op.on("--no-cleaved-methionine", "does not cleave off initiator methionine") { opt[:cleave_initiator_methionine] = false }
|
43
|
-
op.on("--
|
42
|
+
op.on("--expand-x", "enumerate all aa possibilities for 'X'", "(default is to remove these peptides)") {|v| opt[:expand_aa] = v }
|
44
43
|
op.on("--no-uniprot", "use entire protid section of fasta header", "for non-uniprot fasta files") { opt[:uniprot] = false }
|
45
|
-
op.on("--trie", "use a trie (for very large uniprot files)", "must have fast_trie gem installed") {|v| opt[:trie] = v }
|
44
|
+
#op.on("--trie", "use a trie (for very large uniprot files)", "must have fast_trie gem installed") {|v| opt[:trie] = v }
|
45
|
+
op.on("--data-type <#{opt[:data_type]}>", "hash|google_hash|trie", "need google_hash or fast_trie gem installed") {|v| opt[:data_type] = v.to_sym }
|
46
46
|
|
47
|
-
op.on("-e", "--enzyme
|
47
|
+
op.on("-e", "--enzyme <#{opt[:enzyme].name}>", "enzyme for digestion (Mspire::Digester[name])") {|v| opt[:enzyme] = Mspire::Digester[v] }
|
48
48
|
op.on("-v", "--verbose", "talk about it") { $VERBOSE = 5 }
|
49
49
|
op.on("--list-enzymes", "lists approved enzymes and exits") do
|
50
50
|
op.on("-v", "--verbose", "talk about it") { $VERBOSE = 5 }
|
@@ -101,7 +101,7 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
101
101
|
peptides.select {|pep| pep !~ letters_to_expand_re }
|
102
102
|
end
|
103
103
|
header = prot.header
|
104
|
-
id = opts[:uniprot] ? Mspire::Fasta.uniprot_id(header) : header.split(/\s
|
104
|
+
id = opts[:uniprot] ? Mspire::Fasta.uniprot_id(header) : header.split(/\s/,2).first
|
105
105
|
fh.puts( id + "\t" + peptides.join(" ") )
|
106
106
|
end
|
107
107
|
end
|
@@ -118,11 +118,11 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
118
118
|
puts "Organizing raw digestion #{digestion_file} ..." if $VERBOSE
|
119
119
|
|
120
120
|
puts "#{Time.now - start_time} sec" if $VERBOSE
|
121
|
-
hash_like = hash_like_from_digestion_file(digestion_file, opts[:min_length], opts[:
|
121
|
+
hash_like = hash_like_from_digestion_file(digestion_file, opts[:min_length], opts[:data_type])
|
122
122
|
|
123
123
|
base = digestion_file.chomp(File.extname(digestion_file))
|
124
124
|
final_outfile =
|
125
|
-
if opts[:trie
|
125
|
+
if opts[:data_type] == :trie
|
126
126
|
base + ".min_aaseq#{opts[:min_length]}"
|
127
127
|
else
|
128
128
|
base + ".min_aaseq#{opts[:min_length]}" + ".yml"
|
@@ -131,7 +131,7 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
131
131
|
start_time = Time.now
|
132
132
|
print "Writing #{hash_like.size} peptides to #{} ..." if $VERBOSE
|
133
133
|
|
134
|
-
if opts[:trie
|
134
|
+
if opts[:data_type] == :trie
|
135
135
|
trie = hash_like
|
136
136
|
trie.save(final_outfile)
|
137
137
|
else
|
@@ -159,8 +159,11 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
159
159
|
Trie.new
|
160
160
|
end
|
161
161
|
|
162
|
-
|
163
|
-
|
162
|
+
# data_type can be :hash (default), :google_hash (better memory and speed),
|
163
|
+
# or :trie (experimental/broken)
|
164
|
+
def hash_like_from_digestion_file(digestion_file, min_length, data_type=:hash)
|
165
|
+
case data_type
|
166
|
+
when :trie
|
164
167
|
trie = get_a_trie
|
165
168
|
::IO.foreach(digestion_file) do |line|
|
166
169
|
line.chomp!
|
@@ -179,8 +182,20 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
179
182
|
end
|
180
183
|
end
|
181
184
|
trie
|
182
|
-
|
183
|
-
hash =
|
185
|
+
when :hash, :google_hash
|
186
|
+
hash =
|
187
|
+
case data_type
|
188
|
+
when :hash
|
189
|
+
Hash.new
|
190
|
+
when :google_hash
|
191
|
+
require 'google_hash'
|
192
|
+
# this guy is very slow compared to ruby hash (10X slower?) but more
|
193
|
+
# memory efficient (but only ~10% or so improvement with this
|
194
|
+
# application)
|
195
|
+
GoogleHashDenseRubyToRuby.new
|
196
|
+
# still need to try Sparse one out and compare performance
|
197
|
+
#GoogleHashSparseRubyToRuby.new
|
198
|
+
end
|
184
199
|
::IO.foreach(digestion_file) do |line|
|
185
200
|
line.chomp!
|
186
201
|
(prot, *peps) = line.split(/\s+/)
|
@@ -188,7 +203,11 @@ class Mspire::Ident::Peptide::Db::Creator
|
|
188
203
|
peps.uniq!
|
189
204
|
peps.each do |pep|
|
190
205
|
if pep.size >= min_length
|
191
|
-
hash
|
206
|
+
if hash.key?(pep)
|
207
|
+
hash[pep] << prot
|
208
|
+
else
|
209
|
+
hash[pep] = [prot]
|
210
|
+
end
|
192
211
|
end
|
193
212
|
end
|
194
213
|
end
|
data/lib/mspire/imzml/writer.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
require 'nokogiri'
|
3
|
-
require '
|
3
|
+
require 'securerandom'
|
4
4
|
require 'cv'
|
5
5
|
require 'mspire/mzml'
|
6
6
|
require 'mspire/mzml/spectrum'
|
@@ -311,7 +311,7 @@ module Mspire::Imzml
|
|
311
311
|
config[:imzml_filename] = base + ".imzML"
|
312
312
|
config[:ibd_filename] = base + ".ibd"
|
313
313
|
|
314
|
-
uuid_with_hyphens =
|
314
|
+
uuid_with_hyphens = SecureRandom.uuid
|
315
315
|
config[:uuid_hyphenated] = uuid_with_hyphens
|
316
316
|
config[:uuid] = uuid_with_hyphens.gsub('-','')
|
317
317
|
|
@@ -375,7 +375,7 @@ module Mspire::Imzml
|
|
375
375
|
sourcefile_id_to_sourcefile = Hash[ source_files.group_by(&:id).map {|k,v| [k,v.first] } ]
|
376
376
|
|
377
377
|
imzml_obj = Mspire::Mzml.new do |imzml|
|
378
|
-
imzml.id =
|
378
|
+
imzml.id = SecureRandom.uuid.gsub('-','')
|
379
379
|
imzml.cvs = Mspire::Mzml::CV::DEFAULT_CVS
|
380
380
|
|
381
381
|
imzml.file_description = create_file_description(source_files, config)
|
data/lib/mspire/mzml/io_index.rb
CHANGED
data/lib/mspire/mzml.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'gnuplot'
|
3
4
|
require 'optparse'
|
4
5
|
require 'ostruct'
|
5
6
|
require 'set'
|
7
|
+
require 'array_stats'
|
6
8
|
|
7
9
|
require 'mspire/mzml'
|
8
10
|
require 'mspire/digester'
|
@@ -11,8 +13,10 @@ require 'mspire/mascot/dat'
|
|
11
13
|
|
12
14
|
class Array
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
+
alias_method :sum, :total_sum
|
17
|
+
|
18
|
+
def avg
|
19
|
+
sum / array.size
|
16
20
|
end
|
17
21
|
|
18
22
|
def weighted_mean(weights_array)
|
@@ -29,6 +33,7 @@ opt = OpenStruct.new( {
|
|
29
33
|
max_rt_after: 60,
|
30
34
|
mz_window: 0.01,
|
31
35
|
scan_id_regex: Regexp.new("(.*)"),
|
36
|
+
ions_score_cutoff: 15.0,
|
32
37
|
# the regex I use:
|
33
38
|
#scan_id_regex: Regexp.new("id_([^\\.]+)"),
|
34
39
|
} )
|
@@ -44,6 +49,7 @@ opts = OptionParser.new do |op|
|
|
44
49
|
op.on("--mz_window <#{opt.mz_window}>", Float, "(Th) window around m/z value") {|v| opt.mz_window = v }
|
45
50
|
op.on("--scan_id_regex <#{opt.scan_id_regex.source}>", "scan") {|v| opt.scan_id_regex = Regexp.new(v) }
|
46
51
|
op.on("--add-filename", "adds the filename to output files") {|v| opt.add_filename = v }
|
52
|
+
op.on("--ions-score_cutoff <#{opt.ions_score_cutoff}", Float, "minimum ions score") {|v| opt.ions_score_cutoff = v }
|
47
53
|
end
|
48
54
|
opts.parse!
|
49
55
|
|
@@ -93,9 +99,9 @@ def create_chromatogram(mzml, index_enum, mz, mz_window, ms_level=1, &block)
|
|
93
99
|
chromatogram
|
94
100
|
end
|
95
101
|
|
96
|
-
Pephit = Struct.new(:spectrum_id, :exp_mz, :charge, :seq, :accessions, :var_mods_string, :chromatogram)
|
102
|
+
Pephit = Struct.new(:spectrum_id, :exp_mz, :charge, :seq, :accessions, :var_mods_string, :chromatogram, :mean_mz, :rt, :rt_start, :rt_end, :num_hits, :file_tic, :ions_score)
|
97
103
|
|
98
|
-
|
104
|
+
all_pephits = []
|
99
105
|
Mspire::Mascot::Dat.open(dat_file) do |dat|
|
100
106
|
dat.each_peptide(1) do |pephit|
|
101
107
|
intersecting_accessions = accessions & pephit.protein_hits_info.map(&:accession)
|
@@ -108,69 +114,122 @@ Mspire::Mascot::Dat.open(dat_file) do |dat|
|
|
108
114
|
if md
|
109
115
|
spectrum_id = md[1]
|
110
116
|
end
|
111
|
-
|
117
|
+
if pephit.ions_score > opt.ions_score_cutoff
|
118
|
+
mypephit = Pephit.new(spectrum_id, exp_mz, z, pephit.seq, intersecting_accessions.to_a, pephit.var_mods_string)
|
119
|
+
mypephit.ions_score = pephit.ions_score
|
120
|
+
all_pephits << mypephit
|
121
|
+
end
|
112
122
|
end
|
113
123
|
end
|
114
124
|
end
|
115
125
|
|
116
|
-
|
117
|
-
|
126
|
+
# group all_pephits here, then combine if they aren't outliers
|
127
|
+
# not a sophisticated algorithm:
|
128
|
+
# combine everything that is within the windows specified and with same
|
129
|
+
# sequence, charge, or var_mods_string
|
130
|
+
pephit_groups = all_pephits.group_by {|pephit| [pephit.seq, pephit.charge, pephit.var_mods_string] }.map do |grouping, pephits|
|
131
|
+
# throw out any peptides that are more than the window edges away from the
|
132
|
+
# mean of the group
|
133
|
+
median_mz = pephits.map(&:exp_mz).median
|
134
|
+
same_mz_pephits = pephits.select {|pephit| (pephit.exp_mz - median_mz).abs <= (opt.mz_window / 2.0) }
|
135
|
+
mean_mz = same_mz_pephits.map(&:exp_mz).mean
|
136
|
+
same_mz_pephits.each {|pephit| pephit.mean_mz = mean_mz }
|
137
|
+
same_mz_pephits.size > 0 ? same_mz_pephits : nil
|
138
|
+
end.compact
|
139
|
+
|
140
|
+
puts "Found: #{pephit_groups.size} pephit groupings"
|
141
|
+
p pephit_groups.first
|
142
|
+
|
143
|
+
pephits = Mspire::Mzml.open(mzml_file) do |mzml|
|
118
144
|
|
119
|
-
Mspire::Mzml.open(mzml_file) do |mzml|
|
120
145
|
spec_index = mzml.index_list[:spectrum]
|
121
146
|
|
122
147
|
tic = mzml.map {|spec| spec.fetch_by_acc('MS:1000285').to_f }.reduce(:+)
|
123
|
-
divisor = tic.to_f/1e7
|
124
148
|
|
125
149
|
id_to_index = {}
|
126
150
|
spec_index.ids.each_with_index {|id,index| id_to_index[id] = index }
|
127
151
|
|
152
|
+
print "." ; $stdout.flush
|
153
|
+
pephit_groups.map do |pephit_group|
|
154
|
+
|
155
|
+
pephit_group.each {|pephit| pephit.rt = mzml[pephit.spectrum_id].retention_time }
|
156
|
+
|
157
|
+
pephit_group.sort_by!(&:rt)
|
158
|
+
|
159
|
+
median_pephit = pephit_group[ pephit_group.size / 2 ]
|
160
|
+
median_rt = median_pephit.rt
|
161
|
+
valid_pephits = pephit_group.select do |pephit|
|
162
|
+
if pephit.rt <= median_rt
|
163
|
+
(median_rt - pephit.rt) <= opt.max_rt_before
|
164
|
+
else
|
165
|
+
pephit.rt - median_rt <= opt.max_rt_after
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
valid_rts = valid_pephits.map(&:rt)
|
170
|
+
rep_pephit = median_pephit.dup
|
171
|
+
|
172
|
+
rep_pephit.ions_score = valid_pephits.map(&:ions_score)
|
173
|
+
rep_pephit.file_tic = tic
|
128
174
|
|
129
|
-
|
130
|
-
|
175
|
+
rep_pephit.rt_start = valid_rts.min - opt.max_rt_before
|
176
|
+
rep_pephit.rt_end = valid_rts.max + opt.max_rt_after
|
177
|
+
|
178
|
+
ms1_spec_id = mzml[rep_pephit.spectrum_id].precursors.first.spectrum_id
|
131
179
|
|
132
|
-
ms1_spec_id = mzml[pephit.spectrum_id].precursors.first.spectrum_id
|
133
180
|
index = id_to_index[ms1_spec_id]
|
134
181
|
spectrum = mzml[index]
|
135
182
|
|
136
|
-
|
137
|
-
|
138
|
-
hi_rt = orig_rt + opt.max_rt_after
|
183
|
+
lo_rt = rep_pephit.rt_start
|
184
|
+
hi_rt = rep_pephit.rt_end
|
139
185
|
|
140
|
-
first_chunk = create_chromatogram(mzml, index.downto(0),
|
141
|
-
last_chunk = create_chromatogram(mzml, (index+1).upto(Float::INFINITY),
|
186
|
+
first_chunk = create_chromatogram(mzml, index.downto(0), rep_pephit.mean_mz, opt.mz_window) {|rt| rt >= lo_rt }
|
187
|
+
last_chunk = create_chromatogram(mzml, (index+1).upto(Float::INFINITY), rep_pephit.mean_mz, opt.mz_window) {|rt| rt <= hi_rt }
|
142
188
|
|
143
189
|
chromatogram = (first_chunk + last_chunk).sort
|
144
|
-
chromatogram.each {|pair| pair[1] /= divisor }
|
145
190
|
|
146
|
-
|
191
|
+
rep_pephit.chromatogram = chromatogram
|
192
|
+
rep_pephit
|
147
193
|
end
|
148
194
|
end
|
149
195
|
puts "finished with mzml"
|
150
196
|
|
151
|
-
pephits.
|
152
|
-
|
153
|
-
avg_exp_mz = sub_pephits.map(&:exp_mz).reduce(:+) / sub_pephits.size
|
154
|
-
new_chrom = sub_pephits.flat_map(&:chromatogram).uniq.sort
|
155
|
-
cpephit = Pephit.new("(#{sub_pephits.size})", avg_exp_mz, *[:charge, :seq, :accessions, :var_mods_string].map {|key| sub_pephits.first.send(key) }, new_chrom)
|
156
|
-
|
157
|
-
fileparts = [cpephit.seq, cpephit.charge, cpephit.var_mods_string]
|
197
|
+
pephits.each do |pephit|
|
198
|
+
fileparts = [:seq, :charge, :var_mods_string].map {|key| pephit.send(key) }
|
158
199
|
if opt.add_filename
|
159
200
|
fileparts.unshift(dat_file.chomp(File.extname(dat_file)))
|
160
201
|
end
|
161
|
-
|
202
|
+
base = fileparts.join('.')
|
203
|
+
filename = base + ".tsv"
|
162
204
|
|
163
205
|
puts "writing: #{filename}"
|
164
206
|
File.open(filename, 'w') do |out|
|
165
|
-
|
207
|
+
pephit.each_pair do |k,v|
|
166
208
|
out.puts "# #{k}: #{v}" unless k.to_sym == :chromatogram
|
167
209
|
end
|
168
210
|
out.puts
|
169
|
-
out.puts "rt(sec)\
|
170
|
-
|
211
|
+
out.puts "rt(sec)\tintensity"
|
212
|
+
pephit.chromatogram.each do |row|
|
171
213
|
out.puts row.join("\t")
|
172
214
|
end
|
173
215
|
end
|
174
|
-
end
|
175
216
|
|
217
|
+
xs = pephit.chromatogram.map(&:first)
|
218
|
+
ys = pephit.chromatogram.map(&:last)
|
219
|
+
|
220
|
+
Gnuplot.open do |gp|
|
221
|
+
Gnuplot::Plot.new( gp ) do |plot|
|
222
|
+
plot.title base
|
223
|
+
plot.xlabel "rt(sec)"
|
224
|
+
plot.ylabel "intensity"
|
225
|
+
plot.terminal "svg"
|
226
|
+
plot.output( base + ".svg" )
|
227
|
+
|
228
|
+
plot.data << Gnuplot::DataSet.new( [xs, ys] ) do |ds|
|
229
|
+
ds.with = "linespoints"
|
230
|
+
ds.notitle
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
176
235
|
|
@@ -147,6 +147,7 @@ if opt[:qspec] || opt[:descriptions]
|
|
147
147
|
id_to_length = {}
|
148
148
|
id_to_desc = {}
|
149
149
|
Mspire::Fasta.foreach(opt[:fasta]) do |entry|
|
150
|
+
#acc = Mspire::Fasta.uniprot_id(entry.header)
|
150
151
|
acc = entry.accession
|
151
152
|
id_to_length[acc] = entry.length
|
152
153
|
id_to_desc[acc] = entry.definition[/^\S+\s(.*)/,1]
|
@@ -34,7 +34,7 @@ describe 'creating a peptide centric database' do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'converts a fasta file into peptide centric db' do
|
37
|
-
output_files = Mspire::Ident::Peptide::Db::Creator.cmdline([@fasta_file])
|
37
|
+
output_files = Mspire::Ident::Peptide::Db::Creator.cmdline([@fasta_file, "--min-length", "4"])
|
38
38
|
output_files.first.should == File.expand_path(@output_file)
|
39
39
|
File.exist?(@output_file).should == true
|
40
40
|
hash = {}
|
@@ -49,7 +49,7 @@ describe 'creating a peptide centric database' do
|
|
49
49
|
#File.unlink(@output_file)
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
xit 'can use a trie' do
|
53
53
|
Mspire::Ident::Peptide::Db::Creator.cmdline([@fasta_file, '--trie'])
|
54
54
|
triefile = TESTFILES + '/mspire/ident/peptide/db/uni_11_sp_tr.msd_clvg2.min_aaseq4'
|
55
55
|
%w(.trie .tail .da).each do |ext|
|
data/spec/mspire/mzml_spec.rb
CHANGED
@@ -326,7 +326,9 @@ describe Mspire::Mzml do
|
|
326
326
|
it 'iterates with foreach' do
|
327
327
|
mz_sizes = [20168, 315, 634]
|
328
328
|
iter = Mspire::Mzml.foreach(@file)
|
329
|
-
3.times {
|
329
|
+
3.times {
|
330
|
+
iter.next.mzs.size.should == mz_sizes.shift
|
331
|
+
}
|
330
332
|
lambda {iter.next}.should raise_error
|
331
333
|
end
|
332
334
|
|
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.8.6.
|
4
|
+
version: 0.8.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.5.9
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 1.5.9
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: bsearch
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.3.
|
54
|
+
version: 1.3.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ! '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.3.
|
62
|
+
version: 1.3.3
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: obo
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
requirements:
|
68
68
|
- - ! '>='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.1.
|
70
|
+
version: 0.1.3
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 0.1.
|
78
|
+
version: 0.1.3
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: builder
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
requirements:
|
84
84
|
- - ~>
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 3.
|
86
|
+
version: 3.2.0
|
87
87
|
type: :runtime
|
88
88
|
prerelease: false
|
89
89
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -91,7 +91,7 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 3.
|
94
|
+
version: 3.2.0
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: bio
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - ~>
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 1.4.
|
102
|
+
version: 1.4.3
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.4.
|
110
|
+
version: 1.4.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: trollop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,22 +124,6 @@ dependencies:
|
|
124
124
|
- - ~>
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: 2.0.0
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: uuid
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ! '>='
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: 2.3.5
|
135
|
-
type: :runtime
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
|
-
requirements:
|
140
|
-
- - ! '>='
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: 2.3.5
|
143
127
|
- !ruby/object:Gem::Dependency
|
144
128
|
name: fftw3
|
145
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +147,7 @@ dependencies:
|
|
163
147
|
requirements:
|
164
148
|
- - ~>
|
165
149
|
- !ruby/object:Gem::Version
|
166
|
-
version: '2.
|
150
|
+
version: '2.13'
|
167
151
|
type: :development
|
168
152
|
prerelease: false
|
169
153
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -171,7 +155,7 @@ dependencies:
|
|
171
155
|
requirements:
|
172
156
|
- - ~>
|
173
157
|
- !ruby/object:Gem::Version
|
174
|
-
version: '2.
|
158
|
+
version: '2.13'
|
175
159
|
- !ruby/object:Gem::Dependency
|
176
160
|
name: jeweler
|
177
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,7 +163,7 @@ dependencies:
|
|
179
163
|
requirements:
|
180
164
|
- - ~>
|
181
165
|
- !ruby/object:Gem::Version
|
182
|
-
version: 1.
|
166
|
+
version: 1.8.4
|
183
167
|
type: :development
|
184
168
|
prerelease: false
|
185
169
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -187,7 +171,7 @@ dependencies:
|
|
187
171
|
requirements:
|
188
172
|
- - ~>
|
189
173
|
- !ruby/object:Gem::Version
|
190
|
-
version: 1.
|
174
|
+
version: 1.8.4
|
191
175
|
description: mass spectrometry proteomics, lipidomics, and tools, a rewrite of mspire,
|
192
176
|
merging of ms-* gems
|
193
177
|
email: jtprince@gmail.com
|