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.
- Parameters
- adata
An annData object resulting from func:
~scanpy.external.scrublet
.- scale_hist_obs :
str
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
str
(default:'linear'
) Set y axis scale transformation in matplotlib for the plot of simulated doublets (e.g. “linear”, “log”, “symlog”, “logit”)
- figsize :
Tuple
[float
,float
] |None
Optional
[Tuple
[float
,float
]] (default:(8, 3)
) width, height
- show :
bool
bool
(default:True
) Show the plot, do not return axis.
- save :
str
|bool
|None
Union
[str
,bool
,None
] (default:None
) If
True
or astr
, 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, aFigure
. Ifshow==False
a list ofAxes
.
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.