Class: Sequest::PepXML::MSMSPipelineAnalysis
- Inherits:
-
Object
- Object
- Sequest::PepXML::MSMSPipelineAnalysis
- Includes:
- SpecIDXML
- Defined in:
- lib/ms/sequest/pepxml.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
if no date string given, then it will set to Time.now.
-
#msms_run_summary ⇒ Object
Returns the value of attribute msms_run_summary.
-
#pepxml_version ⇒ Object
Returns the value of attribute pepxml_version.
-
#summary_xml ⇒ Object
Returns the value of attribute summary_xml.
- #xmlns ⇒ Object
- #xmlns_xsi ⇒ Object
- #xsi_schema_location ⇒ Object
-
#xsi_schemaLocation ⇒ Object
writeonly
Sets the attribute xsi_schemaLocation.
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ MSMSPipelineAnalysis
constructor
if block given, sets msms_run_summary to block.
- #to_pepxml ⇒ Object
Constructor Details
#initialize(hash = nil) ⇒ MSMSPipelineAnalysis
if block given, sets msms_run_summary to block
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ms/sequest/pepxml.rb', line 40 def initialize(hash=nil) @xmlns = nil @xmlns_xsi = nil @xsi_schema_location = nil if hash self.set_from_hash(hash) end if block_given? @msms_run_summary = yield end end |
Instance Attribute Details
#date ⇒ Object
if no date string given, then it will set to Time.now
53 54 55 56 57 58 59 60 |
# File 'lib/ms/sequest/pepxml.rb', line 53 def date if @date ; @date else case Sequest::PepXML.pepxml_version when 18 ; tarr = Time.now.to_a ; tarr[3..5].reverse.join('-') + "T#{tarr[0..2].reverse.join(':')}" end end end |
#msms_run_summary ⇒ Object
Returns the value of attribute msms_run_summary.
37 38 39 |
# File 'lib/ms/sequest/pepxml.rb', line 37 def msms_run_summary @msms_run_summary end |
#pepxml_version ⇒ Object
Returns the value of attribute pepxml_version.
36 37 38 |
# File 'lib/ms/sequest/pepxml.rb', line 36 def pepxml_version @pepxml_version end |
#summary_xml ⇒ Object
Returns the value of attribute summary_xml.
33 34 35 |
# File 'lib/ms/sequest/pepxml.rb', line 33 def summary_xml @summary_xml end |
#xmlns ⇒ Object
62 63 64 65 66 |
# File 'lib/ms/sequest/pepxml.rb', line 62 def xmlns if @xmlns ; @xmlns else ; "http://regis-web.systemsbiology.net/pepXML" end end |
#xmlns_xsi ⇒ Object
68 69 70 71 72 |
# File 'lib/ms/sequest/pepxml.rb', line 68 def xmlns_xsi if @xmlns_xsi ; @xmlns_xsi else ; "http://www.w3.org/2001/XMLSchema-instance" end end |
#xsi_schema_location ⇒ Object
74 75 76 77 78 |
# File 'lib/ms/sequest/pepxml.rb', line 74 def xsi_schema_location if @xsi_schema_location ; @xsi_schema_location else ; "http://regis-web.systemsbiology.net/pepXML /tools/bin/TPP/tpp/schema/pepXML_v18.xsd" end end |
#xsi_schemaLocation=(value) ⇒ Object (writeonly)
Sets the attribute xsi_schemaLocation
32 33 34 |
# File 'lib/ms/sequest/pepxml.rb', line 32 def xsi_schemaLocation=(value) @xsi_schemaLocation = value end |
Instance Method Details
#to_pepxml ⇒ Object
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ms/sequest/pepxml.rb', line 80 def to_pepxml case Sequest::PepXML.pepxml_version when 18 element_xml_and_att_string(:msms_pipeline_analysis, "date=\"#{date}\" xmlns=\"#{xmlns}\" xmlns:xsi=\"#{xmlns_xsi}\" xsi:schemaLocation=\"#{xsi_schema_location}\" summary_xml=\"#{summary_xml}\"") do @msms_run_summary.to_pepxml end else abort "Don't know how to deal with version: #{Sequest::PepXML.pepxml_version}" end end |