Module: Mspire::Mzml::DataArrayContainerLike

Includes:
CV::Paramable
Included in:
Chromatogram, Spectrum
Defined in:
lib/mspire/mzml/data_array_container_like.rb

Instance Attribute Summary collapse

Attributes included from CV::Paramable

#cv_params, #ref_param_groups, #user_params

Instance Method Summary collapse

Methods included from CV::Paramable

#accessionable_params, #describe!, #describe_from_xml!, #describe_many!, #describe_self_from_xml!, #each_accessionable_param, #each_param, #fetch, #fetch_by_accession, #initialize, #param?, #param_by_accession, #params, #params?, #reject!, #replace!, #replace_many!, #to_xml

Instance Attribute Details

#data_arraysObject

(optional) an array of Mspire::Mzml::DataArray



27
28
29
# File 'lib/mspire/mzml/data_array_container_like.rb', line 27

def data_arrays
  @data_arrays
end

#data_processingObject

(optional) an Mspire::Mzml::DataProcessing object



20
21
22
# File 'lib/mspire/mzml/data_array_container_like.rb', line 20

def data_processing
  @data_processing
end

#idObject

(required) the spectrum id matching this general pattern: S+=S+( S+=S+)*)



14
15
16
# File 'lib/mspire/mzml/data_array_container_like.rb', line 14

def id
  @id
end

#indexObject

(required [at xml write time]) the index in the spectrum list



17
18
19
# File 'lib/mspire/mzml/data_array_container_like.rb', line 17

def index
  @index
end

Instance Method Details

#data_array_xml_attsObject

returns a hash with id, index, defaultArrayLength



42
43
44
# File 'lib/mspire/mzml/data_array_container_like.rb', line 42

def data_array_xml_atts
  {index: @index, id: @id, defaultArrayLength: default_array_length}
end

#default_array_lengthObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/mspire/mzml/data_array_container_like.rb', line 29

def default_array_length
  if @data_arrays
    if @data_arrays.first
      @data_arrays.first.size
    else
      0
    end
  else
    0
  end
end