spared.plotting.plot_histograms
- spared.plotting.plot_histograms(processed_adata: AnnData, raw_adata: AnnData, path: str) None[source]
Plot filtering histograms
This function plots a figure that analyses the effect of the filtering over the data. The first row corresponds to the raw data (which has patches and excludes constant genes) and the second row plots the filtered and processed data. Histograms of total:
Counts per cell
Cells with expression
Total counts per gene
Moran I statistics (only in processed data)
are generated. The plot is saved in the specified path. Cell filtering histograms are in red, gene filtering histograms are in blue and autocorrelation filtering histograms are in green.
- Parameters:
processed_adata (ad.AnnData) – Processed and filtered data ready to use by the model.
raw_adata (ad.AnnData) – Loaded data from .h5ad file that is not filtered but has patch information.
path (str) – Path to save histogram plot.