- scanpy.external.pp.scrublet_simulate_doublets(adata, layer=None, sim_doublet_ratio=2.0, synthetic_doublet_umi_subsampling=1.0, random_seed=0)
Simulate doublets by adding the counts of random observed transcriptome pairs.
- adata :
The annotated data matrix of shape
n_vars. Rows correspond to cells and columns to genes. Genes should have been filtered for expression and variability, and the object should contain raw expression of the same dimensions.
Layer of adata where raw values are stored, or ‘X’ if values are in .X.
- sim_doublet_ratio :
Number of doublets to simulate relative to the number of observed transcriptomes. If
None, self.sim_doublet_ratio is used.
- synthetic_doublet_umi_subsampling :
Rate for sampling UMIs when creating synthetic doublets. If 1.0, each doublet is created by simply adding the UMIs from two randomly sampled observed transcriptomes. For values less than 1, the UMI counts are added and then randomly sampled at the specified rate.
- adata :
- Return type
adata : anndata.AnnData with simulated doublets in .X Adds fields to
.obs_namesused to generate each simulated doublet transcriptome
Dictionary of Scrublet parameters