massdash.structs.TargetedDIAConfig
- class massdash.structs.TargetedDIAConfig
Bases:
objectA class representing the configuration for the extraction windows.
- ms1_mz_tol
The m/z tolerance for MS1 spectra.
- Type:
float
- mz_tol
The m/z tolerance for MS2 spectra.
- Type:
float
- rt_window
The retention time window for spectra.
- Type:
float
- im_window
The ion mobility window for spectra.
- Type:
float
- mslevel
A list of MS levels to include.
- Type:
list
- update()
Update the configuration attributes using a dictionary.
- get_im_upper_lower(im_apex: float) Tuple[float, float]
Get the upper bound and lower bound of a target IM point for a given IM window, i.e. a window of 0.06 would be 0.03 points to either side of the target IM.
- Parameters:
im_apex – (float) The target IM point to generate upper and lower bound IM coordinates for
- Returns:
(tuple) a tuple of the lower and upper bound for target IM
- get_rt_upper_lower(rt_apex: float) Tuple[float, float]
Get the upper bound and lower bound of a target RT point for a given RT window, i.e. a window of 50 would be 25 points to either side of the target RT.
- Parameters:
rt_apex – (float) The target RT point to generate upper and lower bound RT coordinates for
- Returns:
(tuple) a tuple of the lower and upper bound for target RT
- get_upper_lower_tol(target_mz: float) Tuple[float, float]
Get the upper bound and lower bound mz around a target mz given a mz tolerance in ppm
- Parameters:
target_mz – (float) The target mz to generate upper and lower bound mz coordinates for
mz_tol – (int) The m/z tolerance toget get upper and lower bounds arround target mz. Must be in ppm.
- Returns:
(tuple) a tuple of the lower and upper bound for target mz
- is_mz_in_product_mz_tol_window(check_mz: float, target_product_upper_lower_list: List[Tuple[float, float]]) bool
Check to see if a target product ion mz is within upper and lower tolerance window
- Parameters:
check_mz – (float) The target product ion mz to check
target_product_upper_lower_list – (list) A list of tuples that contain an upper and lower bound of a product mz
Return: (bool) Return a logical value
- update(config_dict)
Update the configuration attributes using a dictionary.
- Parameters:
config_dict (dict) – A dictionary containing configuration values.
Example
- config_dict = {
‘rt_window’: 50, ‘im_window’: 0.06, ‘mslevel’: [1, 2]
} config.update(config_dict)