Class: Mspire::Ident::Pepxml::MsmsPipelineAnalysis
- Inherits:
-
Object
- Object
- Mspire::Ident::Pepxml::MsmsPipelineAnalysis
- Includes:
- Merge
- Defined in:
- lib/mspire/ident/pepxml/msms_pipeline_analysis.rb
Constant Summary collapse
- XMLNS =
"http://regis-web.systemsbiology.net/pepXML"
- XMLNS_XSI =
"http://www.w3.org/2001/XMLSchema-instance"
- XSI_SCHEMA_LOCATION_BASE =
(this doesn’t actually exist), also, the space is supposed to be there
"http://regis-web.systemsbiology.net/pepXML /tools/bin/TPP/tpp/schema/pepXML_v"
- PEPXML_VERSION =
the only additions concerning a writer are from v18 are to the ‘spectrum’: retention_time_sec and activationMethodType
115
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
an Integer.
-
#summary_xml ⇒ Object
self referential path to the outputfile.
-
#xmlns ⇒ Object
include SpecIDXML Version 1.2.3 attr_writer :date attr_writer :xmlns, :xmlns_xsi, :xsi_schemaLocation attr_accessor :summary_xml.
-
#xmlns_xsi ⇒ Object
Returns the value of attribute xmlns_xsi.
-
#xsi_schema_location ⇒ Object
returns the location based on the pepxml version number.
Instance Method Summary collapse
- #block_arg ⇒ Object
-
#initialize(hash = {}, &block) ⇒ MsmsPipelineAnalysis
constructor
if block given, yields a new msms_run_summary to return value of block.
-
#to_xml(builder) ⇒ Object
uses the filename as summary_xml (if it is nil) attribute and builds a complete, valid xml document, writing it to the filename.
Methods included from Merge
Constructor Details
#initialize(hash = {}, &block) ⇒ MsmsPipelineAnalysis
if block given, yields a new msms_run_summary to return value of block
39 40 41 42 43 44 45 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 39 def initialize(hash={}, &block) @xmlns = XMLNS @xmlns_xsi = XMLNS_XSI @xsi_schema_location = xsi_schema_location @pepxml_version = PEPXML_VERSION merge!(hash, &block) end |
Instance Attribute Details
#date ⇒ Object
if no date string given, then it will set to Time.now
53 54 55 56 57 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 53 def date return @date if @date tarr = Time.now.to_a tarr[3..5].reverse.join('-') + "T#{tarr[0..2].reverse.join(':')}" end |
#msms_run_summary ⇒ Object
Returns the value of attribute msms_run_summary.
31 32 33 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 31 def msms_run_summary @msms_run_summary end |
#pepxml_version ⇒ Object
an Integer
28 29 30 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 28 def pepxml_version @pepxml_version end |
#summary_xml ⇒ Object
self referential path to the outputfile
30 31 32 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 30 def summary_xml @summary_xml end |
#xmlns ⇒ Object
include SpecIDXML Version 1.2.3 attr_writer :date attr_writer :xmlns, :xmlns_xsi, :xsi_schemaLocation attr_accessor :summary_xml
24 25 26 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 24 def xmlns @xmlns end |
#xmlns_xsi ⇒ Object
Returns the value of attribute xmlns_xsi.
25 26 27 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 25 def xmlns_xsi @xmlns_xsi end |
#xsi_schema_location ⇒ Object
returns the location based on the pepxml version number
48 49 50 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 48 def xsi_schema_location @xsi_schema_location end |
Instance Method Details
#block_arg ⇒ Object
34 35 36 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 34 def block_arg @msms_run_summary = Mspire::Ident::Pepxml::MsmsRunSummary.new end |
#to_xml(builder) ⇒ Object
uses the filename as summary_xml (if it is nil) attribute and builds a complete, valid xml document, writing it to the filename
61 62 63 64 65 66 67 |
# File 'lib/mspire/ident/pepxml/msms_pipeline_analysis.rb', line 61 def to_xml(builder) xmlb = builder || Nokogiri::XML::Builder.new xmlb.msms_pipeline_analysis(:date => date, :xmlns => xmlns, 'xsi:schemaLocation'.to_sym => xsi_schema_location, :summary_xml => summary_xml) do |xmlb| msms_run_summary.to_xml(xmlb) if msms_run_summary end builder || xmlb.doc.root.to_xml end |