Skip to content
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
70 changes: 1 addition & 69 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ export(transformFeatures)
export(transformSamples)
export(unsplitByRanks)
export(unsplitOn)
exportMethods("relabundance<-")
exportMethods(ZTransform)
exportMethods(addAbundanceClass)
exportMethods(addAlpha)
exportMethods(addCCA)
Expand All @@ -210,58 +208,36 @@ exportMethods(addNMF)
exportMethods(addNotContaminantQC)
exportMethods(addPCA)
exportMethods(addPERMANOVA)
exportMethods(addPerSampleDominantFeatures)
exportMethods(addPerSampleDominantTaxa)
exportMethods(addPrevalence)
exportMethods(addPrevalentAbundance)
exportMethods(addQC)
exportMethods(addRDA)
exportMethods(addRPCA)
exportMethods(addTaxonomyTree)
exportMethods(agglomerateByModule)
exportMethods(agglomerateByPrevalence)
exportMethods(agglomerateByRank)
exportMethods(agglomerateByRanks)
exportMethods(agglomerateBySet)
exportMethods(agglomerateByVariable)
exportMethods(applyBySet)
exportMethods(bestDMNFit)
exportMethods(calculateDMN)
exportMethods(calculateDMNgroup)
exportMethods(calculateJSD)
exportMethods(calculateOverlap)
exportMethods(calculateUnifrac)
exportMethods(checkTaxonomy)
exportMethods(cluster)
exportMethods(convertToBIOM)
exportMethods(convertToMAE)
exportMethods(convertToPhyloseq)
exportMethods(convertToTreeSE)
exportMethods(countDominantFeatures)
exportMethods(countDominantTaxa)
exportMethods(estimateDivergence)
exportMethods(estimateDiversity)
exportMethods(estimateDominance)
exportMethods(estimateEvenness)
exportMethods(estimateFaith)
exportMethods(estimateRichness)
exportMethods(full_join)
exportMethods(getAbundanceClass)
exportMethods(getAbundant)
exportMethods(getAlpha)
exportMethods(getBestDMNFit)
exportMethods(getCCA)
exportMethods(getCluster)
exportMethods(getConditionallyLowAbundant)
exportMethods(getCrossAssociation)
exportMethods(getDMN)
exportMethods(getDPCoA)
exportMethods(getDissimilarity)
exportMethods(getDivergence)
exportMethods(getDominant)
exportMethods(getDysbiosis)
exportMethods(getExperimentCrossAssociation)
exportMethods(getExperimentCrossCorrelation)
exportMethods(getHierarchyTree)
exportMethods(getJointRPCA)
exportMethods(getLDA)
Expand All @@ -276,70 +252,30 @@ exportMethods(getPermanentlyLowAbundant)
exportMethods(getPrevalence)
exportMethods(getPrevalent)
exportMethods(getPrevalentAbundance)
exportMethods(getPrevalentFeatures)
exportMethods(getPrevalentTaxa)
exportMethods(getQC)
exportMethods(getRDA)
exportMethods(getRPCA)
exportMethods(getRare)
exportMethods(getRareFeatures)
exportMethods(getRareTaxa)
exportMethods(getReducedDimAttribute)
exportMethods(getTaxonomyLabels)
exportMethods(getTop)
exportMethods(getTopFeatures)
exportMethods(getTopTaxa)
exportMethods(getUnique)
exportMethods(getUniqueFeatures)
exportMethods(getUniqueTaxa)
exportMethods(inner_join)
exportMethods(isContaminant)
exportMethods(isNotContaminant)
exportMethods(left_join)
exportMethods(makePhyloseqFromTreeSE)
exportMethods(makePhyloseqFromTreeSummarizedExperiment)
exportMethods(makeTreeSummarizedExperimentFromPhyloseq)
exportMethods(mapTaxonomy)
exportMethods(meltAssay)
exportMethods(meltSE)
exportMethods(mergeCols)
exportMethods(mergeFeatures)
exportMethods(mergeFeaturesByPrevalence)
exportMethods(mergeFeaturesByRank)
exportMethods(mergeRows)
exportMethods(mergeSEs)
exportMethods(mergeSamples)
exportMethods(perSampleDominantFeatures)
exportMethods(perSampleDominantTaxa)
exportMethods(performDMNgroupCV)
exportMethods(rarefyAssay)
exportMethods(relAbundanceCounts)
exportMethods(relabundance)
exportMethods(right_join)
exportMethods(runJSD)
exportMethods(runOverlap)
exportMethods(splitOn)
exportMethods(subsampleCounts)
exportMethods(subsetBy)
exportMethods(subsetByPrevalent)
exportMethods(subsetByPrevalentFeatures)
exportMethods(subsetByPrevalentTaxa)
exportMethods(subsetByRare)
exportMethods(subsetByRareFeatures)
exportMethods(subsetByRareTaxa)
exportMethods(subsetFeatures)
exportMethods(subsetSamples)
exportMethods(subsetTaxa)
exportMethods(summarizeDominance)
exportMethods(summary)
exportMethods(taxonomyRankEmpty)
exportMethods(taxonomyRanks)
exportMethods(taxonomyTree)
exportMethods(testExperimentCrossAssociation)
exportMethods(testExperimentCrossCorrelation)
exportMethods(transformAssay)
exportMethods(transformFeatures)
exportMethods(transformSamples)
exportMethods(unsplitByRanks)
exportMethods(unsplitOn)
import(DelayedArray)
Expand Down Expand Up @@ -390,12 +326,8 @@ importFrom(DelayedMatrixStats,
rowSums2
)
importFrom(DirichletMultinomial,
AIC,
BIC,
cvdmngroup,
dmn,
dmngroup,
laplace
dmngroup
)
importFrom(IRanges,
CharacterList,
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,4 @@ Changes in version 1.21.x

Changes in version 1.23.x
+ getTop: method = "prevalence" uses include.lowest = FALSE, the getPrevalence() default, so existing code can return different features. With the default detection = 0, every feature had prevalence 1 and the returned features were not the most prevalent ones; include.lowest = TRUE restores the previous counting. Passing sort or include.lowest no longer gives a duplicate-argument error (1.23.2, 2026-11-27)
+ Functions and argument names deprecated in 2024 or earlier are now defunct (#882) (2026-11-22)
39 changes: 7 additions & 32 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ setGeneric(
#' @export
setGeneric("getDivergence", signature = c("x"),
function(
x, assay.type = assay_name, assay_name = "counts", reference = "median",
method = "bray", ...)
x, assay.type = "counts", reference = "median", method = "bray", ...)
standardGeneric("getDivergence"))

#' @rdname addDysbiosis
Expand Down Expand Up @@ -86,11 +85,6 @@ setGeneric("agglomerateByVariable", signature = "x", function(x, ...)
setGeneric("agglomerateBySet", signature = "x", function(x, ...)
standardGeneric("agglomerateBySet"))

#' @rdname calculateDMN
#' @export
setGeneric("calculateDMN", signature = c("x"), function(x, ...)
standardGeneric("calculateDMN"))

#' @rdname addCluster
#' @export
setGeneric("getCluster", signature = c("x"),
Expand Down Expand Up @@ -160,9 +154,8 @@ setGeneric("getCrossAssociation", signature = c("x"), function(x, ...)
#' @rdname getDominant
#' @export
setGeneric("getDominant",signature = c("x"),
function(x, assay.type = assay_name, assay_name = "counts",
group = rank, rank = NULL, other.name = "Other", n = NULL,
complete = TRUE, ...)
function(x, assay.type = "counts", group = NULL, other.name = "Other",
n = NULL, complete = TRUE, ...)
standardGeneric("getDominant"))

#' @rdname getDominant
Expand Down Expand Up @@ -195,7 +188,7 @@ setGeneric("getRare", signature = "x", function(x, ...)
#' @rdname getPrevalence
#' @export
setGeneric("getPrevalentAbundance", signature = "x",
function(x, assay.type = assay_name, assay_name = "relabundance", ...)
function(x, assay.type = "relabundance", ...)
standardGeneric("getPrevalentAbundance"))

#' @rdname getPrevalence
Expand Down Expand Up @@ -295,8 +288,7 @@ setGeneric("getTop", signature = "x",
function(
x, top= 5L,
method = c("mean", "sum", "median", "sd", "cv", "prevalence"),
assay.type = assay_name, assay_name = "counts", na.rm = TRUE,
sort = FALSE, ...)
assay.type = "counts", na.rm = TRUE, sort = FALSE, ...)
standardGeneric("getTop"))

#' @rdname taxonomy-methods
Expand Down Expand Up @@ -342,33 +334,16 @@ setGeneric("addHierarchyTree", signature = "x", function(x, ...)
setGeneric("transformAssay", signature = c("x"), function(x, ...)
standardGeneric("transformAssay"))

#' @rdname calculateDMN
#' @export
setGeneric("getDMN", signature = "x", function(x, name = "DMN", ...)
standardGeneric("getDMN"))

#' @rdname calculateDMN
#' @export
setGeneric("bestDMNFit", signature = "x",
function(x, name = "DMN", type = c("laplace","AIC","BIC"), ...)
standardGeneric("bestDMNFit"))

#' @rdname calculateDMN
#' @rdname calculateDMNgroup
#' @export
setGeneric("calculateDMNgroup", signature = c("x"), function(x, ...)
standardGeneric("calculateDMNgroup"))

#' @rdname calculateDMN
#' @rdname calculateDMNgroup
#' @export
setGeneric("performDMNgroupCV", signature = c("x"), function(x, ...)
standardGeneric("performDMNgroupCV"))

#' @rdname calculateDMN
#' @export
setGeneric("getBestDMNFit", signature = "x",
function(x, name = "DMN", type = c("laplace","AIC","BIC"), ...)
standardGeneric("getBestDMNFit"))

NULL
setGeneric(".estimate_dominance", signature = c("x"),
function(x, ...) standardGeneric(".estimate_dominance"))
Expand Down
4 changes: 3 additions & 1 deletion R/addAlpha.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#' These functions estimates alpha diversity indices optionally using
#' rarefaction.
#'
#' @inheritParams calculateDMN
#' @param BPPARAM A
#' \code{\link[BiocParallel:BiocParallelParam-class]{BiocParallelParam}}
#' object specifying whether the calculation should be parallelized.
#'
#' @param x a \code{\link[SummarizedExperiment]{SummarizedExperiment}} object.
#'
Expand Down
7 changes: 3 additions & 4 deletions R/addDivergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#'
#' @param x a \code{\link[SummarizedExperiment]{SummarizedExperiment}} object.
#'
#' @param assay_name Deprecated. Use \code{assay.type} instead.
#'
#' @param reference \code{Character scalar}. A column name from
#' \code{colData(x)} or either \code{"mean"} or \code{"median"}. If column name
#' is specified, the column must include reference samples for each sample.
Expand Down Expand Up @@ -103,9 +101,10 @@ setMethod("addDivergence", signature = c(x="SummarizedExperiment"),
#' @export
setMethod("getDivergence", signature = c(x="SummarizedExperiment"),
function(
x, assay.type = assay_name, assay_name = "counts",
reference = "median", method = "bray", FUN = getDissimilarity, ...){
x, assay.type = "counts", reference = "median", method = "bray",
FUN = getDissimilarity, ...){
################### Input check ###############
.check_defunct_args(...names(), "assay_name")
# Get altExp if user has specified
x <- .check_and_get_altExp(x, ...)
# Check assay.type
Expand Down
27 changes: 10 additions & 17 deletions R/agglomerate.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
#' \code{empty.fields} in specified \code{rank} will be excluded.
#' (Default: \code{TRUE})
#'
#' @param agglomerateTree Deprecated. Use \code{update.tree} instead.
#'
#' @param agglomerate.tree Deprecated. Use \code{update.tree} instead.
#'
#' @param ... arguments passed to \code{agglomerateByRank} function for
#' \code{SummarizedExperiment} objects,
#' to \code{\link[=agglomerate-methods]{agglomerateByVariable}},
Expand Down Expand Up @@ -113,8 +109,6 @@
#' nested alternative experiments by default. (Default:
#' \code{TRUE})
#'
#' @param strip_altexp Deprecated. Use \code{altexp.rm} instead.
#'
#' @param by \code{Character scalar}. Determines if data is merged
#' row-wise / for features ('rows') or column-wise / for samples ('cols').
#' Must be \code{'rows'} or \code{'cols'}.
Expand All @@ -129,17 +123,13 @@
#' specify one or several names of numeric or logical variables from the
#' \code{rowData(x)/colData(x)} by which to agglomerate rows or columns.
#'
#' @param f Deprecated. Use \code{group} instead.
#'
#' @param update.tree \code{Logical scalar}. Should
#' \code{rowTree()} also be agglomerated? Each group is collapsed into the
#' most recent common ancestor of its features. This requires that groups are
#' monophyletic, i.e., each group forms its own subtree. Otherwise, the tree is
#' removed with a warning. If \code{FALSE}, the tree is removed.
#' (Default: \code{FALSE})
#'
#' @param mergeTree Deprecated. Use \code{update.tree} instead.
#'
#' @examples
#'
#' ### Agglomerate data based on taxonomic information
Expand Down Expand Up @@ -267,9 +257,10 @@ NULL
#' @export
setMethod(
"agglomerateByRank", signature = c(x = "TreeSummarizedExperiment"),
function(x, rank = taxonomyRanks(x)[1], update.tree = agglomerateTree,
agglomerate.tree = agglomerateTree, agglomerateTree = FALSE, ...){
function(x, rank = taxonomyRanks(x)[1], update.tree = FALSE, ...){
# Input check
.check_defunct_args(
...names(), c("agglomerateTree", "agglomerate.tree"))
if(!.is_a_bool(update.tree)){
stop("'update.tree' must be TRUE or FALSE.", call. = FALSE)
}
Expand All @@ -285,9 +276,10 @@ setMethod(
#' @export
setMethod(
"agglomerateByRank", signature = c(x = "SingleCellExperiment"),
function(x, rank = taxonomyRanks(x)[1], altexp = NULL,
altexp.rm = strip_altexp, strip_altexp = TRUE, ...){
function(x, rank = taxonomyRanks(x)[1], altexp = NULL, altexp.rm = TRUE,
...){
# Input check
.check_defunct_args(...names(), "strip_altexp")
if(!.is_a_bool(altexp.rm)){
stop("'altexp.rm' must be TRUE or FALSE.", call. = FALSE)
}
Expand Down Expand Up @@ -391,8 +383,8 @@ setMethod("agglomerateByRank", signature = c(x = "SummarizedExperiment"),
#' @export
setMethod("agglomerateByVariable",
signature = c(x = "TreeSummarizedExperiment"),
function(x, by, group = f, f, update.tree = mergeTree, mergeTree = FALSE,
...){
function(x, by, group, update.tree = FALSE, ...){
.check_defunct_args(...names(), c("f", "mergeTree"))
# Check by
by <- .check_MARGIN(by)
# Get function based on by
Expand All @@ -407,7 +399,8 @@ setMethod("agglomerateByVariable",
#' @aliases agglomerateByVariable
#' @export
setMethod("agglomerateByVariable", signature = c(x = "SummarizedExperiment"),
function(x, by, group = f, f, ...){
function(x, by, group, ...){
.check_defunct_args(...names(), "f")
# Check by
by <- .check_MARGIN(by)
# Agglomerate the data
Expand Down
Loading
Loading