Skip to content

Commit

Permalink
absolute abundances class also moved to data package
Browse files Browse the repository at this point in the history
  • Loading branch information
d-callan committed Mar 7, 2024
1 parent 50d007b commit 0d98591
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/method-alphaDiv.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @import data.table
#' @importFrom methods new slot validObject
#' @importFrom stats as.dist as.formula median quantile var
#' @importFrom microbiomeData AbundanceData getAbundances getSampleMetadata
#' @importFrom microbiomeData AbsoluteAbundanceData AbundanceData getAbundances getSampleMetadata
#' @export
setGeneric("alphaDiv",
function(data, method = c('shannon','simpson','evenness'), verbose = c(TRUE, FALSE)) standardGeneric("alphaDiv"),
Expand Down
7 changes: 3 additions & 4 deletions R/method-differentialAbundance.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ setGeneric("deseq",
signature = c("data", "comparator")
)

#' @importFrom microbiomeData AbsoluteAbundanceData
setMethod("deseq", signature("AbsoluteAbundanceData", "Comparator"), function(data, comparator, verbose = c(TRUE, FALSE)) {
setMethod("deseq", signature("microbiomeData::AbsoluteAbundanceData", "Comparator"), function(data, comparator, verbose = c(TRUE, FALSE)) {
recordIdColumn <- data@recordIdColumn
ancestorIdColumns <- data@ancestorIdColumns
allIdColumns <- c(recordIdColumn, ancestorIdColumns)
Expand Down Expand Up @@ -165,7 +164,7 @@ setMethod("deseq", signature("AbsoluteAbundanceData", "Comparator"), function(da
})

setMethod("deseq", signature("AbundanceData", "Comparator"), function(data, comparator, verbose = c(TRUE, FALSE)) {
stop("Please use the AbsoluteAbundanceData class with DESeq2.")
stop("Please use the microbiomeData::AbsoluteAbundanceData class with DESeq2.")
})

setGeneric("maaslin",
Expand Down Expand Up @@ -216,7 +215,7 @@ setMethod("maaslin", signature("AbundanceData", "Comparator"), function(data, co
#'
#' This function returns the fold change and associated p value for a differential abundance analysis comparing samples in two groups.
#'
#' @param data AbsoluteAbundanceData object
#' @param data microbiomeData::AbsoluteAbundanceData object
#' @param comparator Comparator object specifying the variable and values or bins to be used in dividing samples into groups.
#' @param method string defining the the differential abundance method. Accepted values are 'DESeq2' and 'Maaslin2'.
#' @param pValueFloor numeric value that indicates the smallest p value that should be returned.
Expand Down
2 changes: 1 addition & 1 deletion man/differentialAbundance.Rd

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

0 comments on commit 0d98591

Please sign in to comment.