Class: Ms::Sequest::SrfGroup
- Inherits:
-
Object
- Object
- Ms::Sequest::SrfGroup
- Includes:
- Id::SearchGroup
- Defined in:
- lib/ms/sequest/srf.rb
Instance Method Summary collapse
-
#initialize(arg, opts = {}, &block) ⇒ SrfGroup
constructor
see Ms::Id::Search for acceptable arguments (filename, filenames, array of objects) opts = :filter_by_precursor_mass_tolerance => true | false (default true).
- #search_class ⇒ Object
-
#to_srg(srg_filename = 'bioworks.srg') ⇒ Object
returns the filename used if the file exists, the name will be expanded to full path, otherwise just what is given.
Constructor Details
#initialize(arg, opts = {}, &block) ⇒ SrfGroup
see Ms::Id::Search for acceptable arguments (filename, filenames, array of objects) opts =
:filter_by_precursor_mass_tolerance => true | false (default true)
748 749 750 751 752 753 754 755 756 757 758 759 |
# File 'lib/ms/sequest/srf.rb', line 748 def initialize(arg, opts={}, &block) orig_opts = opts.dup indiv_opts = { :link_protein_hits => false } super(arg, opts.merge(indiv_opts)) do unless orig_opts[:link_protein_hits] == false (@peps, @prots) = merge!(@searches.map {|v| v.peps }) do |_prot, _peps| Ms::Sequest::Srf::Out::Prot.new(_prot.reference, _peps) end end end block.call(self) if block_given? end |
Instance Method Details
#search_class ⇒ Object
761 762 763 |
# File 'lib/ms/sequest/srf.rb', line 761 def search_class Ms::Sequest::Srf end |
#to_srg(srg_filename = 'bioworks.srg') ⇒ Object
returns the filename used if the file exists, the name will be expanded to full path, otherwise just what is given
768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/ms/sequest/srf.rb', line 768 def to_srg(srg_filename='bioworks.srg') File.open(srg_filename, 'w') do |v| @filenames.each do |srf_file| if File.exist? srf_file v.puts File.(srf_file) else v.puts srf_file end end end srg_filename end |