From 7deb13423e5324a46ecbadc2ce863d016eb31113 Mon Sep 17 00:00:00 2001 From: "katharina.schmid" Date: Fri, 25 Jun 2021 15:38:33 +0200 Subject: [PATCH] Added parameter cutoffVersion to function power.sameReadDepth.restrictedDoublets (missed when introducing the parameter) --- R/power.R | 5 ++++- man/power.sameReadDepth.restrictedDoublets.Rd | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/R/power.R b/R/power.R index ad5b0c0..982f98f 100644 --- a/R/power.R +++ b/R/power.R @@ -658,7 +658,8 @@ power.sameReadDepth.withDoublets<-function(nSamples,nCells,ct.freq, } else if (multipletRateGrowth == "constant") { multipletFraction<-multipletRate } else { - stop("No known option for multipletRateGrowth. Use the values 'linear' or 'constant'.") + stop(paste("Input", multipletRateGrowth, "No known option for multipletRateGrowth.", + "Use the values 'linear' or 'constant'.")) } #Check that the number of cells entered does not provide a multiplet rate of >100% @@ -754,6 +755,7 @@ power.sameReadDepth.restrictedDoublets<-function(nSamples,nCells,ct.freq, mappingEfficiency=0.8, multipletRate=7.67e-06,multipletFactor=1.82, min.UMI.counts=3,perc.indiv.expr=0.5, + cutoffVersion="absolute", nGenes=21000,samplingMethod="quantiles", multipletRateGrowth="linear", sign.threshold=0.05, MTmethod="Bonferroni", @@ -779,6 +781,7 @@ power.sameReadDepth.restrictedDoublets<-function(nSamples,nCells,ct.freq, mappingEfficiency, multipletRate,multipletFactor, min.UMI.counts,perc.indiv.expr, + cutoffVersion, nGenes,samplingMethod, multipletRateGrowth, sign.threshold, diff --git a/man/power.sameReadDepth.restrictedDoublets.Rd b/man/power.sameReadDepth.restrictedDoublets.Rd index cbe899c..3ccd3a4 100644 --- a/man/power.sameReadDepth.restrictedDoublets.Rd +++ b/man/power.sameReadDepth.restrictedDoublets.Rd @@ -20,6 +20,7 @@ power.sameReadDepth.restrictedDoublets( multipletFactor = 1.82, min.UMI.counts = 3, perc.indiv.expr = 0.5, + cutoffVersion = "absolute", nGenes = 21000, samplingMethod = "quantiles", multipletRateGrowth = "linear", @@ -72,6 +73,9 @@ of cells need to have a count value large than 0} individuals that need to have this gene expressed to define it as globally expressed; if number >=1 absolute number of individuals that need to have this gene expressed} +\item{cutoffVersion}{Either "absolute" or "percentage" leading to different +interpretations of min.counts (see description above)} + \item{nGenes}{Number of genes to simulate (should match the number of genes used for the fitting)} \item{samplingMethod}{Approach to sample the gene mean values (either taking