mocca.chromatogram package

Submodules

mocca.chromatogram.assign module

Created on Fri Dec 17 18:55:41 2021

@author: haascp

mocca.chromatogram.assign.assign_best_match_peak(peaks)[source]

Assigns the peak with the best correlation coefficient with the compound id and updates all remaining peaks accordingly.

mocca.chromatogram.assign.assign_matched_peaks(peaks, assigned_peaks=[])[source]

Assigns peaks containing matches with compound ids. In the rare case, that some peaks will not contain matches anymore, these are given back as unassigned and unmatched peaks.

mocca.chromatogram.assign.assign_peaks_compound(chromatogram, compound)[source]

Assigns all matched peaks with compound_ids.

mocca.chromatogram.assign.assign_peaks_react(chromatogram, peak_db)[source]

Assigns peaks of reaction runs with compound ids using unknown compound ids for unmatched peaks.

mocca.chromatogram.assign.assign_unmatched_peaks_compound(peaks, compound_id, impurity_counter=0)[source]

Assigns peaks which do not contain matches with unknown compound ids.

mocca.chromatogram.assign.assign_unmatched_peaks_react(peaks, peak_db)[source]

Assigns peaks which do not contain matches with unknown compound ids.

mocca.chromatogram.assign.get_best_match_compound_id(peak)[source]

Returns the compound id of the best match of the given peak.

mocca.chromatogram.assign.get_matched_peaks(peaks)[source]

Returns all peaks which have possible matches.

mocca.chromatogram.assign.get_max_integral_peak(peaks)[source]

Returns the peak with the maximum integral value in the given list of peaks.

mocca.chromatogram.assign.get_next_unknown_id(peak_db)[source]

Returns the next unknown compound_id.

mocca.chromatogram.assign.get_unknown_impurity_peaks(assigned_peaks)[source]

Returns all peaks which are a compound impurity or are unknown.

mocca.chromatogram.assign.get_unmatched_peaks(peaks)[source]

Returns all peaks which do not have possible matches.

mocca.chromatogram.assign.reassign_impurities(chromatogram, peak_db, quali_comp_db, spectrum_correl_coef_thresh, relative_distance_thresh, print_similarity_dicts=False)[source]

This function is only allowed to be run in the process_all_experiments function which has to be run everytime a new compound should be added to quali_comp_db.

mocca.chromatogram.assign.sort_peaks_by_best_match(peaks)[source]

Sorts peaks by descending spectrum correlation coefficient in their matches.

mocca.chromatogram.assign.update_peaks_and_matches(sorted_peaks)[source]

Triggered after peak assignment. Deletes the peak which was assigned and removes the consumed compound id from the matches of all remaining peaks.

mocca.chromatogram.correct module

Created on Fri Dec 10 10:54:24 2021

@author: haascp

mocca.chromatogram.correct.correct_istd_offset(chromatogram, quali_component_db, absorbance_threshold, spectrum_correl_coef_thresh, relative_distance_thresh)[source]

Corrects the peaks of the chromatogram by the average of the internal standard offsets. Adds the offset to the peak objects.

mocca.chromatogram.correct.get_impure_istd_peak(chromatogram, istd_key, quali_comp_db, absorbance_threshold, spectrum_correl_coef_thresh, relative_distance_thresh)[source]

not doubled relative distance threshold

mocca.chromatogram.correct.get_istd_offset(istd_peak, istd_key, quali_component_db)[source]

Finds possible istd peak in the chromatogram and calculates the retention time offset of the peak compared to its qualitative component in the database.

mocca.chromatogram.correct.get_istd_peak(chromatogram, istd_key, quali_component_db, absorbance_threshold, spectrum_correl_coef_thresh, relative_distance_thresh)[source]

Tries to find an istd peak in the chromatogram from both pure or impure peaks.

mocca.chromatogram.correct.get_pure_istd_peak(chromatogram, istd_key, quali_component_db, spectrum_correl_coef_thresh, relative_distance_thresh)[source]

not doubled relative distance threshold

mocca.chromatogram.model module

Created on Tue Dec 7 13:22:39 2021

@author: haascp

class mocca.chromatogram.model.Chromatogram(experiment, dataset)[source]

Bases: object

Class containing data regarding chromatograms.

insert_peak(peak)[source]

Adds a peak to the chromatogram.

mocca.chromatogram.preprocessor module

Created on Tue Dec 14 16:08:40 2021

@author: haascp

mocca.chromatogram.preprocessor.preprocess_chromatogram(chromatogram, quali_comp_db, absorbance_threshold, detector_limit, spectrum_correl_thresh, relative_distance_thresh, print_purity_check=False, print_compound_prediction=False, print_parafac_analytics=False)[source]

Preprocesses the chromatogram of picked peaks. It includes expanding, checking, integrating, correcting, resolving impures, and matching of the peaks in the chromatogram.

mocca.chromatogram.quantify module

Created on Tue Jan 4 16:41:38 2022

@author: haascp

mocca.chromatogram.quantify.quantify_peaks(chrom, quant_comp_db, quali_comp_db)[source]

Quantifies all peaks in the chromatogram.

mocca.chromatogram.utils module

Created on Tue Dec 7 13:26:09 2021

@author: haascp

mocca.chromatogram.utils.check_overlap(peak, other)[source]

Returns True if peak overlaps with the peak ‘other’, and False otherwise.

mocca.chromatogram.utils.check_same_dataset(peak, other)[source]

Raises Exception if the two peaks are not from the same dataset.

mocca.chromatogram.utils.get_distance_between(peak, other)[source]

Returns the distance from the maxima of peak and the other peak.

Module contents