Skip to content

Commit

Permalink
Fix getMediation bug (#673)
Browse files Browse the repository at this point in the history
Co-authored-by: Tuomas Borman <[email protected]>
  • Loading branch information
RiboRings and TuomasBorman authored Jan 18, 2025
1 parent a8e1e0a commit 5b31637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions R/mediate.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' as mediator in the model. (Default: \code{NULL})
#'
#' @param assay.type \code{Character scalar}. Specifies the assay used for
#' feature-wise mediation analysis. (Default: \code{"counts"})
#' feature-wise mediation analysis. (Default: \code{NULL})
#'
#' @param dimred \code{Character scalar}. Indicates the reduced dimension
#' result in \code{reducedDims(object)} for component-wise mediation analysis.
Expand Down Expand Up @@ -174,10 +174,9 @@ setMethod("addMediation", signature = c(x = "SummarizedExperiment"),
#' @importFrom SingleCellExperiment reducedDim reducedDimNames
setMethod("getMediation", signature = c(x = "SummarizedExperiment"),
function(x, outcome, treatment,
mediator = NULL, assay.type = "counts", dimred = NULL,
mediator = NULL, assay.type = NULL, dimred = NULL,
family = gaussian(), covariates = NULL, p.adj.method = "holm",
add.metadata = FALSE, verbose = TRUE, ...) {

###################### Input check ########################
if( !outcome %in% names(colData(x)) ){
stop(outcome, " not found in colData(x).", call. = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions man/getMediation.Rd

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

0 comments on commit 5b31637

Please sign in to comment.