doubletfinderwrapper: DoubletFinder Wrapper

View source: R/processing.R

doubletfinderwrapperR Documentation

DoubletFinder Wrapper

Description

Please see https://github.com/chris-mcginnis-ucsf/DoubletFinder

Usage

doubletfinderwrapper(seuratobject, clusters, autofilterres, num.cores)

Arguments

seuratobject

A Seurat object, pre-proc with Seurat::SCTransform()

clusters

string, should match a column name of seuratobject metadata with clusters or other cell group annotations. default = 'seurat_clusters'

autofilterres

optional, output of FerrenaSCRNAseq::autofilter() whether to return the the autofilter result with updated autofilterres$cellstatus taking into account doublet status

num.cores

integer, num.cores to use for DoubletFinder::paramSweep_v3

Details

Models homotypic doublets using the following table: https://kb.10xgenomics.com/hc/en-us/articles/360001378811-What-is-the-maximum-number-of-cells-that-can-be-profiled-

Value

if autofilterres is provided, it will return autofilterres with updated autofilterres$cellstatus, if not it will return a data.frame with doublet information and score.

Examples

# With autofiler res, will add in the result to af$cellstatus
af <- doubletfinderwrapper(sobj, autofilterres = af, num.cores = 5)

# remove doublets
goodcells <- af$cellstatus[af$cellstatus$filteredout==F,"barcodes"]
sobj <- sobj[,goodcells]

# w/o autofilter res:
ddf <- doubletfinderwrapper(sobj, num.cores = 5)

# remove doublets
singlets <- dfdf[dfdf$DoubletFinderClassification=='Singlet','cells']
sobj <- sobj[,singlets]

FerrenaAlexander/FerrenaSCRNAseq documentation built on March 10, 2023, 9:31 a.m.