Class: Sequest::PepXML::SearchSummary
- Inherits:
-
Object
- Object
- Sequest::PepXML::SearchSummary
- Includes:
- SpecIDXML
- Defined in:
- lib/ms/sequest/pepxml.rb
Instance Attribute Summary collapse
-
#base_name ⇒ Object
Returns the value of attribute base_name.
-
#modifications ⇒ Object
Returns the value of attribute modifications.
-
#out_data ⇒ Object
Returns the value of attribute out_data.
-
#out_data_type ⇒ Object
Returns the value of attribute out_data_type.
-
#params ⇒ Object
Returns the value of attribute params.
-
#search_database ⇒ Object
A SearchDatabase object (responds to :local_path and :type).
-
#search_id ⇒ Object
by default, “1”.
Class Method Summary collapse
Instance Method Summary collapse
- #from_pepxml_node(node) ⇒ Object
-
#initialize(prms = nil, modifications_string = '', args = nil) ⇒ SearchSummary
constructor
if given a sequest params object, then will set the following attributes: args is a hash of parameters modifications_string -> See Modifications.
- #method_missing(symbol, *args) ⇒ Object
- #to_pepxml ⇒ Object
Constructor Details
#initialize(prms = nil, modifications_string = '', args = nil) ⇒ SearchSummary
if given a sequest params object, then will set the following attributes: args is a hash of parameters modifications_string -> See Modifications
810 811 812 813 814 815 816 817 |
# File 'lib/ms/sequest/pepxml.rb', line 810 def initialize(prms=nil, modifications_string='', args=nil) @search_id = "1" if prms @params = prms @modifications = Sequest::PepXML::Modifications.new(prms, modifications_string) end if args ; set_from_hash(args) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
819 820 821 |
# File 'lib/ms/sequest/pepxml.rb', line 819 def method_missing(symbol, *args) if @params ; @params.send(symbol, *args) end end |
Instance Attribute Details
#base_name ⇒ Object
Returns the value of attribute base_name.
799 800 801 |
# File 'lib/ms/sequest/pepxml.rb', line 799 def base_name @base_name end |
#modifications ⇒ Object
Returns the value of attribute modifications.
804 805 806 |
# File 'lib/ms/sequest/pepxml.rb', line 804 def modifications @modifications end |
#out_data ⇒ Object
Returns the value of attribute out_data.
801 802 803 |
# File 'lib/ms/sequest/pepxml.rb', line 801 def out_data @out_data end |
#out_data_type ⇒ Object
Returns the value of attribute out_data_type.
800 801 802 |
# File 'lib/ms/sequest/pepxml.rb', line 800 def out_data_type @out_data_type end |
#params ⇒ Object
Returns the value of attribute params.
798 799 800 |
# File 'lib/ms/sequest/pepxml.rb', line 798 def params @params end |
#search_database ⇒ Object
A SearchDatabase object (responds to :local_path and :type)
806 807 808 |
# File 'lib/ms/sequest/pepxml.rb', line 806 def search_database @search_database end |
#search_id ⇒ Object
by default, “1”
803 804 805 |
# File 'lib/ms/sequest/pepxml.rb', line 803 def search_id @search_id end |
Class Method Details
.from_pepxml_node(node) ⇒ Object
836 837 838 |
# File 'lib/ms/sequest/pepxml.rb', line 836 def self.from_pepxml_node(node) self.new.from_pepxml_node(node) end |
Instance Method Details
#from_pepxml_node(node) ⇒ Object
840 841 842 |
# File 'lib/ms/sequest/pepxml.rb', line 840 def from_pepxml_node(node) raise NotImplementedError, "right now we just have the xml node at your disposal" end |
#to_pepxml ⇒ Object
823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/ms/sequest/pepxml.rb', line 823 def to_pepxml element_xml(:search_summary, [:base_name, :search_engine, :precursor_mass_type, :fragment_mass_type, :out_data_type, :out_data, :search_id]) do search_database.to_pepxml + if @params.enzyme =~ /^No_Enzyme/ '' else short_element_xml(:enzymatic_search_constraint, [:enzyme, :max_num_internal_cleavages, :min_number_termini]) end + @modifications.to_pepxml + Sequest::PepXML::Parameters.new(@params).to_pepxml end end |