Skip to content

Commit

Permalink
visualize: edit the labels for the x and y axes in MA plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Carol-seven committed Jul 7, 2024
1 parent d342860 commit c086078
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
10 changes: 6 additions & 4 deletions R/visualizations.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
#' to plot the two vertical lines (-M.thres and M.thres) on the MA plot when
#' \code{graphType = "MA"}.
#'
#' @param transformLabel A string used to label the title of the transformation type for
#' the transformed MA plot when \code{graphType = "MA"}.
#' @param transformLabel A string (default = "Log2") used to label the title and axes of
#' the transformation type for the transformed MA plot when \code{graphType = "MA"}.
#'
#' @param center A boolean (default = TRUE) indicating whether the variables should be
#' shifted to be zero centered when \code{graphType = "PCA_scree"},
Expand Down Expand Up @@ -154,7 +154,7 @@
visualize <- function(
dataSet, graphType = "volcano",
pkg = "pheatmap", cluster_cols = TRUE, cluster_rows = FALSE, show_colnames = TRUE, show_rownames = TRUE,
M.thres = 1 , transformLabel = NULL,
M.thres = 1 , transformLabel = "Log2",
center = TRUE, scale = TRUE,
addlabels = TRUE, choice = "variance", ncp = 10, addEllipses = TRUE, ellipse.level = 0.95, label = "all",
show_percentage = TRUE, fill_color = c("blue", "yellow", "green", "red"), show_universal = FALSE,
Expand Down Expand Up @@ -211,7 +211,9 @@ visualize <- function(
geom_point() +
geom_text_repel(show.legend = FALSE) +
scale_color_manual(values = c("Down" = "blue", "No" = "gray", "Up" = "red")) +
labs(title = paste(transformLabel, "Transformed MA Plot")) +
labs(title = paste(transformLabel, "Transformed MA Plot"),
x = paste(transformLabel, "average abundance"),
y = paste(transformLabel, "fold change")) +
theme_bw() +
theme(legend.position = "bottom", plot.title = element_text(hjust = .5))

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
scaffold: scaffold.html
usage_template: usage_template.html
last_built: 2024-07-07T04:18Z
last_built: 2024-07-07T06:14Z
urls:
reference: https://uconn-scs.github.io/msDiaLogue/reference
article: https://uconn-scs.github.io/msDiaLogue/articles
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/visualize.html

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

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions man/visualize.Rd

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

0 comments on commit c086078

Please sign in to comment.