call_doublets: Automatically sets a threshold for calling doublets, but it's...

Description Usage Arguments Value Examples

View source: R/rscrublet.R

Description

Automatically sets a threshold for calling doublets, but it's best to check this by running plot_doublet_histogram() afterwards and adjusting threshold by call_doublets with user defined threshold parameter

Usage

1
call_doublets(nnc, threshold = NULL, verbose = TRUE)

Arguments

nnc

list, output of scrub_doublets function

threshold

Doublet score threshold for calling a transcriptome a doublet. If NULL, this is set automatically by looking for the minimum between the two modes of the nnc$doublet_scores_sim histogram. It is best practice to check the threshold visually using the nnc$doublet_scores_sim histogram and/or based on co-localization of predicted doublets in a 2-D embedding.

verbose

If TRUE, print summary statistics.

Value

nnc list with additional items: #'

Examples

1
2
3
4
5
6
7
8
# run rscrublet of 8k pbmc example dataset
scrr = scrub_doublets(E_obs = pbmc8k,expected_doublet_rate=0.06,min_counts=2, min_cells=3, min_gene_variability_pctl=85, n_prin_comps=30)
# set threshould automatically 
scrr=call_doublets(scrr)
# examine score distribution
plot_doublet_histogram(scrr)
# find predicted doublets
rownames(pbmc8k)[scrr$predicted_doublets]

iaaaka/Rscrublet documentation built on Dec. 20, 2021, 5:57 p.m.