proteobench.io.params.peaks module#
Peaks parameter parsing.
- proteobench.io.params.peaks.clean_text(text: str) str[source]#
Clean the input text by removing leading and trailing spaces, colons, commas, or tabs.
- proteobench.io.params.peaks.extract_mass_tolerance(lines: List[str], search_term: str) str | None[source]#
Extract the mass tolerance value associated with a search term, with special handling for “System Default”.
- proteobench.io.params.peaks.extract_params(file_path: str, json_file='/home/docs/checkouts/readthedocs.org/user_builds/proteobench/envs/v0.9.4/lib/python3.11/site-packages/proteobench/io/params/json/Quant/quant_lfq_DDA_ion.json') ProteoBenchParameters[source]#
Read a PEAKS settings file, extract parameters, and return them as a ProteoBenchParameters object.
- Parameters:
file_path (str) – The path to the PEAKS settings file.
- Returns:
The extracted parameters encapsulated in a ProteoBenchParameters object.
- Return type:
- proteobench.io.params.peaks.extract_value(lines: List[str], search_term: str) str | None[source]#
Extract the value associated with a search term from a list of lines.
- proteobench.io.params.peaks.extract_value_regex(lines: List[str], search_term: str) str | None[source]#
Extract the value associated with a search term using regular expressions.
- proteobench.io.params.peaks.get_items_between(lines: list, start: str, end: str, only_last: bool = False) list[source]#
Find all lines starting with ‘-’ that appear between ‘start’ and ‘end’. Return them as a list of strings, without the leading dash.
- Parameters:
- Returns:
The list of items found between the start and end terms.
- Return type: