SwathFile#

class pyopenms.SwathFile#

Bases: ProgressLogger

File adapter for Swath files.

This class can load SWATH files in different storage versions. The most convenient file is a single MzML file which contains one experiment. However, also the loading of a list of files is supported (loadSplit) where it is assumed that each individual file only contains scans from one precursor isolation window (one SWATH). Finally, experimental support for mzXML is available but needs to be selected with a specific compile flag (this is not for everyday use).

__init__() → None#
__init__(arg: pyopenms.SwathFile, /) → None

Methods

__init__()

endProgress([bytes_processed])

Ends the progress display

getLogType()

Returns the type of progress log being used

loadMzML(file, tmp, exp_meta[, readoptions, ...])

Loads a Swath run from a single mzML file

loadMzXML(file, tmp, exp_meta[, readoptions])

Loads a Swath run from a single mzXML file

loadSplit(file_list, tmp, exp_meta[, ...])

Loads a Swath run from a list of split mzML files

nextProgress()

Increment progress by 1 (according to range begin-end)

setLogType(type)

Sets the progress log that should be used.

setProgress(value)

Sets the current progress

startProgress(begin, end, label)

Attributes

CMD = 0#
GUI = 1#
NONE = 2#
endProgress(bytes_processed: int = 0) → None#

Ends the progress display

getLogType() → pyopenms.ProgressLogger.LogType#

Returns the type of progress log being used

loadMzML(file: str, tmp: str, exp_meta: pyopenms.ExperimentalSettings, readoptions: str = 'normal', plugin_consumer: pyopenms.IMSDataConsumer | None = None) → list[pyopenms.SwathMap]#

Loads a Swath run from a single mzML file

Using the plugin_consumer, you can provide a custom consumer which will be chained into the process of loading the data and making it available (depending on readoptions). This is useful if you want to modify the data a priori or extract some other information using MSDataTransformingConsumer (for example). Make sure it leaves the data intact, such that the returned SwathMaps are actually useful

Parameters:
  • file – Input filename

  • tmp – Temporary directory (for cached data)

  • exp_meta – Experimental metadata from mzML file

  • readoptions – How are spectra accessed after reading - tradeoff between memory usage and time (disk caching)

  • plugin_consumer – An intermediate custom consumer

Returns:

Swath maps for MS2 and MS1 (unless readoptions == split, which returns no data)

loadMzXML(file: str, tmp: str, exp_meta: pyopenms.ExperimentalSettings, readoptions: str = 'normal') → list[pyopenms.SwathMap]#

Loads a Swath run from a single mzXML file

loadSplit(file_list: list[str], tmp: str, exp_meta: pyopenms.ExperimentalSettings, readoptions: str = 'normal') → list[pyopenms.SwathMap]#

Loads a Swath run from a list of split mzML files

nextProgress() → None#

Increment progress by 1 (according to range begin-end)

setLogType(type: pyopenms.ProgressLogger.LogType) → None#

Sets the progress log that should be used. The default type is NONE!

setProgress(value: int) → None#

Sets the current progress

startProgress(begin: int, end: int, label: str) → None#