Skip to content

Latest commit

 

History

History
132 lines (109 loc) · 19.6 KB

File metadata and controls

132 lines (109 loc) · 19.6 KB

Deterministic plotting gallery

This gallery is a repository-owned visual catalog for the plotting functions exported by adata_science_tools._plotting. The coverage contract and asset filenames come from example_plotting_gallery/manifest.py: 39 renderers and 46 cases, split across maintained, compatibility, and deprecated APIs.

The examples are for rendering and API coverage. They are not benchmark datasets or evidence for biological conclusions.

Data and analysis provenance

The inputs in example_plotting_gallery/simulated_data.py are deterministic. Seeded builders create balanced independent groups, paired subjects, repeated measurements, continuous observations, and composition categories. Other builders return fixed survival curves and meta-analysis rows. These precomputed tables, and the deterministic continuous-effect curve and interval, are plotting inputs rather than estimates produced by the library.

Some examples deliberately consume analysis results produced by public library functions:

Library-derived result Gallery consumers
diff_test effects and p-values, via run_independent_diff_test barh_l2fc_dotplot_column, barh_dotplot_dotplot_column, barh_dotplot_dotplot_dotplot_column, barh_4X_dotplot_column, l2fc_dotplot_column, l2fc_dotplot_single, qqplot, and volcano_plot_generic; the deprecated l2fc_pvalue_dotplot_gex, l2fc_pvalue_dotplot_protein_metabolite, plot_column_of_bar_h_2groups_with_l2fc_dotplot_GEX_adata, qqplot_pvalues, and volcano_plot_sns_single_comparison_generic cases reuse the same results through their legacy contracts.
fit_smf_ols_models_and_summarize_adata coefficients, confidence intervals, p-values, and sample counts Both forest cases, plus the adjusted OLS panels in barh_dotplot_dotplot_dotplot_column and barh_4X_dotplot_column.
calculate_expectations, predict_expectation, and excess_expectation fitted values and residuals residual_diagnostic.
pairwise_spearman_corr_matrix rank-correlation matrix Both plot_heatmap cases. The three plot_rank_* renderers instead calculate their displayed rank summaries from the deterministic ranked lists passed to them.

run_independent_diff_test never assigns a sorted or filtered result table directly to AnnData.var. It starts from a copy of the original AnnData and left-joins only result columns on the original variable index. This preserves the matrix-variable alignment and original variable order; a feature omitted by diff_test, such as the all-zero fixture, remains in var with missing analysis values.

Coverage boundaries

The manifest labels 30 renderers as maintained, 1 as a compatibility API, and 8 as deprecated. Compatibility and deprecated entries remain in the catalog so their current call paths and recommended replacements are visible; their screenshots do not change their support status.

Excluded Venn module

The gallery also excludes _plotting._venn_plots. That module is not re-exported by _plotting/__init__.py, and importing it requires the optional matplotlib-venn package, which is not installed in the gallery environment. The four non-exported functions are venn_plot_2list, venn_plot_3list, geneset_enrichment_venn, and geneset_enrichemnt_ol_ven_M_n_N_x. See _venn_plots.md for their source-level documentation.

Regenerate the assets

The plotting_gallery_params block in config/config.yaml controls the asset directory, log directory, selected renderer names, selected case IDs, and whether generation continues after an error. Null renderer and case selections generate all manifest cases. From the repository root, run:

bash scripts/000_generate_plotting_gallery.bash

The runner sources config/local_env.sh, activates POSTPROCESS_ENV, configures headless Matplotlib, writes a runner log under scripts/logs, and leaves analysis and output selection to the Python entry point and YAML config.

Catalog

The entries, order, case IDs, titles, statuses, replacements, and filenames below are derived from RENDERER_MANIFEST; the manifest remains authoritative if coverage changes.

Maintained renderers (30)

Renderer Gallery cases
adata_histograms
_plotting._histograms
Distributions by treatment
subgroup_kde — Distributions by treatment

Grouped feature distributions
feature_group_collapse — Grouped feature distributions
barh_4X_dotplot_column
_plotting._column_plots
Expression with four inferential summaries
five_panel — Expression with four inferential summaries
barh_column
_plotting._column_plots
Feature abundance by treatment
grouped_expression — Feature abundance by treatment
barh_dotplot_dotplot_column
_plotting._column_plots
Expression with two differential summaries
three_panel — Expression with two differential summaries
barh_dotplot_dotplot_dotplot_column
_plotting._column_plots
Expression with three differential summaries
four_panel — Expression with three differential summaries
barh_l2fc_dotplot_column
_plotting._column_plots
Expression and differential effect
two_panel — Expression and differential effect
category_composition
_plotting._tabular_plots
Response composition by cohort
percent_annotated — Response composition by cohort
continuous_effect_plot
_plotting._analytical_plots
Continuous exposure effect
observed_categories — Continuous exposure effect
corr_dotplot
_plotting._corr_dotplots
Correlation with subgroup fits and marginals
subgroup_marginals — Correlation with subgroup fits and marginals

Correlation on synchronized log1p axes
log1p_identity — Correlation on synchronized log1p axes
datapoints
_plotting._datapoints
Feature values with independent marker and color encodings
grouped_markers — Feature values with independent marker and color encodings

Collapsed feature-group datapoints
feature_group_collapse — Collapsed feature-group datapoints
forest
_plotting._forest
Grouped model estimates
grouped_estimates — Grouped model estimates

Ratio-scale effects
ratio_scale — Ratio-scale effects
kaplan_meier_plot
_plotting._analytical_plots
Survival curves with numbers at risk
grouped_risk_censor — Survival curves with numbers at risk
l2fc_dotplot_column
_plotting._column_plots
Differential effects by feature
multi_feature — Differential effects by feature
l2fc_dotplot_single
_plotting._column_plots
Differential effect overview
single_axis — Differential effect overview
longitudinal_trajectories
_plotting._longitudinal
Longitudinal trajectories with visit gaps
markers_and_gaps — Longitudinal trajectories with visit gaps
meta_forest
_plotting._meta_forest
Meta-analysis summary
study_summary_prediction — Meta-analysis summary
paired_datapoints
_plotting._datapoints
Paired changes by treatment
paired_groups — Paired changes by treatment

Paired values from preserved source matrices
precomputed_pair_values — Paired values from preserved source matrices
plot_columns
_plotting._row_plots
Grouped covariate summaries
multi_metric — Grouped covariate summaries
plot_heatmap
_plotting._corr_dotplots
Clustered rank-correlation heatmap
clustered — Clustered rank-correlation heatmap

Fixed-order rank-correlation heatmap
fixed_order — Fixed-order rank-correlation heatmap
plot_rank_heatmap
_plotting._corr_dotplots
Rank agreement density
rank_hexbin — Rank agreement density
plot_rank_scatter
_plotting._corr_dotplots
Rank agreement
rank_agreement — Rank agreement
plot_rank_scatter_density
_plotting._corr_dotplots
Rank agreement with local density
rank_density — Rank agreement with local density
qqplot
_plotting._plots
Differential-test p-value QQ plot
differential_pvalues — Differential-test p-value QQ plot
ranked_waterfall
_plotting._tabular_plots
Ranked feature effects
direction_colored — Ranked feature effects
residual_diagnostic
_plotting._tabular_plots
Residuals versus fitted abundance
log_fitted — Residuals versus fitted abundance
show_colors
_plotting._utils
Categorical plotting palette
categorical_palette — Categorical plotting palette
show_tol_colors
_plotting._utils
Paul Tol plotting palette
tol_palette — Paul Tol plotting palette
spearman_cor_dotplot_2
_plotting._corr_dotplots
Correlation under two categorical encodings
dual_hue — Correlation under two categorical encodings
timeseries_paired_datapoints
_plotting._plots
Paired time-series datapoints
faceted_time_series — Paired time-series datapoints
volcano_plot_generic
_plotting._plots
Differential-test volcano plot
significance — Differential-test volcano plot

Volcano plot with feature-class highlighting
feature_class — Volcano plot with feature-class highlighting

Compatibility renderers (1)

Renderer Gallery cases
spearman_cor_dotplot
_plotting._corr_dotplots
Replacement: corr_dotplot
Spearman correlation compatibility API
spearman_fit — Spearman correlation compatibility API

Deprecated renderers (8)

Renderer Gallery cases
corr_dotplot_dev
_plotting._corr_dotplots
Replacement: corr_dotplot
Deprecated correlation wrapper
replacement_smoke — Deprecated correlation wrapper
l2fc_pvalue_dotplot_gex
_plotting._plots_depreciated
Replacement: l2fc_dotplot_single
Legacy gene-expression effect dotplot
replacement_smoke — Legacy gene-expression effect dotplot
l2fc_pvalue_dotplot_protein_metabolite
_plotting._plots_depreciated
Replacement: l2fc_dotplot_single
Legacy protein/metabolite effect dotplot
replacement_smoke — Legacy protein/metabolite effect dotplot
plot_column_of_bar_h_2groups_GEX_adata
_plotting._plots_depreciated
Replacement: barh_column
Legacy grouped expression bars
replacement_smoke — Legacy grouped expression bars
plot_column_of_bar_h_2groups_with_l2fc_dotplot_GEX_adata
_plotting._plots_depreciated
Replacement: barh_l2fc_dotplot_column
Legacy expression and effect composite
replacement_smoke — Legacy expression and effect composite
plot_paired_point_anndata
_plotting._plots_depreciated
Replacement: timeseries_paired_datapoints
Legacy paired time-series datapoints
replacement_smoke — Legacy paired time-series datapoints
qqplot_pvalues
_plotting._plots_depreciated
Replacement: qqplot
Legacy p-value QQ plot
replacement_smoke — Legacy p-value QQ plot
volcano_plot_sns_single_comparison_generic
_plotting._plots_depreciated
Replacement: volcano_plot_generic
Legacy adjusted-p volcano plot
replacement_smoke — Legacy adjusted-p volcano plot