Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change nameOccurranceNum to nameOccurrenceNumber #19

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions R/clusterExpUnitsWithScamp.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@


.clusterExpUnitsWithScamp <- function(projectPath,
nameOccuranceNum,
nameOccurrenceNumber,
debugFlag,
threadNum,
seedValue,
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions R/discoverPhenotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -119,7 +119,7 @@
#' @md
discoverPhenotypes <- function(gatingSet,
projectPath=normalizePath("."),
nameOccuranceNum=0,
nameOccurrenceNumber=0,
debugFlag=FALSE,
threadNum=1,
seedValue=123,
Expand Down Expand Up @@ -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,
Expand All @@ -167,7 +167,7 @@ discoverPhenotypes <- function(gatingSet,

.plotPhenotypeFilter(
projectPath=projectPath,
nameOccuranceNum=nameOccuranceNum,
nameOccurrenceNumber=nameOccurrenceNumber,
plottingDevice=plottingDevice
)

Expand Down
6 changes: 3 additions & 3 deletions R/faust.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -267,7 +267,7 @@ faust <- function(gatingSet,
discoverPhenotypes(
gatingSet = gatingSet,
projectPath = projectPath,
nameOccuranceNum = nameOccuranceNum,
nameOccurrenceNumber = nameOccurrenceNumber,
debugFlag = debugFlag,
threadNum = threadNum,
seedValue = seedValue,
Expand Down
4 changes: 2 additions & 2 deletions R/plotPhenotypeFilter.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.plotPhenotypeFilter <- function(
projectPath,
nameOccuranceNum,
nameOccurrenceNumber,
plottingDevice
)
{
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions man/discoverPhenotypes.Rd

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

4 changes: 2 additions & 2 deletions man/faust.Rd

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

2 changes: 1 addition & 1 deletion reproducibility/simulationStudy/01_runSimulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions vignettes/faustIntro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
)
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -331,7 +331,7 @@ The last column is the "not annotated" subset, which **<span style="color:skyblu
Cells are given the generic label by **<span style="color:skyblue">faust</span>** in one of two ways.
Each cell in each experimental unit is associated with a full annotation by **<span style="color:skyblue">faust</span>**.
The number of times a phenotype occurs across the experimental units is counted by **<span style="color:skyblue">faust</span>**.
If the resulting number falls below the setting of the `nameOccuranceNum` parameter in the **<span style="color:skyblue">faust</span>** function,
If the resulting number falls below the setting of the `nameOccurrenceNumber` parameter in the **<span style="color:skyblue">faust</span>** function,
all cells associated with that phenotype are labeled "0_0_0_0_0". This is how **<span style="color:skyblue">faust</span>**
implements phenotypic filtering as described by the manuscript.

Expand Down