class Mspire::Mzml::ScanList

MUST supply a child term of MS:1000570 (spectra combination) only once

e.g.: MS:1000571 (sum of spectra)
e.g.: MS:1000573 (median of spectra)
e.g.: MS:1000575 (mean of spectra)
e.g.: MS:1000795 (no combination)

Public Class Methods

from_xml(xml, link) click to toggle source
# File lib/mspire/mzml/scan_list.rb, line 31
def self.from_xml(xml, link)
  scan_list = self.new
  scan_n = scan_list.describe_from_xml!(xml, link[:ref_hash])
  if scan_n
    loop do
      scan_list << Mspire::Mzml::Scan.from_xml(scan_n, link)
      break unless scan_n = scan_n.next
    end
  end
  scan_list
end
new() { |self| ... } click to toggle source
# File lib/mspire/mzml/scan_list.rb, line 16
def initialize
  params_init
  yield(self) if block_given?
end

Public Instance Methods

list_xml(builder, default_ids)
Alias for: to_xml
to_xml(builder, default_ids) click to toggle source
Calls superclass method Mspire::Paramable#to_xml
# File lib/mspire/mzml/scan_list.rb, line 21
def to_xml(builder, default_ids)
  builder.scanList(count: self.size) do |sl_n|
    super(sl_n)
    self.each do |scan|
      scan.to_xml(sl_n, default_ids)
    end
  end
  builder
end
Also aliased as: list_xml