Skip to content

Commit

Permalink
lightweight exmaples for plot_mol_boxplot & loadings plot
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmohamed committed Apr 1, 2019
1 parent 10cc4da commit 36c9eef
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lipidr
Title: Lipidomics Analysis Workflow in R
Version: 0.99.1
Version: 0.99.2
Authors@R: c(
person(
"Ahmed", "Mohamed",
Expand Down
2 changes: 1 addition & 1 deletion R/opls.R
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ plot_mva <- function(mvaresults, components = c(1, 2), color_by = NULL) {
#' data_normalized,
#' method = "OPLS-DA", group_col = "BileAcid", groups = c("water", "DCA")
#' )
#' plot_mva_loadings(mvaresults, color_by = "Class", top.n = 30)
#' plot_mva_loadings(mvaresults, color_by = "Class", top.n = 10)
plot_mva_loadings <- function(mvaresults, components = c(1, 2),
color_by = NULL,
top.n = nrow(mvaresults$loadings)) {
Expand Down
9 changes: 7 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,13 @@ plot_molecule_cv <- function(data, measure = "Area", log = TRUE) {
#' @examples
#' data(data_normalized)
#'
#' plot_molecule_boxplot(data_normalized)
#' plot_molecule_boxplot(data_normalized, "Retention.Time", log = FALSE)
#' # plot the variation in intensity of ITSD (internal standards) in QC samples
#' d_itsd_qc <- data_normalized[
#' rowData(data_normalized)$itsd,
#' data_normalized$group == "QC"
#' ]
#' plot_molecule_boxplot(d_itsd_qc)
#' plot_molecule_boxplot(d_itsd_qc, "Retention.Time", log = FALSE)
plot_molecule_boxplot <- function(data, measure = "Area", log = TRUE) {
stopifnot(inherits(data, "SkylineExperiment"))
dlong <- to_long_format(data, measure)
Expand Down
9 changes: 7 additions & 2 deletions man/plot_molecule_boxplot.Rd

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

2 changes: 1 addition & 1 deletion man/plot_mva_loadings.Rd

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

0 comments on commit 36c9eef

Please sign in to comment.