pygecko.analysis package
Submodules
pygecko.analysis.analysis module
- class pygecko.analysis.analysis.Analysis
Bases:
objectA class wrapping functions to analyze GC data.
- static calc_plate_conv(ms_sequence: MS_Sequence, fid_sequence: FID_Sequence, layout: Reaction_Array, path: str | None = None, index: int = 0, **kwargs) ndarray
Matches GC-MS and GC-FID peaks and quantifies the conversion of the reactions.
- Parameters:
ms_sequence (MS_Sequence) – MS_Sequence object containing the GC-MS data.
fid_sequence (FID_Sequence) – FID_Sequence object containing the GC-FID data.
layout (Reaction_Array) – Well_Plate object containing the combinatorial reaction layout.
path (str|None, optional) – Path to write the results to. Defaults to None.
- Returns:
Numpy array containing the quantification results, retention times and smiles for the analytes.
- Return type:
np.ndarray
- static calc_plate_yield(ms_sequence: MS_Sequence, fid_sequence: FID_Sequence, layout: Reaction_Array | Product_Array, path: str | None = None, **kwargs) ndarray
Matches GC-MS and GC-FID peaks and quantifies the yields of the reactions.
- Parameters:
ms_sequence (MS_Sequence) – MS_Sequence object containing the GC-MS data.
fid_sequence (FID_Sequence) – FID_Sequence object containing the GC-FID data.
layout (Reaction_Array|Product_Array) – Reaction_Array or Product_Array object containing the reaction
layout.
path (str|None, optional) – Path to write the results to. Defaults to None.
- Returns:
Numpy array containing the quantification results, retention times and smiles for the analytes.
- Return type:
np.ndarray
- static fit_calibration_curve(fid_sequence: FID_Sequence, analyte: Analyte, ratios: list[float], intercept: bool = False) tuple[float, float]
Fits a calibration curve to the analyte in a FID sequence using scikit-learn.
- Parameters:
fid_sequence (FID_Sequence) – FID_Sequence object containing the GC-FID data.
analyte (Analyte) – Analyte to fit the calibration curve to.
ratios (list[float]) – List of concentration ratios for calibration.
intercept (bool) – If True, fit intercept (default True). If False, force through origin.
- Returns:
(slope, intercept) of calibration curve.
- Return type:
tuple[float, float]
- static match_mz_plate(ms_sequence: MS_Sequence, layout: Reaction_Array, path: str | None = None, return_canidates: bool = True, check_iso: bool = False, **kwargs) DataFrame
Matches m/z values of the MS peaks to the analytes in the reaction layout. :param ms_sequence: MS_Sequence object containing the GC-MS data. :param layout: Reaction_Array object containing the combinatorial reaction layout. :param path: (str|None): Path to write the results to. Defaults to None. :param **kwargs: Additional keyword arguments to pass to the match_mol method.
- Returns:
DataFrame containing the m/z values, retention times and smiles for the analytes.
- Return type:
pd.DataFrame
- static quantify_analyte(fid_sequence: FID_Sequence, rt_analyte: float, analyte: Analyte | None = None, method='polyarc', path: str | None = None, **kwargs) dict
Returns the yields of Analytes at a given retention time in a FID sequence.
- Parameters:
fid_sequence (FID_Sequence) – FID_Sequence object containing the GC-FID data.
rt (float) – Retention time to quantify the Analytes at.
analyte (Analyte) – Analyte to quantify.
method (str) – Method to use for quantification. Defaults to ‘polyarc’ can be set to calibration to use calibration curve.
path (str|None) – Path to write the results to. Defaults to None.
- Returns:
Dictionary containing the yields of the Analytes in the FID sequence.
- Return type:
dict
- static quantify_plate(fid_sequence: FID_Sequence, rt_analyte: float, analyte: Analyte | None = None, method='polyarc', path: str | None = None, **kwargs) ndarray
Returns the yields of Analytes at a given retention time in the FID sequence of a plate.
- Parameters:
fid_sequence (FID_Sequence) – FID_Sequence object containing the GC-FID data.
rt (float) – Retention time to quantify the Analytes at.
analyte (Analyte) – Analyte to quantify.
method (str) – Method to use for quantification. Defaults to ‘polyarc’ can be set to calibration to use calibration curve.
path (str|None) – Path to write the results to. Defaults to None.
- Returns:
Array containing the yields of the Analytes in the FID sequence.
- Return type:
np.ndarray