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

plotAbundanceDensity: added boxplot and violin #143

Merged
merged 8 commits into from
Aug 12, 2024
Merged
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
15 changes: 14 additions & 1 deletion R/plotAbundanceDensity.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
#'
#' @author Leo Lahti and Tuomas Borman. Contact: \url{microbiome.github.io}
#'
#' @seealso
#' \code{\link[scater:plotExpression]{scater::plotExpression}}
#'
#' @examples
#' data("peerj13075", package = "mia")
#' tse <- peerj13075
Expand Down Expand Up @@ -127,6 +130,16 @@
#' # to your wishes
#' plotAbundanceDensity(
#' tse, assay.type = "relabundance", decreasing = NA)
#'
#' # Box plots and violin plots are supported by scater::plotExpression.
#' # Plots the relative abundance of 5 most abundant taxa as a violin plot.
#' library(scater)
#' top <- getTop(tse, top = 5)
#' plotExpression(tse, features = top, assay.type = "relabundance") + ggplot2::coord_flip()
#'
#' # Plots the relative abundance of 5 most abundant taxa as a box plot.
#' plotExpression(tse, features = top, assay.type = "relabundance",
#' show_violin = FALSE, show_box = TRUE) + ggplot2::coord_flip()
#'
NULL

Expand Down Expand Up @@ -388,4 +401,4 @@ setMethod("plotAbundanceDensity", signature = c(x = "SummarizedExperiment"),
add_x_text = TRUE,
angle_x_text = angle_x_text)
return(plot_out)
}
}
13 changes: 13 additions & 0 deletions man/plotAbundanceDensity.Rd

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

Loading