metadata¶
-
dimspy.metadata.
count_ms_types
(hs: list) → int[source]¶ Count the number of unique ms types
- Parameters
hs – List of headers or filter strings
- Returns
Count
-
dimspy.metadata.
count_scan_types
(hs: list) → int[source]¶ Count the number of unique scan types
- Parameters
hs – List of headers or filter strings
- Returns
Count
-
dimspy.metadata.
interpret_method
(mzrs: list)[source]¶ Interpret and define type of method
- Parameters
mzrs – Nested list of m/z ranges / windows
- Returns
Type of MS method
-
dimspy.metadata.
mode_type_from_header
(h: str) → str[source]¶ Extract scan mode from the header of filter string
- Parameters
h – header or filter string
- Returns
Scan type (e.g. p = profile, c = centroid)
-
dimspy.metadata.
ms_type_from_header
(h: str) → str[source]¶ Extract the ms type from header or filter string
- Parameters
h – header or filter string
- Returns
ms type (e.g. FTMS and ITMS)
-
dimspy.metadata.
mz_range_from_header
(h: str) → Sequence[float][source]¶ Extract m/z range from header or filter string
- Parameters
h – Header or filter string
- Returns
m/z range
-
dimspy.metadata.
scan_type_from_header
(h: str) → str[source]¶ Extract the scan type from the header of filter string
- Parameters
h – header or filter string
- Returns
Scan type (e.g. full or sim)
-
dimspy.metadata.
to_int
(x)[source]¶ - Parameters
x – Value to convert to int
- Returns
Value as int (or False if conversion not possible)
-
dimspy.metadata.
update_labels
(pm: dimspy.models.peak_matrix.PeakMatrix, fn_tsv: str) → dimspy.models.peak_matrix.PeakMatrix[source]¶ Update Sample labels PeakMatrix object :param pm: peakMatrix Object :param fn_tsv: Path to tab-separated file :return: peakMatrix Object
-
dimspy.metadata.
update_metadata_and_labels
(peaklists: Sequence[dimspy.models.peaklist.PeakList], fl: Dict)[source]¶ Update metadata
- Parameters
peaklists – List of peaklist Objects
fl – Dictionary with meta data
- Returns
List of peaklist objects