Skip to content

Commit

Permalink
Add 'db_coefficient' parameter to the CellQC function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao-njmu committed Aug 30, 2023
1 parent 7542025 commit fdc3a7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/SCP-cellqc.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ isOutlier <- function(x, nmads = 2.5, constant = 1.4826, type = c("both", "lower
RunCellQC <- function(srt, assay = "RNA", batch = NULL,
qc_metrics = c("doublets", "outlier", "umi", "gene", "mito", "ribo", "ribo_mito_ratio", "species"),
return_filtered = FALSE,
db_method = "scDblFinder", db_rate = NULL,
db_method = "scDblFinder", db_rate = NULL, db_coefficient = 0.01,
outlier_cutoff = c(
"log10_nCount:lower:2.5",
"log10_nCount:higher:5",
Expand Down Expand Up @@ -355,7 +355,7 @@ RunCellQC <- function(srt, assay = "RNA", batch = NULL,
if ("doublets" %in% qc_metrics) {
if (!is.null(db_method)) {
if (is.null(db_rate)) {
db_rate <- ncol(srt) / 1000 * 0.01
db_rate <- ncol(srt) / 1000 * db_coefficient
}
if (db_rate >= 1) {
stop("The db_rate is equal to or greater than 1!")
Expand Down
1 change: 1 addition & 0 deletions man/RunCellQC.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fdc3a7c

Please sign in to comment.