scanpy.external.pl.scrublet_score_distribution

scanpy.external.pl.scrublet_score_distribution(adata, scale_hist_obs='log', scale_hist_sim='linear', figsize=(8, 3), return_fig=False, show=True, save=None)

Plot histogram of doublet scores for observed transcriptomes and simulated doublets.

The histogram for simulated doublets is useful for determining the correct doublet score threshold.

Scrublet must have been run previously with the input object.

Parameters
adata

An annData object resulting from func:~scanpy.external.scrublet.

scale_hist_obs : str (default: 'log')

Set y axis scale transformation in matplotlib for the plot of observed transcriptomes (e.g. “linear”, “log”, “symlog”, “logit”)

scale_hist_sim : str (default: 'linear')

Set y axis scale transformation in matplotlib for the plot of simulated doublets (e.g. “linear”, “log”, “symlog”, “logit”)

figsize : Optional[Tuple[float, float]] (default: (8, 3))

width, height

show : bool (default: True)

Show the plot, do not return axis.

save : Union[str, bool, None] (default: None)

If True or a str, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf', '.png', '.svg'}.

Returns

If return_fig is True, a Figure. If show==False a list of Axes.

See also

scrublet()

Main way of running Scrublet, runs preprocessing, doublet simulation and calling.

scrublet_simulate_doublets()

Run Scrublet’s doublet simulation separately for advanced usage.