Filter doublets from MarchRProject
filter_doublets.RdThis function will filter doublets from in MarchRProject or MarchRDataset after add_doublet_scores() has been run
Usage
filter_doublets(
proj,
enrich_cutoff = 1,
score_cutoff = -Inf,
filter_ratio = 1,
clear_doublet_data = TRUE,
verbose = getOption("MarchR.verbose", FALSE),
...
)Arguments
- proj
(MarchRProject or MarchRDataset)
- enrich_cutoff
(numeric) The minimum cutoff for
doublet_enrichment. This number is equivalent to the number of simulated doublets identified as a nearest neighbor to the cell divided by the expected number given a random uniform distribution. Default is 1.- score_cutoff
(numeric) The minimum cutoff for
doublet_score, which represents the-log10(binomial adjusted p-value). Default is -Inf. (disabled)- filter_ratio
(numeric) The maximum ratio of predicted doublets to remove based on the number of pass-filter cells. For example, if there are 5000 cells, the maximum would be
filter_ratio * 5000^2 / (100000)(which simplifies tofilter_ratio * 5000 * 0.05). Thisfilter_ratioallows you to apply a consistent filter across multiple different samples that may have different percentages of doublets because they were run with different cell loading concentrations. The higher thefilter_ratio, the greater the number of cells potentially removed as doublets.- clear_doublet_data
(logical) Remove all stale doublet data from project (UMAPs, doublet scores & enrichments). Default is TRUE.
- verbose
(logical) Print progress messages. Default
getOption("MarchR.verbose", FALSE).- ...
Additional arguments passed to methods.
- dataset_name
(character) MarchRProject only. The name of the dataset to apply doublet filtering on