Intermediate tutorial: plotting and data export¶
Goal¶
Generate grouped plots and export/reload AnnData for reproducible sharing.
Inputs¶
AnnDatawith categorical obs columns (for exampleconditionandcelltype).
Steps¶
import scanpy_plus as sp
sp.pl.splitplot(adata, split_by="condition", colour_by="celltype")
sp.pl.ridgeplot(adata, keys="log1p_total_counts", split_by="condition")
sp.io.write_adata_split(adata, "analysis_export")
reloaded = sp.io.read_adata_split("analysis_export", read_X=True)
Expected output and interpretation¶
Split and ridge plots enable side-by-side condition comparisons.
analysis_exportcontains partitioned files suitable for sharing large objects.reloadedshould match key annotations and structure from the sourceadata.