diff --git a/R/clusterExpUnitsWithScamp.R b/R/clusterExpUnitsWithScamp.R index 689fbbe..a597046 100755 --- a/R/clusterExpUnitsWithScamp.R +++ b/R/clusterExpUnitsWithScamp.R @@ -141,7 +141,7 @@ .clusterExpUnitsWithScamp <- function(projectPath, - nameOccuranceNum, + nameOccurrenceNumber, debugFlag, threadNum, seedValue, @@ -349,11 +349,11 @@ length(which(nameSummary >= x))})) elbowLoc <- .computeElbow(nameSummaryPlotDF) - if (nameOccuranceNum > 0) { + if (nameOccurrenceNumber > 0) { #the user has set this value - clusterNames <- names(nameSummary[which(nameSummary >= nameOccuranceNum)]) + clusterNames <- names(nameSummary[which(nameSummary >= nameOccurrenceNumber)]) saveRDS( - nameOccuranceNum, + nameOccurrenceNumber, file.path(normalizePath(projectPath), "faustData", "metaData", diff --git a/R/discoverPhenotypes.R b/R/discoverPhenotypes.R index 7ac47ac..b50d8af 100644 --- a/R/discoverPhenotypes.R +++ b/R/discoverPhenotypes.R @@ -16,7 +16,7 @@ #' `projectPath/faustData/faustCountMatrix.rds`, and can be loaded into R using #' the `readRDS` function. #' -#' @param nameOccuranceNum The number of times a name has to appear in distinct +#' @param nameOccurrenceNumber The number of times a name has to appear in distinct #' SCAMP clusterings to be gated out. #' #' @param debugFlag Boolean value. Set to TRUE to print method status information @@ -119,7 +119,7 @@ #' @md discoverPhenotypes <- function(gatingSet, projectPath=normalizePath("."), - nameOccuranceNum=0, + nameOccurrenceNumber=0, debugFlag=FALSE, threadNum=1, seedValue=123, @@ -155,7 +155,7 @@ discoverPhenotypes <- function(gatingSet, if (debugFlag) print("Discovering phenotypes across experimental units.") .clusterExpUnitsWithScamp( projectPath = projectPath, - nameOccuranceNum = nameOccuranceNum, + nameOccurrenceNumber = nameOccurrenceNumber, debugFlag = debugFlag, threadNum = threadNum, seedValue = seedValue, @@ -167,7 +167,7 @@ discoverPhenotypes <- function(gatingSet, .plotPhenotypeFilter( projectPath=projectPath, - nameOccuranceNum=nameOccuranceNum, + nameOccurrenceNumber=nameOccurrenceNumber, plottingDevice=plottingDevice ) diff --git a/R/faust.R b/R/faust.R index ab16b25..4a1ce08 100755 --- a/R/faust.R +++ b/R/faust.R @@ -89,7 +89,7 @@ #' marker. All markers with empirical quantile above the depthScoreThreshold #' are used by `faust` to discover and annotate cell subsets in the experiment. #' -#' @param nameOccuranceNum The number of times a name has to appear in distinct +#' @param nameOccurrenceNumber The number of times a name has to appear in distinct #' SCAMP clusterings to be gated out. #' #' @param supervisedList A list of lists. The names of list entries correspond @@ -223,7 +223,7 @@ faust <- function(gatingSet, projectPath=normalizePath("."), depthScoreThreshold=0.01, selectionQuantile=0.50, - nameOccuranceNum=0, + nameOccurrenceNumber=0, supervisedList=NA, debugFlag=FALSE, threadNum=1, @@ -267,7 +267,7 @@ faust <- function(gatingSet, discoverPhenotypes( gatingSet = gatingSet, projectPath = projectPath, - nameOccuranceNum = nameOccuranceNum, + nameOccurrenceNumber = nameOccurrenceNumber, debugFlag = debugFlag, threadNum = threadNum, seedValue = seedValue, diff --git a/R/plotPhenotypeFilter.R b/R/plotPhenotypeFilter.R index 57f0558..cf3da52 100644 --- a/R/plotPhenotypeFilter.R +++ b/R/plotPhenotypeFilter.R @@ -1,6 +1,6 @@ .plotPhenotypeFilter <- function( projectPath, - nameOccuranceNum, + nameOccurrenceNumber, plottingDevice ) { @@ -24,7 +24,7 @@ geom_vline(xintercept=elbowLoc,col="red")+ xlab("Number of times a phenotype appears across clusterings")+ ylab("Number of phenotypes exceeding the appearance number")+ - ggtitle("Red line is nameOccuranceNum setting in faust") + ggtitle("Red line is nameOccurrenceNumber setting in faust") fpNameOut <- file.path(normalizePath(projectPath), "faustData", diff --git a/man/discoverPhenotypes.Rd b/man/discoverPhenotypes.Rd index e42710e..e839c17 100644 --- a/man/discoverPhenotypes.Rd +++ b/man/discoverPhenotypes.Rd @@ -7,7 +7,7 @@ discoverPhenotypes( gatingSet, projectPath = normalizePath("."), - nameOccuranceNum = ceiling((0.5 * length(gatingSet))), + nameOccurrenceNumber = ceiling((0.5 * length(gatingSet))), debugFlag = FALSE, threadNum = 1, seedValue = 123, @@ -32,7 +32,7 @@ final output of \code{faust}, an annotated matrix of counts, is produced at \code{projectPath/faustData/faustCountMatrix.rds}, and can be loaded into R using the \code{readRDS} function.} -\item{nameOccuranceNum}{The number of times a name has to appear in distinct +\item{nameOccurrenceNumber}{The number of times a name has to appear in distinct SCAMP clusterings to be gated out.} \item{debugFlag}{Boolean value. Set to TRUE to print method status information diff --git a/man/faust.Rd b/man/faust.Rd index 7ad5180..682e87b 100644 --- a/man/faust.Rd +++ b/man/faust.Rd @@ -15,7 +15,7 @@ faust( projectPath = normalizePath("."), depthScoreThreshold = 0.01, selectionQuantile = 0.5, - nameOccuranceNum = ceiling((0.5 * length(gatingSet))), + nameOccurrenceNumber = ceiling((0.5 * length(gatingSet))), supervisedList = NA, debugFlag = FALSE, threadNum = 1, @@ -116,7 +116,7 @@ empirical quantile is then compared to the depthScoreThreshold for each marker. All markers with empirical quantile above the depthScoreThreshold are used by \code{faust} to discover and annotate cell subsets in the experiment.} -\item{nameOccuranceNum}{The number of times a name has to appear in distinct +\item{nameOccurrenceNumber}{The number of times a name has to appear in distinct SCAMP clusterings to be gated out.} \item{supervisedList}{A list of lists. The names of list entries correspond diff --git a/reproducibility/simulationStudy/01_runSimulation.R b/reproducibility/simulationStudy/01_runSimulation.R index 7a51d14..de4e396 100644 --- a/reproducibility/simulationStudy/01_runSimulation.R +++ b/reproducibility/simulationStudy/01_runSimulation.R @@ -216,7 +216,7 @@ faust:::faust( depthScoreThreshold = 0.01, selectionQuantile = 0.5, drawAnnotationHistograms = FALSE, - nameOccuranceNum = max(1,floor(length(gs)/4)), + nameOccurrenceNumber = max(1,floor(length(gs)/4)), debugFlag = TRUE, threadNum = 10, seedValue = 12345, diff --git a/vignettes/faustIntro.Rmd b/vignettes/faustIntro.Rmd index 179efdb..51919e9 100644 --- a/vignettes/faustIntro.Rmd +++ b/vignettes/faustIntro.Rmd @@ -250,7 +250,7 @@ faust( debugFlag = FALSE, #set this to the number of threads you want to use on your system threadNum = parallel::detectCores() / 2 - 1, - nameOccuranceNum=1, + nameOccurrenceNumber=1, seedValue = 271828, annotationsApproved = FALSE # set to false before we inspect the scores plots. ) @@ -283,7 +283,7 @@ faust( debugFlag = FALSE, #set this to the number of threads you want to use on your system threadNum = parallel::detectCores() / 2 - 1, - nameOccuranceNum=1, + nameOccurrenceNumber=1, seedValue = 271828, annotationsApproved = TRUE ) @@ -331,7 +331,7 @@ The last column is the "not annotated" subset, which **faust** in one of two ways. Each cell in each experimental unit is associated with a full annotation by **faust**. The number of times a phenotype occurs across the experimental units is counted by **faust**. -If the resulting number falls below the setting of the `nameOccuranceNum` parameter in the **faust** function, +If the resulting number falls below the setting of the `nameOccurrenceNumber` parameter in the **faust** function, all cells associated with that phenotype are labeled "0_0_0_0_0". This is how **faust** implements phenotypic filtering as described by the manuscript.