3.6. Report
This module implements the report object which is a wrapper around an fpdf object.
The reports are meant to be a high-level overview of an experiment, the feature tables, empcpds, etc and summarize some of the qaqc results.
- class pcpfm.Report.Report(experiment, parameters)[source]
The report object allows the creation of a pdf report. The reports are defined using templates.
A template is a JSON-formatted list of dictionaries. Each dictionary corresponds one-to-one with a method of this object. Which method the dictionary is intended to call is defined by the dictionary’s “section” field. The section field value should be the name of a method for this object.
- TICs(section_desc)[source]
This generates, if not pre-existing, and includes the TIC of each acquisition in the experiment to the report.
Requires: None
- annotation_summary(section_desc)[source]
This summarizes the annotations for each empcpd in the experiment.
This counts the number of annotations per empcpd at each level.
- Parameters:
Requires – None
- command_history(section_desc)[source]
This summarizes each command that has been executed in the analysis.
Requires: None
- computational_performance(section_desc)[source]
This summarizes each command and computes the time required for that step. This is useful for benchmarking.
Requires: None
- empcpd_summary(section_desc)[source]
This summarizes the feature tables in the experiment.
Requires: None
- experiment_summary(section_desc)[source]
This will list the empcpds and feature tables in the experiment.
Requires: None
- figure(section_desc)[source]
This inserts a figure into the report. Since all figures are currently QAQC figures from feature tables, this method requires specifying a table name and a qaqc result to visualize.
- Requires: “table” - the moniker for the table
“name” - name for the qaqc result to add figure of
The valid fields of name are populated at runtime for this method and will be displayed if an incorrect name field is provided.
- Valid name values are:
pca tsne pearson_correlation kendall_correlation spearman_correlation pearson_logtransformed_correlation kendall_logtransformed_correlation spearman_logtransformed_correlation missing_feature_z_scores sum_intensity mean_intensity median_intensity missing_dropped_sum_intensity missing_dropped_mean_intensity missing_dropped_median_intensity log_missing_dropped_sum_intensity log_missing_dropped_mean_intensity log_missing_dropped_median_intensity tics log_tics feature_count_z_scores intensity_distribution intensity_distribution_log snr_distribution cSelectivity_distribution
- save(section_desc)[source]
This saves the report pdf to the specified location
Requires: “report_name”
- class pcpfm.Report.ReportPDF(header_text)[source]
This class is simply a wrapper around FPDF from fpdf library so that we can have a consistent header and footer for all pages
- Parameters:
header_text – text to be included on the header of each page
This function is called on every page of the report. It generates the footer. Currently this does nothing but it is required.