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

Rename agglomerateByRank/Prevalence #84

Closed
wants to merge 7 commits into from
Closed
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
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Authors@R:
person(given = "Basil", family = "Courbayre", role = c("ctb")),
person(given = "Giulio", family = "Benedetti", role = c("ctb"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-8732-7692"))
comment = c(ORCID = "0000-0002-8732-7692")),
person(given = "Muluh", family = "Muluh", role=c("ctb"))
)
Description: The miaViz package implements functions to visualize
TreeSummarizedExperiment objects especially in the context of microbiome
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Changes in version 1.7.x
Changes in version 1.9.x
+ Updated plotDMN to work with newest mia version
+ Added plotCCA and plotRDA functions
+ deprecate agglomerateByRank and agglomerateByPrevalence

Changes in version 1.11.x
+ replace addTaxonomyTree with addHierarchyTree after renaming in mia package
Expand Down
4 changes: 2 additions & 2 deletions R/plotGraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
#' data(row_graph_order)
#' metadata(GlobalPatterns)$col_graph <- col_graph
#'
#' genus <- agglomerateByRank(GlobalPatterns,"Genus",na.rm=TRUE)
#' genus <- mergeFeaturesByRank(GlobalPatterns,"Genus",na.rm=TRUE)
#' metadata(genus)$row_graph <- row_graph
#' order <- agglomerateByRank(genus,"Order",na.rm=TRUE)
#' order <- mergeFeaturesByRank(genus,"Order",na.rm=TRUE)
#' metadata(order)$row_graph <- row_graph_order
#'
#' # plot a graph independently
Expand Down
10 changes: 5 additions & 5 deletions R/plotPrevalence.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#' @param rank,... additional arguments
#' \itemize{
#' \item{If \code{!is.null(rank)} matching arguments are passed on to
#' \code{\link[=agglomerate-methods]{agglomerateByRank}}. See
#' \code{\link[=agglomerate-methods]{?agglomerateByRank}} for more details.
#' \code{\link[=agglomerate-methods]{mergeFeaturesByRank}}. See
#' \code{\link[=agglomerate-methods]{?mergeFeaturesByRank}} for more details.
#' }
#' \item{additional arguments for plotting. See
#' \code{\link{mia-plot-args}} for more details i.e. call \code{help("mia-plot-args")}}
Expand Down Expand Up @@ -79,16 +79,16 @@
#'
#' To exclude certain taxa, preprocess \code{x} to your liking, for example
#' with subsetting via \code{getPrevalentTaxa} or
#' \code{agglomerateByPrevalence}.
#' \code{mergeFeaturesByPrevalence}.
#'
#' @return
#' A \code{ggplot2} object or \code{plotly} object, if more than one
#' \code{prevalences} was defined.
#'
#' @seealso
#' \code{\link[mia:getPrevalence]{getPrevalence}},
#' \code{\link[mia:getPrevalence]{agglomerateByPrevalence}},
#' \code{\link[mia:agglomerate-methods]{agglomerateByRank}}
#' \code{\link[mia:getPrevalence]{mergeFeaturesByPrevalence}},
#' \code{\link[mia:agglomerate-methods]{mergeFeaturesByRank}}
#'
#' @name plotPrevalence
#'
Expand Down
2 changes: 1 addition & 1 deletion R/plotSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ setMethod("plotSeries", signature = c(object = "SummarizedExperiment"),
.check_taxonomic_rank(rank, object)

# Agglomerates the object
object <- agglomerateByRank(object, rank = rank)
object <- mergeFeaturesByRank(object, rank = rank)
}

# Checks Y
Expand Down
4 changes: 2 additions & 2 deletions man/plotGraph.Rd

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

10 changes: 5 additions & 5 deletions man/plotPrevalence.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-2plotGraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test_that("plot graph", {
expect_equal(miaViz:::.colnames_tbl_graph(actual,"edges"),
c("from","to","weight"))
#
genus <- agglomerateByRank(GlobalPatterns,"Genus",na.rm=TRUE)
genus <- mergeFeaturesByRank(GlobalPatterns,"Genus",na.rm=TRUE)
plot <- plotColGraph(col_graph,
genus,
colour_by = "SampleType",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-2plotTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test_that("plot tree", {
library(scater)
library(mia)
data(GlobalPatterns)
altExp(GlobalPatterns,"genus") <- agglomerateByRank(GlobalPatterns,"Genus", make_unique = FALSE)
altExp(GlobalPatterns,"genus") <- mergeFeaturesByRank(GlobalPatterns,"Genus", make_unique = FALSE)
altExp(GlobalPatterns,"genus") <- addPerFeatureQC(altExp(GlobalPatterns,"genus"))
rowData(altExp(GlobalPatterns,"genus"))$log_mean <- log(rowData(altExp(GlobalPatterns,"genus"))$mean)
top_taxa <- getTopFeatures(altExp(GlobalPatterns,"genus"),
Expand Down
2 changes: 1 addition & 1 deletion vignettes/miaViz.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ library(scater)
library(mia)
```
```{r}
altExp(GlobalPatterns,"Genus") <- agglomerateByRank(GlobalPatterns,"Genus")
altExp(GlobalPatterns,"Genus") <- mergeFeaturesByRank(GlobalPatterns,"Genus")
altExp(GlobalPatterns,"Genus") <- addPerFeatureQC(altExp(GlobalPatterns,"Genus"))
rowData(altExp(GlobalPatterns,"Genus"))$log_mean <-
log(rowData(altExp(GlobalPatterns,"Genus"))$mean)
Expand Down
Loading