API reference

This page is generated from the docstrings of every public symbol in cycombinepy. Click through to each function for the full parameter list, return type, and source link.

Preprocessing

transform_asinh

Asinh-transform marker columns of adata with an optional derandomization step.

normalize

Batch-wise normalize marker columns of adata.

Clustering

create_som

Train a FlowSOM on the marker columns of adata and store cluster labels.

Correction

batch_correct

Run normalization, SOM clustering, and per-cluster ComBat.

correct_data

Per-cluster ComBat batch correction.

CombatCorrectionError

Raised when per-cluster ComBat fails under error_policy='raise'.

ConfoundedDesignError

Raised when covariates are confounded under confound_policy='raise'.

Correction reports and constants

CORRECTED_LAYER

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

CORRECTION_REPORT_UNS_KEY

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

CORRECTION_REPORT_SCHEMA_VERSION

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Evaluation

compute_emd

Per (cluster, marker, batch-pair) 1-D Earth Mover's distance.

evaluate_emd

Join uncorrected vs corrected EMD and compute percent reduction.

compute_mad

Per (cluster, marker, batch) Median Absolute Deviation.

evaluate_mad

Join uncorrected vs corrected MAD and compute percent reduction.

Detection

detect_batch_effect

Extended batch-effect diagnostic: express output plus UMAP and MAD.

detect_batch_effect_express

Quick 3-panel batch-effect summary (EMD heatmap, density, MDS).

Utilities

get_markers

Return var_names that are not in the non-markers blacklist (case-insensitive).

check_confound

Return True if batch is confounded with mod.

I/O

read_fcs_dir

Read all FCS files in data_dir into a single AnnData.

Plotting

plot_density

Per-marker density plot colored by batch.

plot_dimred

Thin wrapper around scanpy.pl.umap / scanpy.pl.pca.

plot_emd_heatmap

Heatmap of mean EMD per (cluster, marker) from compute_emd() output.

Advanced evaluation

scib_metrics

Run selected scib-metrics batch-correction metrics on an AnnData.