Skip to content

Commit

Permalink
can set binarizeMethod to a hard cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudibrahim committed Jun 24, 2019
1 parent 77fade7 commit 0356d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions R/bkend.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ binarize = function(x, method = "median") {
pi = median(x@x)
} else if (method == "naive") {
pi = min(x@x)
} else if ((is.numeric(method)) & (method >= 0)) {
pi = method
} else {
stop("Unrecognized binarization method! genesorteR stopped.")
}
Expand Down
8 changes: 5 additions & 3 deletions R/sortGenes.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#' This is equal to the median of all non-zero entries in the matrix and is
#' returned in \code{cutoff}. When binarizeMethod is "naive", all non-zero
#' entries are kept and the minimum value of non-zero entries is returned in
#' \code{cutoff}. When the input matrix \code{x} has already been binarized, set
#' \code{binarizeMethod} to "naive".
#' \code{cutoff}. When the input matrix \code{x} has already been binarized,
#' set \code{binarizeMethod} to "naive". You can set a specific cutoff value
#' for binarization, by setting #' \code{binarizeMethod} to a numeric value >= 0.
#'
#' The specificity score matrix \code{specScore} is calculated as
#' \code{condGeneProb * postClustProb}. Therefore, it simply balances the
Expand All @@ -30,7 +31,8 @@
#' @param classLabels A numeric or character vector or a factor of the same
#' length as ncol(x) that represents cell cluster assignments. It will be
#' coerced to a factor whose levels are the cell cluster names.
#' @param binarizeMethod Either "median" (default) or "naive". See Details.
#' @param binarizeMethod Either "median" (default) or "naive" or a numeric cutoff.
#' See Details.
#' @param returnInput Return the input matrix and cell classes? \code{TRUE} by
#' default.
#' @param cores A number greater than zero (1 by default) that indicates how
Expand Down

0 comments on commit 0356d88

Please sign in to comment.