coco_pipe.report.descriptor_qc#
Descriptor QC report builders.
Assembles the standard subject-level and dataset-level descriptor QC HTML
reports from the dataframes produced by
coco_pipe.descriptors.qc (family summaries, missingness, failure
summaries, etc.) and figure paths produced by descriptor-QC viz helpers.
Functions#
|
Build the per-shard (subject/session/condition) descriptor QC report. |
|
Build the merged-dataset descriptor QC report. |
Module Contents#
- coco_pipe.report.descriptor_qc.generate_descriptor_subject_report(output_path, overview_df, flags_df, failure_summary_df, feature_missingness_df, family_summary_df, figure_paths, asset_urls=None)#
Build the per-shard (subject/session/condition) descriptor QC report.
- Parameters:
output_path (pathlib.Path) – Destination
.htmlpath. Parent directories are created.asset_urls (dict[str, str] | str | None) – Passed through to
Report. Use"inline"to embed Plotly/Tailwind/pako so the saved HTML renders offline (file://) instead of referencing external CDNs.overview_df (pandas.DataFrame) – Single-row dataframe with
Subject,Session,Condition, and summary metrics for the shard.flags_df (pandas.DataFrame) – QC flags raised for this shard (e.g. from
coco_pipe.io.quality.make_qc_flag()).failure_summary_df (pandas.DataFrame) – Combined extraction-failure summary, e.g. the
"combined"frame fromcoco_pipe.descriptors.qc.summarize_failures().feature_missingness_df (pandas.DataFrame) – Per-feature missingness with family metadata, e.g. from
coco_pipe.descriptors.qc.compute_family_missingness().family_summary_df (pandas.DataFrame) – One row per descriptor family, e.g. from
coco_pipe.descriptors.qc.aggregate_family_qc()(optionally extended viacoco_pipe.descriptors.qc.add_family_diagnostics()).figure_paths (collections.abc.Mapping[str, pathlib.Path]) – Mapping of figure keys to image file paths, as produced by a descriptor-QC figure-saving helper.
- Returns:
output_path, after the report has been written.
- Return type:
Path
- coco_pipe.report.descriptor_qc.generate_descriptor_dataset_report(output_path, overview_df, shard_summary_df, flags_df, failure_family_df, failure_channel_df, feature_missingness_df, low_variance_df, family_summary_df, figure_paths, manifest_df=None, condition_breakdown_df=None, asset_urls=None)#
Build the merged-dataset descriptor QC report.
- Parameters:
output_path (pathlib.Path) – Destination
.htmlpath. Parent directories are created.asset_urls (dict[str, str] | str | None) – Passed through to
Report. Use"inline"to embed Plotly/Tailwind/pako so the saved HTML renders offline (file://) instead of referencing external CDNs.overview_df (pandas.DataFrame) – Single-row dataframe with dataset-level summary metrics.
shard_summary_df (pandas.DataFrame) – One row per merged shard with at least a
qc_statuscolumn.flags_df (pandas.DataFrame) – Dataset-level QC flags.
failure_family_df (pandas.DataFrame) – Failure counts grouped by family / channel, e.g. the
"by_family"and"by_channel"frames fromcoco_pipe.descriptors.qc.summarize_failures().failure_channel_df (pandas.DataFrame) – Failure counts grouped by family / channel, e.g. the
"by_family"and"by_channel"frames fromcoco_pipe.descriptors.qc.summarize_failures().feature_missingness_df (pandas.DataFrame) – Per-feature missingness with family metadata.
low_variance_df (pandas.DataFrame) – Features flagged as constant or near-zero variance.
family_summary_df (pandas.DataFrame) – One row per descriptor family (optionally extended via
coco_pipe.descriptors.qc.add_family_diagnostics()).figure_paths (collections.abc.Mapping[str, pathlib.Path]) – Mapping of figure keys to image file paths.
manifest_df (pandas.DataFrame | None) – Optional single-row provenance table (e.g. derived from
merge_manifest.json) rendered in the Overview section.condition_breakdown_df (pandas.DataFrame | None) – Optional family x condition breakdown of failure counts and missingness, rendered in a dedicated section.
- Returns:
output_path, after the report has been written.
- Return type:
Path