proteobench.io.params.alphadia module#
AlphaDIA parameter parsing.
- proteobench.io.params.alphadia.clean_line(line: str) str[source]#
Clean up a line by removing ANSI escape codes and trimming whitespace, as well as removing timestamps.
- proteobench.io.params.alphadia.clean_up_parameters(all_parameters: Dict[str, str]) None[source]#
Clean up parameters by removing redundant keys and processing values.
- proteobench.io.params.alphadia.detect_newer_version(lines: List[str]) bool[source]#
Detect if the log file is from a newer version (>= 1.10) of AlphaDIA based on the presence of ‘user defined’ in the lines.
- proteobench.io.params.alphadia.extract_params(file_path: str, json_file='/home/docs/checkouts/readthedocs.org/user_builds/proteobench/envs/v0.15.5/lib/python3.11/site-packages/proteobench/io/params/json/Quant/quant_lfq_DIA_ion.json') Dict[str, str][source]#
Extract parameters from the log file and return them as a dictionary.
- proteobench.io.params.alphadia.extract_values_from_nested_lines(lines: List[str], start_index: int, debug: bool = False) List[int][source]#
Extract values from lines that are indented, following the format for parameters like precursor_len.
- proteobench.io.params.alphadia.initialize_default_parameters() Dict[str, str][source]#
Initialize default parameters.
- proteobench.io.params.alphadia.map_keys_to_desired_format(all_parameters: Dict[str, str]) None[source]#
Map keys to the desired format.
- proteobench.io.params.alphadia.parse_key_value(line: str) Tuple[str, str][source]#
Parse a key-value pair from a line in the log. It assumes the format ‘key: value’.
- proteobench.io.params.alphadia.process_fragment_mz(lines: List[str], index: int, all_parameters: Dict[str, str]) None[source]#
Process fragment m/z parameters.
- proteobench.io.params.alphadia.process_key_value_line(cleaned_line: str, all_parameters: Dict[str, str], version_filled: bool) bool[source]#
Process a line containing a key-value pair.
- proteobench.io.params.alphadia.process_precursor_charge(lines: List[str], index: int, all_parameters: Dict[str, str]) None[source]#
Process precursor charge parameters.
- proteobench.io.params.alphadia.process_precursor_len(lines: List[str], index: int, all_parameters: Dict[str, str]) None[source]#
Process precursor length parameters.