Data Processing¶
mzmlpy.elems.data_processing.DataProcessing
dataclass
¶
Bases: _DataTreeWrapper
Named collection of ordered processing methods describing how spectral data was transformed.
id
property
¶
Get the data processing's id attribute.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the |
processing_methods
property
¶
processing_methods: tuple[ProcessingMethod, ...]
Get the ordered processing methods applied under this data processing.
serialize
¶
Return the element as nested dicts: tag, attributes, text, children.
The result is a fresh copy; changing it does not change the wrapped element.
Source code in src/mzmlpy/elems/dtree_wrapper.py
get_attribute
¶
ProcessingMethod¶
mzmlpy.elems.data_processing.ProcessingMethod
dataclass
¶
Bases: _ParamGroup
A single data processing step applied to the spectral data, with an order index and software reference.
cv_params
cached
property
¶
cv_params: tuple[CvParam, ...]
The element's cvParams, in document order.
user_params
cached
property
¶
user_params: tuple[UserParam, ...]
The element's userParams, in document order.
ref_params
cached
property
¶
ref_params: tuple[ReferenceableParamGroupRef, ...]
The element's referenceableParamGroupRefs, in document order.
serialize
¶
Return the element as nested dicts: tag, attributes, text, children.
The result is a fresh copy; changing it does not change the wrapped element.
Source code in src/mzmlpy/elems/dtree_wrapper.py
get_attribute
¶
get_cv_param
¶
get_cv_param(id: str) -> CvParam | None
Get a cvParam by accession or name, or None if absent.
has_cv_param
¶
Check if a cvParam with the given accession or name exists.
cv_float
¶
Return a cvParam's value as a float, or None if the term is absent or has no value.
Raises MzmlError naming the term and its bad value if the value is present but not numeric — more actionable than a bare "could not convert string to float".
Source code in src/mzmlpy/elems/dtree_wrapper.py
cv_int
¶
Return a cvParam's value as an int, or None if absent or valueless (see :meth:cv_float).
Source code in src/mzmlpy/elems/dtree_wrapper.py
has_user_param
¶
get_ref_param
¶
get_ref_param(
ref: str,
) -> ReferenceableParamGroupRef | None
Get a referenceable parameter by ref.