Class: Sequest::PepXML::MSMSRunSummary
- Inherits:
-
Object
- Object
- Sequest::PepXML::MSMSRunSummary
- Defined in:
- lib/ms/sequest/pepxml.rb
Instance Attribute Summary collapse
-
#base_name ⇒ Object
the version of TPP you are using (determines xml output) The name of the pep xml file (without extension) (but this is a long filename!!!).
-
#ms_detector ⇒ Object
Returns the value of attribute ms_detector.
-
#ms_ionization ⇒ Object
Returns the value of attribute ms_ionization.
-
#ms_manufacturer ⇒ Object
The name of the mass spec manufacturer.
-
#ms_mass_analyzer ⇒ Object
Returns the value of attribute ms_mass_analyzer.
-
#ms_model ⇒ Object
Returns the value of attribute ms_model.
-
#pepxml_version ⇒ Object
Returns the value of attribute pepxml_version.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
-
#raw_data_type ⇒ Object
Returns the value of attribute raw_data_type.
-
#sample_enzyme ⇒ Object
A SampleEnzyme object (responds to: name, cut, no_cut, sense).
-
#search_summary ⇒ Object
A SearchSummary object.
-
#spectrum_queries ⇒ Object
An array of spectrum_queries.
Class Method Summary collapse
Instance Method Summary collapse
-
#from_pepxml_node(node) ⇒ Object
peps correspond to search_results.
-
#initialize(hash = nil) ⇒ MSMSRunSummary
constructor
takes a hash of name, value pairs if block given, spectrum_queries (should be array of spectrum queries) is set to the return value of the block.
- #search_hit_class ⇒ Object
- #to_pepxml ⇒ Object
Constructor Details
#initialize(hash = nil) ⇒ MSMSRunSummary
takes a hash of name, value pairs if block given, spectrum_queries (should be array of spectrum queries) is set to the return value of the block
121 122 123 124 125 126 127 |
# File 'lib/ms/sequest/pepxml.rb', line 121 def initialize(hash=nil) @spectrum_queries = [] if hash instance_var_set_from_hash(hash) end if block_given? ; @spectrum_queries = yield end end |
Instance Attribute Details
#base_name ⇒ Object
the version of TPP you are using (determines xml output) The name of the pep xml file (without extension) (but this is a long filename!!!)
100 101 102 |
# File 'lib/ms/sequest/pepxml.rb', line 100 def base_name @base_name end |
#ms_detector ⇒ Object
Returns the value of attribute ms_detector.
105 106 107 |
# File 'lib/ms/sequest/pepxml.rb', line 105 def ms_detector @ms_detector end |
#ms_ionization ⇒ Object
Returns the value of attribute ms_ionization.
108 109 110 |
# File 'lib/ms/sequest/pepxml.rb', line 108 def ms_ionization @ms_ionization end |
#ms_manufacturer ⇒ Object
The name of the mass spec manufacturer
102 103 104 |
# File 'lib/ms/sequest/pepxml.rb', line 102 def ms_manufacturer @ms_manufacturer end |
#ms_mass_analyzer ⇒ Object
Returns the value of attribute ms_mass_analyzer.
104 105 106 |
# File 'lib/ms/sequest/pepxml.rb', line 104 def ms_mass_analyzer @ms_mass_analyzer end |
#ms_model ⇒ Object
Returns the value of attribute ms_model.
103 104 105 |
# File 'lib/ms/sequest/pepxml.rb', line 103 def ms_model @ms_model end |
#pepxml_version ⇒ Object
Returns the value of attribute pepxml_version.
109 110 111 |
# File 'lib/ms/sequest/pepxml.rb', line 109 def pepxml_version @pepxml_version end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
107 108 109 |
# File 'lib/ms/sequest/pepxml.rb', line 107 def raw_data @raw_data end |
#raw_data_type ⇒ Object
Returns the value of attribute raw_data_type.
106 107 108 |
# File 'lib/ms/sequest/pepxml.rb', line 106 def raw_data_type @raw_data_type end |
#sample_enzyme ⇒ Object
A SampleEnzyme object (responds to: name, cut, no_cut, sense)
112 113 114 |
# File 'lib/ms/sequest/pepxml.rb', line 112 def sample_enzyme @sample_enzyme end |
#search_summary ⇒ Object
A SearchSummary object
114 115 116 |
# File 'lib/ms/sequest/pepxml.rb', line 114 def search_summary @search_summary end |
#spectrum_queries ⇒ Object
An array of spectrum_queries
116 117 118 |
# File 'lib/ms/sequest/pepxml.rb', line 116 def spectrum_queries @spectrum_queries end |
Class Method Details
.from_pepxml_node(node) ⇒ Object
144 145 146 |
# File 'lib/ms/sequest/pepxml.rb', line 144 def self.from_pepxml_node(node) self.new.from_pepxml_node(node) end |
Instance Method Details
#from_pepxml_node(node) ⇒ Object
peps correspond to search_results
149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/ms/sequest/pepxml.rb', line 149 def from_pepxml_node(node) @base_name = node['base_name'] @ms_manufacturer = node['msManufacturer'] @ms_model = node['msModel'] @ms_manufacturer = node['msIonization'] @ms_mass_analyzer = node['msMassAnalyzer'] @ms_detector = node['msDetector'] @raw_data_type = node['raw_data_type'] @raw_data = node['raw_data'] self end |
#search_hit_class ⇒ Object
140 141 142 |
# File 'lib/ms/sequest/pepxml.rb', line 140 def search_hit_class Sequest::PepXML::SearchHit end |
#to_pepxml ⇒ Object
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/ms/sequest/pepxml.rb', line 129 def to_pepxml case Sequest::PepXML.pepxml_version when 18 element_xml_and_att_string(:msms_run_summary, "base_name=\"#{base_name}\" msManufacturer=\"#{ms_manufacturer}\" msModel=\"#{ms_model}\" msIonization=\"#{ms_ionization}\" msMassAnalyzer=\"#{ms_mass_analyzer}\" msDetector=\"#{ms_detector}\" raw_data_type=\"#{raw_data_type}\" raw_data=\"#{raw_data}\"") do sample_enzyme.to_pepxml + search_summary.to_pepxml + spectrum_queries.map {|sq| sq.to_pepxml }.join end end end |