mzx package

Submodules

mzx.cli module

mzx.cli.main()[source]

mzx.docker module

mzx.docker.check_running() bool[source]

Check if Docker is running by executing the docker info command.

Returns:

bool: True if Docker is running (command succeeded), False otherwise.

mzx.gui module

class mzx.gui.ConverterThread(params: TConfig, parent: QWidget | None = None)[source]

Bases: QThread

finished
run()[source]
staticMetaObject = PySide6.QtCore.QMetaObject("ConverterThread" inherits "QThread": )
class mzx.gui.MainWindow[source]

Bases: QMainWindow

closeEvent(event)[source]
convert(path: str) None[source]
dragEnterEvent(event: QDropEvent) None[source]
dragLeaveEvent(_event: QDragLeaveEvent) None[source]
dropEvent(event: QDropEvent) None[source]
initUI()[source]
on_conversion_complete()[source]

Slot that runs when the conversion thread finishes.

show_popup(message: str) QMessageBox[source]
staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": )
mzx.gui.main()[source]

mzx.types module

class mzx.types.TConfig[source]

Bases: TypedDict

debug: bool
index: bool
infile: str
lockmass: bool | None
lockmass_disabled: bool | None
lockmass_function_exclude: int | None
lockmass_tolerance: float | None
neg_lockmass: float | None
outfile: str | None
overwrite: bool
peak_picking: Literal['off', 'all', 'msms', 'ms1']
pos_lockmass: float | None
remove_zeros: bool
sortbyscan: bool
type: Literal['mzml']
vendor: Literal['Agilent', 'bruker', 'Thermo', 'waters', 'unspecified']
verbose: bool

mzx.vendor module

mzx.vendor.vendor_name_from_file(filename: str) Literal['Agilent', 'bruker', 'Thermo', 'waters', 'unspecified'][source]

Determine the vendor of the file. Currently only supports Thermo and Agilent. Returns the vendor name. If the vendor is not supported, returns None.

Module contents

exception mzx.RawFileConversionError[source]

Bases: Exception

exception mzx.WatersConvertException[source]

Bases: Exception

mzx.convert_raw_file(params: TConfig) str[source]

Convert the raw file to mzML format based on the vendor.

mzx.exclusion_string(x: int) str[source]

Return a string representing “all positive integers except x,” using “start-end” ranges. By convention, “N-” means “N through ∞.”

Examples:

exclude 5 → “1-4 6-” exclude 1 → “2-” exclude 2 → “1 3-” exclude 3 → “1-2 4-”

mzx.format_function_number(s)[source]
mzx.modify_waters_scan_header(line)[source]

Modify the Waters scan header line.

mzx.msconvert(params)[source]

Converts the given file to the mzML format using the msconvert tool.

mzx.process_waters_scan_headers(file_path)[source]

Process the Waters scan headers in the given file.

mzx.run_cmd(cmd)[source]

Run a command and return the output.

mzx.waters_convert(params: TConfig) str[source]

Convert Waters raw file to mzML format.