lib/spec_id/bioworks.rb in mspire-0.1.5 vs lib/spec_id/bioworks.rb in mspire-0.1.7
- old
+ new
@@ -13,16 +13,19 @@
module SpecIDXML; end
class SpecID::Bioworks
# Regular expressions
@@bioworksinfo_re = /<bioworksinfo>(.*)<\/bioworksinfo>/o
+ @@modifications_re = /<modifications>(.*)<\/modifications>/o
@@protein_re = /<protein>/o
@@origfilename_re = /<origfilename>(.*)<\/origfilename>/o
@@origfilepath_re = /<origfilepath>(.*)<\/origfilepath>/o
attr_accessor :prots, :version, :global_filename, :origfilename, :origfilepath
+ # a string of modifications e.g., "(M* +15.99491) (S@ +14.9322) "
+ attr_accessor :modifications
attr_writer :peps
def hi_prob_best ; false end
# -> prints to file filename1.sqt, filename2.sqt
@@ -194,10 +197,11 @@
@origfilepath = get_regex_val(fh, @@origfilepath_re)
if @origfilename
@global_filename = @origfilename.gsub(File.extname(@origfilename), "")
end
@version = get_regex_val(fh, @@bioworksinfo_re)
+ @modifications = get_regex_val(fh, @@modifications_re)
@prots = get_prots(fh, self)
fh.close
end
def get_prots(fh, bioworks)
@@ -454,10 +458,10 @@
(first_scan, last_scan) = first_scan
else
first_scan = first_scan[0]
last_scan = first_scan
end
- return base_name, first_scan, last_scan
+ [base_name, first_scan, last_scan]
end
def file=(arg)
## Set these vals by index:
#puts "AERRG: #{arg}"