mocca.components package
Submodules
mocca.components.databases module
Created on Thu Dec 2 16:32:36 2021
@author: haascp
- class mocca.components.databases.BaseDatabase[source]
Bases:
object
Base class for component databases with the unique constrained primary key compound_id.
- class mocca.components.databases.QualiComponentDatabase[source]
Bases:
BaseDatabase
Database storing and processing qualitative components used for peak assignment.
- class mocca.components.databases.QuantComponentDatabase[source]
Bases:
BaseDatabase
Database storing and processing quantitative components used for peak quantification.
mocca.components.models module
- class mocca.components.models.QualiComponent(compound_id: str, left: int, right: int, maximum: int, offset: int, spectrum: list, spectrum_max: list, created_from: List[ProcessedPeak])[source]
Bases:
object
Class of a qualitative component created from a number of peaks of the same compound_id.
- created_from: List[ProcessedPeak]
- class mocca.components.models.QuantComponent(compound_id: str, integrate_wl_idx: int, calib_factors: dict, calib_data: dict, calib_scores: dict, created_from: List[ProcessedPeak])[source]
Bases:
object
Class of a quantitative component created from a number of peaks of the same compound_id.
- created_from: List[ProcessedPeak]
mocca.components.quali_funcs module
Created on Fri Dec 3 09:54:04 2021
@author: haascp
mocca.components.quant_funcs module
Created on Mon Dec 20 17:20:35 2021
@author: haascp
- mocca.components.quant_funcs.create_calibration_dict(peaks, integrate_wl_idx, quali_comp_db)[source]
Creates a dictionary with all data needed to create calibration curves.
- mocca.components.quant_funcs.create_linear_models(calib_data)[source]
Creates linear models out of the given data and returns a list of linear calibration factors (calibration curve is forced through origin) and a list of corresponing R-squared values of the regression.
- mocca.components.quant_funcs.create_quant_component(peaks, quali_comp_db)[source]
Creates a quantitative component object based on the given peaks
mocca.components.utils module
Created on Fri Dec 3 13:23:45 2021
@author: haascp
- mocca.components.utils.average_ret_times_over_peaks(peaks)[source]
Calculates mean retention indices of a list of peaks.
- mocca.components.utils.average_spectra_over_peaks(peaks)[source]
Calculates mean spectrum of a list of peaks with averaged spectrum.
- mocca.components.utils.check_peaks_compound_id(peaks)[source]
Checks if all given peaks have the same compound_id and, if so, returns this compound_id.
- mocca.components.utils.filter_peaks(peaks, filter_function)[source]
Filters given peaks with regard to the given filter function (which takes a list of peaks and returns a filtered list of peaks).
- mocca.components.utils.get_filtered_peaks(peak_database, filter_function)[source]
Returns a filtered (by the given filter function) list of peaks from the database which are pure and unsaturated and have a compound_id.
- mocca.components.utils.get_filtered_peaks_by_compound(peak_database, filter_function)[source]
Creates a filtered (by the given filter function) list of peaks from the database which are pure and unsaturated and have a compound_id. From this list, it returns a dict with unique compound_id as keys and a list of corresponding peaks as values.
- mocca.components.utils.get_quant_peaks_by_compound(peak_database, filter_function)[source]
Returns a dict with compound_ids as keys and lists of peaks as values, where only peaks are includud which have is_compound True and which have a given concentration.