Skip to content

Commit

Permalink
Merge pull request #351 from biomage-org/hotfix-genes-v-umi
Browse files Browse the repository at this point in the history
HOTFIX: genes v umi filter not using user-defined parameters
  • Loading branch information
gerbeldo authored Jan 4, 2024
2 parents 993ebc4 + 3368b7b commit 47aaa32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pipeline-runner/R/qc-4-filter_gene_umi_outlier.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ filter_gene_umi_outlier <- function(scdata_list, config, sample_id, cells_id, ta
if (safeTRUE(config$auto))
p_level <- min(0.001, 1 / ncol(sample_data))
else
p_level <- config$filterSettings$regressionTypeSettings[[type]]$p.level
p_level <- 1 - as.numeric(config$filterSettings$predictionInterval)

p_level <- suppressWarnings(as.numeric(p_level))
if(is.na(p_level)) stop("p_level couldn't be interpreted as a number.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ test_that("Gene UMI filter works if input is a a float-interpretable string", {
cells_id <- mock_ids()
nstart <- ncol(scdata_list[[sample_2_id]])
config$auto <- FALSE
config$filterSettings$predictionInterval <- "0.3"

out_number <- filter_gene_umi_outlier(scdata_list, config, sample_2_id, cells_id)

Expand Down

0 comments on commit 47aaa32

Please sign in to comment.