proteobench.io.params.metamorpheus module#

Extract parameters from a MetaMorpheus TOML file and convert them to a pandas Series.

proteobench.io.params.metamorpheus.extract_params(file_path_1, file_path_2) ProteoBenchParameters[source]#
proteobench.io.params.metamorpheus.format_tolerances(tolerance: str) str[source]#

Format mass tolerance values from a string to a standardized format.

Parameters:

tolerance (str) – Mass tolerance in string format (e.g., “±20.0000 PPM”)

Returns:

Formatted mass tolerance as a string.

Return type:

str

proteobench.io.params.metamorpheus.load_files(file1: str | IO, file2: str | IO) Tuple[str | None, dict | None][source]#

Load two files (IO objects or file paths), returning: - The first line from a plain text file as the version string - A dictionary parsed from a TOML file

Returns:

versions_line, settings_dict

Return type:

Tuple[Union[str, None], Union[dict, None]]

proteobench.io.params.metamorpheus.parse_modifications(mods: str) list[source]#

Parse modifications from a string or list format into a standardized list.

Parameters:

mods (Union[str]) – Modifications in string format (e.g., “”Common Fixed Carbamidomethyl on C Common Fixed Carbamidomethyl on U””)

Returns:

List of modifications.

Return type:

list