call_targets: Call clean droplets after running EM using percent debris

View source: R/debris_id.R

call_targetsR Documentation

Call clean droplets after running EM using percent debris

Description

Call cells or nuclei from an SCE object. Adds meta data to the test data slot, which can be retreived using the function droplet_data. This adds column "Call" which takes either "Debris" or "Clean". Droplets with a debris scores less than thresh_score and at least min_genes genes detected pass filtering.

Usage

call_targets(x, thresh_score = 0.5, clusters = NULL, min_genes = 200,
  droplets = NULL, verbose = TRUE)

Arguments

x

An SCE object.

thresh_score

The maximum debris score a droplet must have to be classified as a cell/nucleus. This should be a value between 0 and 1. Set to NULL to turn off filtering by threshold.

clusters

Remove droplets assigned to these clusters.

min_genes

The minimum number of genes a droplet must have to be classified as a cell/nucleus.

droplets

A character vector that specifies target droplets manually. Only droplets that intersect with test set will be used. If given, ignores the other parameteres. Default is NULL.

verbose

verbosity

Value

An SCE object.

Examples



# Default filtering
sce <- call_targets(sce)
drop_data <- droplet_data(sce)
table(drop_data[,"Call"])

# More stringent filtering
sce <- call_targets(sce, thresh = 0.3)
drop_data <- droplet_data(sce)
table(drop_data[,"Call"])

# Less stringent filtering
sce <- call_targets(sce, thresh = 0.7)
drop_data <- droplet_data(sce)
table(drop_data[,"Call"])



marcalva/diem documentation built on Jan. 1, 2023, 2:33 a.m.