ms-sequest 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.2 / 2011-07-05
2
+
3
+ * fixed a few bugs caused by newer ms-search
4
+
1
5
  == 0.1.0 / 2011-04-11
2
6
 
3
7
  * moved Arrayclass objects to Struct objects
data/Rakefile CHANGED
@@ -11,13 +11,13 @@ Jeweler::Tasks.new do |gem|
11
11
  gem.email = "jtprince@gmail.com"
12
12
  gem.authors = ["John T. Prince"]
13
13
  gem.rubyforge_project = 'mspire'
14
- gem.add_runtime_dependency "ms-ident", ">= 0.0.20"
15
- gem.add_runtime_dependency "ms-core", ">= 0.0.17"
14
+ gem.add_runtime_dependency "ms-ident", ">= 0.1.1"
15
+ gem.add_runtime_dependency "ms-core", ">= 0.0.19"
16
16
  #gem.add_runtime_dependency "ms-msrun", ">= 0.3.4"
17
- gem.add_runtime_dependency "trollop", "~> 1.16"
17
+ gem.add_runtime_dependency "trollop", "~> 1.16.2"
18
18
  gem.add_development_dependency "jeweler", "~> 1.5.2"
19
19
  gem.add_development_dependency "ms-testdata", ">= 0.1.1"
20
- gem.add_development_dependency "spec-more", ">= 0"
20
+ gem.add_development_dependency "spec-more", ">= 0.0.4"
21
21
  end
22
22
  Jeweler::RubygemsDotOrgTasks.new
23
23
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -54,8 +54,7 @@ module Ms
54
54
  end # SqtGroup
55
55
 
56
56
 
57
- class Sqt
58
- include Ms::Ident::Search
57
+ class Sqt < Ms::Ident::Search
59
58
  PercolatorHeaderMatch = /^Percolator v/
60
59
  Delimiter = "\t"
61
60
  attr_accessor :header
@@ -14,8 +14,7 @@ require 'ms/sequest/params'
14
14
  module Ms ; end
15
15
  module Ms::Sequest ; end
16
16
 
17
- class Ms::Sequest::Srf
18
- include Ms::Ident::Search
17
+ class Ms::Sequest::Srf < Ms::Ident::Search
19
18
 
20
19
  class NoSequestParamsError < ArgumentError
21
20
  end
@@ -102,7 +101,7 @@ class Ms::Sequest::Srf
102
101
  # # will attempt to read peptide hit information (equivalent to .out
103
102
  # # files), otherwise, just reads the dta information.
104
103
  def initialize(filename=nil, opts={})
105
- @peptides = []
104
+ @peptide_hits = []
106
105
 
107
106
  @dta_files = []
108
107
  @out_files = []
@@ -270,7 +269,7 @@ class Ms::Sequest::Srf
270
269
  outfile.charge = ind[2]
271
270
 
272
271
  pep_hits = @out_files[i].hits
273
- @peptides.push( *pep_hits )
272
+ @peptide_hits.push( *pep_hits )
274
273
  pep_hits.each do |pep_hit|
275
274
  pep_hit[15] = @base_name
276
275
  pep_hit[16] = ind[0]
@@ -286,7 +285,7 @@ class Ms::Sequest::Srf
286
285
  filter_by_precursor_mass_tolerance! if params
287
286
 
288
287
  if opts[:link_protein_hits]
289
- (@peptides, @proteins) = merge!([self.peptides]) do |_protein, _peptides|
288
+ (@peptide_hits, @proteins) = merge!([self.peptide_hits]) do |_protein, _peptides|
290
289
  Ms::Sequest::Srf::Out::Protein.new(_protein.reference, _peptides)
291
290
  end
292
291
  end
@@ -615,7 +614,7 @@ end
615
614
  # deltacn should also be changed to reflect it.
616
615
  # mh - the theoretical mass + h
617
616
  # proteins are created as SRF prot objects with a reference and linked to their
618
- # peptides (from global hash by reference)
617
+ # peptide_hits (from global hash by reference)
619
618
  # ppm = 10^6 * ∆m_accuracy / mass_measured [ where ∆m_accuracy = mass_real – mass_measured ]
620
619
  # This is calculated for the M+H mass!
621
620
  # num_other_loci is the number of other loci that the peptide matches beyond
@@ -728,7 +727,7 @@ end
728
727
  Ms::Sequest::Srf::Out::Protein = Struct.new( *%w(reference peptides).map(&:to_sym) )
729
728
 
730
729
  class Ms::Sequest::Srf::Out::Protein
731
- include Ms::Ident::Protein
730
+ #include Ms::Ident::Protein
732
731
 
733
732
  ## we shouldn't have to do this because this is inlcuded in SpecID::Protein, but
734
733
  ## under some circumstances it won't work without explicitly calling it.
@@ -741,6 +740,10 @@ class Ms::Sequest::Srf::Out::Protein
741
740
  end
742
741
  $VERBOSE = tmp
743
742
 
743
+ def first_entry
744
+ reference.split(/[\s\r]/)[0]
745
+ end
746
+
744
747
  # "<Ms::Sequest::Srf::Out::Protein reference=\"#{@reference}\">"
745
748
 
746
749
  undef_method :inspect
@@ -155,24 +155,24 @@ class Ms::Sequest::Srf
155
155
  msms_pipeline_analysis.merge!(:summary_xml => summary_xml_filename, :pepxml_version => opt[:pepxml_version]) do |msms_run_summary|
156
156
  # prep the sample enzyme and search_summary
157
157
  msms_run_summary.merge!(
158
- :base_name => File.join(opt[:mz_dir], srf.base_name_noext),
158
+ { :base_name => File.join(opt[:mz_dir], srf.base_name_noext),
159
159
  :ms_manufacturer => opt[:ms_manufacturer],
160
160
  :ms_model => opt[:ms_model],
161
161
  :ms_ionization => opt[:ms_ionization],
162
162
  :ms_mass_analyzer => opt[:ms_mass_analyzer],
163
163
  :ms_detector => opt[:ms_detector],
164
164
  :raw_data => opt[:raw_data].first,
165
- :raw_data_type => opt[:raw_data].first,
165
+ :raw_data_type => opt[:raw_data].first, }
166
166
  ) do |sample_enzyme, search_summary, spectrum_queries|
167
167
  sample_enzyme.merge!(params.sample_enzyme_hash)
168
168
  sample_enzyme.name = opt[:enzyme] if opt[:enzyme]
169
169
  search_summary.merge!(
170
- :base_name=> srf.resident_dir + '/' + srf.base_name_noext,
170
+ { :base_name=> srf.resident_dir + '/' + srf.base_name_noext,
171
171
  :search_engine => 'SEQUEST',
172
172
  :precursor_mass_type => params.precursor_mass_type,
173
173
  :fragment_mass_type => params.fragment_mass_type,
174
174
  :out_data_type => opt[:out_data_type],
175
- :out_data => opt[:out_data],
175
+ :out_data => opt[:out_data], }
176
176
  ) do |search_database, enzymatic_search_constraint, modifications_ar, parameters_hash|
177
177
  search_database.merge!(:local_path => db_filename, :seq_type => opt[:db_seq_type], :database_name => opt[:db_name], :orig_database_url => opt[:db_orig_url], :database_release_date => opt[:db_release_date], :database_release_identifier => opt[:db_release_id])
178
178
 
@@ -184,9 +184,9 @@ class Ms::Sequest::Srf
184
184
  end
185
185
 
186
186
  enzymatic_search_constraint.merge!(
187
- :enzyme => opt[:enzyme] ? opt[:enzyme] : params.enzyme,
187
+ { :enzyme => opt[:enzyme] ? opt[:enzyme] : params.enzyme,
188
188
  :max_num_internal_cleavages => params.max_num_internal_cleavages,
189
- :min_number_termini => params.min_number_termini,
189
+ :min_number_termini => params.min_number_termini, }
190
190
  )
191
191
  modifications_ar.replace(modifications_obj.modifications)
192
192
  parameters_hash.merge!(params.opts)
@@ -240,10 +240,10 @@ class Ms::Sequest::Srf
240
240
  end
241
241
  end
242
242
  Ms::Ident::Pepxml::SpectrumQuery.new(
243
- :spectrum => [srf.base_name_noext, *i_ar].join('.'), :start_scan => i_ar[0], :end_scan => i_ar[1],
243
+ { :spectrum => [srf.base_name_noext, *i_ar].join('.'), :start_scan => i_ar[0], :end_scan => i_ar[1],
244
244
  :precursor_neutral_mass => dta_file.mh - h_plus, :assumed_charge => i_ar[2],
245
245
  :retention_time_sec => ret_time,
246
- :search_results => [sr],
246
+ :search_results => [sr], }
247
247
  )
248
248
  end
249
249
  spectrum_queries.replace(spec_queries)
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
+ require 'stringio'
3
4
  require 'ms/sequest/srf'
4
5
  require 'ms/sequest/srf/sqt'
5
6
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ms-sequest
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - John T. Prince
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-12 00:00:00 -06:00
13
+ date: 2011-07-05 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 0.0.20
24
+ version: 0.1.1
25
25
  type: :runtime
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 0.0.17
35
+ version: 0.0.19
36
36
  type: :runtime
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: "1.16"
46
+ version: 1.16.2
47
47
  type: :runtime
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
@@ -76,7 +76,7 @@ dependencies:
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: "0"
79
+ version: 0.0.4
80
80
  type: :development
81
81
  version_requirements: *id006
82
82
  description: reads .SRF, .SQT and supports conversions
@@ -161,16 +161,5 @@ rubygems_version: 1.6.2
161
161
  signing_key:
162
162
  specification_version: 3
163
163
  summary: An mspire library supporting SEQUEST, Bioworks, SQT, etc
164
- test_files:
165
- - spec/ms/sequest/bioworks_spec.rb
166
- - spec/ms/sequest/params_spec.rb
167
- - spec/ms/sequest/pepxml/modifications_spec.rb
168
- - spec/ms/sequest/pepxml_spec.rb
169
- - spec/ms/sequest/sqt_spec.rb
170
- - spec/ms/sequest/sqt_spec_helper.rb
171
- - spec/ms/sequest/srf/pepxml_spec.rb
172
- - spec/ms/sequest/srf/search_spec.rb
173
- - spec/ms/sequest/srf/sqt_spec.rb
174
- - spec/ms/sequest/srf_spec.rb
175
- - spec/ms/sequest/srf_spec_helper.rb
176
- - spec/spec_helper.rb
164
+ test_files: []
165
+