ms-sequest 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,6 +1,6 @@
1
- == 0.1.2 / 2011-07-05
1
+ == 0.2.0 / 2011-09-13
2
2
 
3
- * fixed a few bugs caused by newer ms-search
3
+ Breaking backwards compatbility. Based on new msplat gem instead of ms-core, ms-ident, etc. MS module instead of Ms module.
4
4
 
5
5
  == 0.1.0 / 2011-04-11
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  An {mspire}[http://mspire.rubyforge.org] library supporting SEQUEST, Bioworks, SQT and associated formats.
4
4
 
5
- == {API}[http://yardoc.org/docs/jtprince-ms-sequest]
5
+ == {Current API}[http://rubydoc.info/gems/ms-sequest]
6
6
 
7
7
  == Examples
8
8
 
@@ -11,12 +11,12 @@ Provides two executables for extracting information from an Srf file (run withou
11
11
  srf_to_sqt.rb file.srf # => file.sqt
12
12
  srf_to_search.rb file.srf # => file.mgf (also can make .dta files)
13
13
 
14
- === Ms::Sequest::Srf
14
+ === MS::Sequest::Srf
15
15
 
16
16
  Can read and convert Bioworks Sequest Results Files (SRF).
17
17
 
18
18
  require 'ms/sequest/srf'
19
- srf = Ms::Sequest::Srf.new("file.srf")
19
+ srf = MS::Sequest::Srf.new("file.srf")
20
20
 
21
21
  Conversions (see api for options):
22
22
 
@@ -28,20 +28,20 @@ Conversions (see api for options):
28
28
  srf.to_dta # (outputs a dir) -> file
29
29
  srf.to_dta("file.tgz", :tgz) # on the fly tgz (requires archive-tar-minitar)
30
30
 
31
- Object access (see Ms::Sequest::Srf for much more):
31
+ Object access (see MS::Sequest::Srf for much more):
32
32
 
33
- srf.header # Ms::Sequest::Srf::Header object
34
- srf.params # Ms::Sequest::Params object
35
- srf.dta_files # Ms::Sequest::Srf::DTA objects
36
- srf.peps # Ms::Sequest::Srf::Out::Pep objects
37
- srf.prots # Ms::Sequest::Srf::Out::Prot objects
33
+ srf.header # MS::Sequest::Srf::Header object
34
+ srf.params # MS::Sequest::Params object
35
+ srf.dta_files # MS::Sequest::Srf::Dta objects
36
+ srf.out_files # MS::Sequest::Srf::Out objects
37
+ srf.peptide_hits # MS::Sequest::Srf::Out::Peptide objects
38
38
 
39
- === Ms::Sequest::Params
39
+ === MS::Sequest::Params
40
40
 
41
41
  Object or hash access to any parameter in the file. Also provides a unified interface across several versions (3.1 - 3.3)
42
42
 
43
43
  require 'ms/sequest/params'
44
- params = Ms::Sequest::Params.new("sequest.params")
44
+ params = MS::Sequest::Params.new("sequest.params")
45
45
  params.any_existing_param # -> some value or empty string if no value
46
46
  params['any_existing_param'] # -> some value or empty string if no value
47
47
  params.non_existent_param # -> nil
@@ -53,25 +53,24 @@ Object or hash access to any parameter in the file. Also provides a unified int
53
53
  params.precursor_mass_type # => "average" | "monoisotopic"
54
54
  params.fragment_mass_type # => "average" | "monoisotopic"
55
55
 
56
- === Ms::Sequest::Sqt
56
+ === MS::Sequest::Sqt
57
57
 
58
- sqt = Ms::Sequest::Sqt.new("file.sqt")
58
+ sqt = MS::Sequest::Sqt.new("file.sqt")
59
59
  sqt.header
60
- sqt.spectra.each do |spectrum| # an Ms::Sequest::Sqt::Spectrum object
61
- spectrum.matches.each do |match| # an Ms::Sequest::Sqt::Match object
62
- match.loci.each do |locus| # an Ms::Sequest::Sqt::Locus object
60
+ sqt.spectra.each do |spectrum| # an MS::Sequest::Sqt::Spectrum object
61
+ spectrum.matches.each do |match| # an MS::Sequest::Sqt::Match object
62
+ match.loci.each do |locus| # an MS::Sequest::Sqt::Locus object
63
63
  end
64
64
  end
65
65
  end
66
66
 
67
- # or more direct access to Match and Locus objects:
68
- sqt.peps
69
- sqt.prots
67
+ # or more direct access to Match objects:
68
+ sqt.peptide_hits
70
69
 
71
70
  Also reads Percolator SQT output files intelligently:
72
71
 
73
- psqt = Ms::Sequest::Sqt.new("percolator_output.sqt")
74
- psqt.peps.each do |pmatch|
72
+ psqt = MS::Sequest::Sqt.new("percolator_output.sqt")
73
+ psqt.peptide_hits.each do |pmatch|
75
74
  pmatch.percolator_score == pmatch.xcorr
76
75
  pmatch.negative_q_value == pmatch.sp
77
76
  pmatch.q_value == -pmatch.negative_q_value
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.1.1"
15
- gem.add_runtime_dependency "ms-core", ">= 0.0.19"
14
+ gem.add_runtime_dependency "msplat", ">= 0.0.6"
15
+ #gem.add_runtime_dependency "ms-core", ">= 0.0.17"
16
16
  #gem.add_runtime_dependency "ms-msrun", ">= 0.3.4"
17
- gem.add_runtime_dependency "trollop", "~> 1.16.2"
17
+ gem.add_runtime_dependency "trollop", "~> 1.16"
18
18
  gem.add_development_dependency "jeweler", "~> 1.5.2"
19
- gem.add_development_dependency "ms-testdata", ">= 0.1.1"
20
- gem.add_development_dependency "spec-more", ">= 0.0.4"
19
+ gem.add_development_dependency "ms-testdata", ">= 0.2.1"
20
+ gem.add_development_dependency "spec-more", ">= 0"
21
21
  end
22
22
  Jeweler::RubygemsDotOrgTasks.new
23
23
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.2.1
@@ -1,5 +1,5 @@
1
1
 
2
- module Ms
2
+ module MS
3
3
  module Sequest
4
4
  VERSION = File.open(File.dirname(__FILE__) + '/../../VERSION') {|io| io.gets.chomp }
5
5
  end
@@ -3,13 +3,13 @@ require 'ms/mass/aa'
3
3
  # In the future, this guy should accept any version of bioworks params file
4
4
  # and spit out any param queried.
5
5
 
6
- module Ms ; end
7
- module Ms::Sequest ; end
6
+ module MS ; end
7
+ module MS::Sequest ; end
8
8
 
9
9
  # 1) provides a reader and simple parameter lookup for SEQUEST params files
10
10
  # supporting Bioworks 3.1-3.3.1.
11
- # params = Ms::Sequest::Params.new("sequest.params") # filename by default
12
- # params = Ms::Sequest::Params.new.parse_io(some_io_object)
11
+ # params = MS::Sequest::Params.new("sequest.params") # filename by default
12
+ # params = MS::Sequest::Params.new.parse_io(some_io_object)
13
13
  #
14
14
  # params.some_parameter # => any parameter defined has a method
15
15
  # params.nonexistent_parameter # => nil
@@ -29,7 +29,7 @@ module Ms::Sequest ; end
29
29
  # params.max_num_internal_cleavages # == max_num_internal_cleavage_sites
30
30
  # params.fragment_ion_tol # => fragment_ion_tolerance
31
31
  #
32
- class Ms::Sequest::Params
32
+ class MS::Sequest::Params
33
33
 
34
34
  Bioworks31_Enzyme_Info_Array = [
35
35
  ['No_Enzyme', 0, '-', '-'], # 0
@@ -234,7 +234,7 @@ class Ms::Sequest::Params
234
234
  @opts["first_database_name"]
235
235
  end
236
236
 
237
- # returns the appropriate aminoacid mass lookup table from Ms::Mass::AA
237
+ # returns the appropriate aminoacid mass lookup table from MS::Mass::AA
238
238
  # based_on may be :precursor or :fragment
239
239
  def mass_index(based_on=:precursor)
240
240
  reply = case based_on
@@ -243,9 +243,9 @@ class Ms::Sequest::Params
243
243
  end
244
244
  case reply
245
245
  when 'average'
246
- Ms::Mass::AA::AVG
246
+ MS::Mass::AA::AVG
247
247
  when 'monoisotopic'
248
- Ms::Mass::AA::MONO
248
+ MS::Mass::AA::MONO
249
249
  end
250
250
  end
251
251
 
@@ -1,10 +1,10 @@
1
1
  require 'ms/ident/pepxml/search_hit/modification_info'
2
2
 
3
- module Ms ; end
4
- module Ms::Sequest ; end
5
- class Ms::Sequest::Pepxml ; end
3
+ module MS ; end
4
+ module MS::Sequest ; end
5
+ class MS::Sequest::Pepxml ; end
6
6
 
7
- class Ms::Sequest::Pepxml::Modifications
7
+ class MS::Sequest::Pepxml::Modifications
8
8
  # sequest params object
9
9
  attr_accessor :params
10
10
  # array holding AAModifications
@@ -100,7 +100,7 @@ class Ms::Sequest::Pepxml::Modifications
100
100
  :variable => 'N',
101
101
  :binary => 'Y',
102
102
  }
103
- Ms::Ident::Pepxml::AminoacidModification.new(hash)
103
+ MS::Ident::Pepxml::AminoacidModification.new(hash)
104
104
  end
105
105
 
106
106
  ## Create the static_terminal_mods objects
@@ -122,7 +122,7 @@ class Ms::Sequest::Pepxml::Modifications
122
122
  :description => mod[0],
123
123
  }
124
124
  hash[:protein_terminus] = protein_terminus if protein_terminus
125
- Ms::Ident::Pepxml::TerminalModification.new(hash)
125
+ MS::Ident::Pepxml::TerminalModification.new(hash)
126
126
  end
127
127
  [static_mods, static_terminal_mods]
128
128
  end
@@ -160,7 +160,7 @@ class Ms::Sequest::Pepxml::Modifications
160
160
  :binary => 'N',
161
161
  :symbol => @mod_symbols_hash[[aa.to_sym, mod[1]]],
162
162
  }
163
- mod_objects << Ms::Ident::Pepxml::AminoacidModification.new(hash)
163
+ mod_objects << MS::Ident::Pepxml::AminoacidModification.new(hash)
164
164
  end
165
165
  end
166
166
 
@@ -186,7 +186,7 @@ class Ms::Sequest::Pepxml::Modifications
186
186
  :variable => 'Y',
187
187
  :symbol => symb,
188
188
  }
189
- Ms::Ident::Pepxml::TerminalModification.new(hash)
189
+ MS::Ident::Pepxml::TerminalModification.new(hash)
190
190
  end
191
191
 
192
192
  #########################
@@ -202,7 +202,7 @@ class Ms::Sequest::Pepxml::Modifications
202
202
  # if there are no modifications, returns nil
203
203
  def modification_info(mod_peptide)
204
204
  return nil if @aa_mod_to_tot_mass.size == 0
205
- mod_info = Ms::Ident::Pepxml::SearchHit::ModificationInfo.new( mod_peptide.dup )
205
+ mod_info = MS::Ident::Pepxml::SearchHit::ModificationInfo.new( mod_peptide.dup )
206
206
  mass_table = @params.mass_index(:precursor)
207
207
 
208
208
  # TERMINI:
@@ -227,7 +227,7 @@ class Ms::Sequest::Pepxml::Modifications
227
227
  if @aa_mod_to_tot_mass.key?( last_normal_aa + mod_peptide[i,1] )
228
228
  # we don't save the result because most amino acids will not be
229
229
  # modified
230
- mod_array << Ms::Ident::Pepxml::SearchHit::ModificationInfo::ModAminoacidMass.new(bare_cnt, @aa_mod_to_tot_mass[last_normal_aa + mod_peptide[i,1]])
230
+ mod_array << MS::Ident::Pepxml::SearchHit::ModificationInfo::ModAminoacidMass.new(bare_cnt, @aa_mod_to_tot_mass[last_normal_aa + mod_peptide[i,1]])
231
231
  else
232
232
  last_normal_aa = mod_peptide[i,1]
233
233
  bare_cnt += 1
@@ -1,15 +1,15 @@
1
1
 
2
- module Ms ; end
3
- module Ms::Sequest ; end
2
+ module MS ; end
3
+ module MS::Sequest ; end
4
4
 
5
- class Ms::Sequest::Params
5
+ class MS::Sequest::Params
6
6
 
7
- # returns a Ms::Ident::Pepxml::SampleEnzyme object
7
+ # returns a MS::Ident::Pepxml::SampleEnzyme object
8
8
  def sample_enzyme
9
- Ms::Ident::Pepxml::SampleEnzyme.new(sample_enzyme_hash)
9
+ MS::Ident::Pepxml::SampleEnzyme.new(sample_enzyme_hash)
10
10
  end
11
11
 
12
- # returns a hash suitable for setting a Ms::Ident::Pepxml::SampleEnzyme object
12
+ # returns a hash suitable for setting a MS::Ident::Pepxml::SampleEnzyme object
13
13
  def sample_enzyme_hash
14
14
  (offset, cleave_at, except_if_after) = enzyme_specificity.map do |v|
15
15
  if v == '' ; nil ; else v end
@@ -8,15 +8,15 @@ require 'digest/md5'
8
8
  require 'ms/ident/peptide'
9
9
  require 'ms/ident/search'
10
10
 
11
- module Ms
11
+ module MS
12
12
  module Sequest
13
13
  class SqtGroup
14
- include Ms::Ident::SearchGroup
14
+ include MS::Ident::SearchGroup
15
15
 
16
16
  #attr_accessor :sqts, :filenames
17
17
 
18
18
  def search_class
19
- Ms::Sequest::Sqt
19
+ MS::Sequest::Sqt
20
20
  end
21
21
 
22
22
  def extension() 'sqg' end
@@ -27,7 +27,7 @@ module Ms
27
27
  super(arg, opts.merge(indiv_opts)) do
28
28
  unless orig_opts[:link_protein_hits] == false
29
29
  puts "MERGING GROUP!"
30
- (@peptides, @proteins) = merge!(@searches.map {|v| v.peptides }, &Ms::Sequest::Sqt::NEW_PROT)
30
+ (@peptides, @proteins) = merge!(@searches.map {|v| v.peptides }, &MS::Sequest::Sqt::NEW_PROT)
31
31
  end
32
32
  end
33
33
  block.call(self) if block_given?
@@ -54,7 +54,8 @@ module Ms
54
54
  end # SqtGroup
55
55
 
56
56
 
57
- class Sqt < Ms::Ident::Search
57
+ class Sqt
58
+ include MS::Ident::SearchLike
58
59
  PercolatorHeaderMatch = /^Percolator v/
59
60
  Delimiter = "\t"
60
61
  attr_accessor :header
@@ -67,7 +68,7 @@ module Ms
67
68
  def self.db_seq_length_and_locus_count(dbfile)
68
69
  total_sequence_length = 0
69
70
  fastasize = 0
70
- Ms::Fasta.open(dbfile) do |fasta|
71
+ MS::Fasta.open(dbfile) do |fasta|
71
72
  fasta.each do |entry|
72
73
  total_sequence_length += entry.sequence.size
73
74
  fastasize += 1
@@ -99,22 +100,21 @@ module Ms
99
100
  end
100
101
 
101
102
  def protein_class
102
- Ms::Sequest::Sqt::Locus
103
+ MS::Sequest::Sqt::Locus
103
104
  end
104
105
 
105
106
  # opts =
106
107
  # :percolator_results => false | true (default false)
107
108
  # :link_protein_hits => true | false (default true)
108
109
  def initialize(filename=nil, opts={})
109
- @peptides = []
110
- @proteins = []
110
+ peptide_hits = []
111
111
  if filename
112
112
  from_file(filename, opts)
113
113
  end
114
114
  end
115
115
 
116
116
  NEW_PROT = lambda do |_prot, _peptides|
117
- Ms::Sequest::Sqt::Locus.new(_prot.locus, _prot.description, _peptides)
117
+ MS::Sequest::Sqt::Locus.new(_prot.locus, _prot.description, _peptides)
118
118
  end
119
119
 
120
120
  # if the file contains the header key '/$Percolator v/' then the results
@@ -125,14 +125,11 @@ module Ms
125
125
  @percolator_results = opts[:percolator_results]
126
126
  @base_name = File.basename( filename.gsub('\\','/') ).sub(/\.\w+$/, '')
127
127
  File.open(filename) do |fh|
128
- @header = Ms::Sequest::Sqt::Header.new.from_handle(fh)
128
+ @header = MS::Sequest::Sqt::Header.new.from_handle(fh)
129
129
  if @header.keys.any? {|v| v =~ PercolatorHeaderMatch }
130
130
  @percolator_results = true
131
131
  end
132
- (@spectra, @peptides) = Ms::Sequest::Sqt::Spectrum.spectra_from_handle(fh, @base_name, @percolator_results)
133
- end
134
- if opts[:link_protein_hits]
135
- (@peptides, @proteins) = merge!([@peptides], &NEW_PROT)
132
+ (@spectra, @peptides) = MS::Sequest::Sqt::Spectrum.spectra_from_handle(fh, @base_name, @percolator_results)
136
133
  end
137
134
  end
138
135
 
@@ -185,7 +182,7 @@ module Ms
185
182
  lines = []
186
183
  loop do
187
184
  line = fh.gets
188
- if line && (line[0,1] == Ms::Sequest::Sqt::Header::Leader )
185
+ if line && (line[0,1] == MS::Sequest::Sqt::Header::Leader )
189
186
  lines << line
190
187
  else # reset the fh.pos and we're done
191
188
  fh.pos = pos
@@ -199,9 +196,9 @@ module Ms
199
196
  def from_lines(array_of_header_lines)
200
197
  array_of_header_lines.each do |line|
201
198
  line.chomp!
202
- (ky, *rest) = line.split(Ms::Sequest::Sqt::Delimiter)[1..-1]
199
+ (ky, *rest) = line.split(MS::Sequest::Sqt::Delimiter)[1..-1]
203
200
  # just in case they have any tabs in their field
204
- value = rest.join(Ms::Sequest::Sqt::Delimiter)
201
+ value = rest.join(MS::Sequest::Sqt::Delimiter)
205
202
  if Arrayed.include?(ky)
206
203
  self[ky] << value
207
204
  elsif self.key? ky # already exists
@@ -227,11 +224,11 @@ end
227
224
 
228
225
  # all are cast as expected (total_intensity is a float)
229
226
  # mh = observed mh
230
- Ms::Sequest::Sqt::Spectrum = Struct.new(* %w(first_scan last_scan charge time_to_process node mh total_intensity lowest_sp num_matched_peptides matches).map(&:to_sym) )
227
+ MS::Sequest::Sqt::Spectrum = Struct.new(* %w(first_scan last_scan charge time_to_process node mh total_intensity lowest_sp num_matched_peptides matches).map(&:to_sym) )
231
228
 
232
229
  # 0=first_scan 1=last_scan 2=charge 3=time_to_process 4=node 5=mh 6=total_intensity 7=lowest_sp 8=num_matched_peptides 9=matches
233
230
 
234
- class Ms::Sequest::Sqt::Spectrum
231
+ class MS::Sequest::Sqt::Spectrum
235
232
  Leader = 'S'
236
233
 
237
234
  # assumes the first line starts with an 'S'
@@ -241,16 +238,16 @@ class Ms::Sequest::Sqt::Spectrum
241
238
 
242
239
  while line = fh.gets
243
240
  case line[0,1]
244
- when Ms::Sequest::Sqt::Spectrum::Leader
245
- spectrum = Ms::Sequest::Sqt::Spectrum.new.from_line( line )
241
+ when MS::Sequest::Sqt::Spectrum::Leader
242
+ spectrum = MS::Sequest::Sqt::Spectrum.new.from_line( line )
246
243
  spectra << spectrum
247
244
  matches = []
248
245
  spectrum.matches = matches
249
- when Ms::Sequest::Sqt::Match::Leader
246
+ when MS::Sequest::Sqt::Match::Leader
250
247
  match_klass = if percolator_results
251
- Ms::Sequest::Sqt::Match::Percolator
248
+ MS::Sequest::Sqt::Match::Percolator
252
249
  else
253
- Ms::Sequest::Sqt::Match
250
+ MS::Sequest::Sqt::Match
254
251
  end
255
252
  match = match_klass.new.from_line( line )
256
253
  #match[10,3] = spectrum[0,3]
@@ -264,10 +261,10 @@ class Ms::Sequest::Sqt::Spectrum
264
261
  loci = []
265
262
  match.loci = loci
266
263
  matches << match
267
- when Ms::Sequest::Sqt::Locus::Leader
264
+ when MS::Sequest::Sqt::Locus::Leader
268
265
  line.chomp!
269
- key = line.split(Ms::Sequest::Sqt::Delimiter)[1]
270
- locus = Ms::Sequest::Sqt::Locus.from_line( line )
266
+ key = line.split(MS::Sequest::Sqt::Delimiter)[1]
267
+ locus = MS::Sequest::Sqt::Locus.from_line( line )
271
268
  loci << locus
272
269
  end
273
270
  end
@@ -294,7 +291,7 @@ class Ms::Sequest::Sqt::Spectrum
294
291
  # returns an array -> [the next spectra line (or nil if eof), spectrum]
295
292
  def from_line(line)
296
293
  line.chomp!
297
- ar = line.split(Ms::Sequest::Sqt::Delimiter)
294
+ ar = line.split(MS::Sequest::Sqt::Delimiter)
298
295
  self[0] = ar[1].to_i
299
296
  self[1] = ar[2].to_i
300
297
  self[2] = ar[3].to_i
@@ -310,7 +307,7 @@ class Ms::Sequest::Sqt::Spectrum
310
307
  end
311
308
 
312
309
  # Sqt format uses only indices 0 - 9
313
- Ms::Sequest::Sqt::Match = Struct.new( *%w[rxcorr rsp mh deltacn_orig xcorr sp ions_matched ions_total sequence manual_validation_status first_scan last_scan charge deltacn aaseq base_name loci].map(&:to_sym) )
310
+ MS::Sequest::Sqt::Match = Struct.new( *%w[rxcorr rsp mh deltacn_orig xcorr sp ions_matched ions_total sequence manual_validation_status first_scan last_scan charge deltacn aaseq base_name loci].map(&:to_sym) )
314
311
 
315
312
  # 0=rxcorr 1=rsp 2=mh 3=deltacn_orig 4=xcorr 5=sp 6=ions_matched 7=ions_total 8=sequence 9=manual_validation_status 10=first_scan 11=last_scan 12=charge 13=deltacn 14=aaseq 15=base_name 16=loci
316
313
 
@@ -320,7 +317,7 @@ Ms::Sequest::Sqt::Match = Struct.new( *%w[rxcorr rsp mh deltacn_orig xcorr sp io
320
317
  # deltacn_orig
321
318
  # deltacn is the adjusted deltacn (like Bioworks - shift all scores up and
322
319
  # give the last one 1.1)
323
- class Ms::Sequest::Sqt::Match
320
+ class MS::Sequest::Sqt::Match
324
321
  Leader = 'M'
325
322
 
326
323
  # same as 'loci'
@@ -330,7 +327,7 @@ class Ms::Sequest::Sqt::Match
330
327
 
331
328
  def from_line(line)
332
329
  line.chomp!
333
- ar = line.split(Ms::Sequest::Sqt::Delimiter)
330
+ ar = line.split(MS::Sequest::Sqt::Delimiter)
334
331
  self[0] = ar[1].to_i
335
332
  self[1] = ar[2].to_i
336
333
  self[2] = ar[3].to_f
@@ -341,13 +338,13 @@ class Ms::Sequest::Sqt::Match
341
338
  self[7] = ar[8].to_i
342
339
  self[8] = ar[9]
343
340
  self[9] = ar[10]
344
- self[14] = Ms::Ident::Peptide.sequence_to_aaseq(self[8])
341
+ self[14] = MS::Ident::Peptide.sequence_to_aaseq(self[8])
345
342
  self
346
343
  end
347
344
  end
348
345
 
349
346
 
350
- class Ms::Sequest::Sqt::Match::Percolator < Ms::Sequest::Sqt::Match
347
+ class MS::Sequest::Sqt::Match::Percolator < MS::Sequest::Sqt::Match
351
348
  # we will keep access to these old terms since we can then access routines
352
349
  # that sort on xcorr...
353
350
  #undef_method :xcorr
@@ -376,22 +373,23 @@ class Ms::Sequest::Sqt::Match::Percolator < Ms::Sequest::Sqt::Match
376
373
  end
377
374
  end
378
375
 
379
- Ms::Sequest::Sqt::Locus = Struct.new( :locus, :description, :peptides )
376
+ MS::Sequest::Sqt::Locus = Struct.new( :locus, :description )
380
377
 
381
- class Ms::Sequest::Sqt::Locus
378
+ class MS::Sequest::Sqt::Locus
382
379
  Leader = 'L'
383
380
 
384
381
  def first_entry ; self[0] end
385
382
  def reference ; self[0] end
383
+ def id ; self[0] end
386
384
 
387
385
  def initialize(locus=nil, description=nil, peptides=[])
388
- super(locus, description, peptides)
386
+ super(locus, description)
389
387
  end
390
388
 
391
389
  # returns a new Locus object
392
390
  def self.from_line(line)
393
391
  line.chomp!
394
- self.new( *line.split(Ms::Sequest::Sqt::Delimiter) ) # fills in the first two values
392
+ self.new( *line.split(MS::Sequest::Sqt::Delimiter) ) # fills in the first two values
395
393
  end
396
394
 
397
395
  end