Skip to content

Commit

Permalink
fix docs and plot palettes
Browse files Browse the repository at this point in the history
  • Loading branch information
nhejazi committed Aug 10, 2017
1 parent 7432d4c commit da26e25
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Suggests:
rmarkdown,
BiocStyle
Remotes:
nhejazi/biotmleData,
nhejazi/biotmleData
VignetteBuilder: knitr
RoxygenNote: 6.0.1
biocViews:
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,bioTMLE)
export()
export(.biotmle)
export(biomarkertmle)
export(heatmap_ic)
export(modtest_ic)
export(rnaseq_ic)
export(volcano_ic)
exportClasses(bioTMLE)
exportClasses(data.frame_OR_EList)
importClassesFrom(SummarizedExperiment,SummarizedExperiment)
importClassesFrom(limma,EList)
importFrom(SummarizedExperiment,SummarizedExperiment)
Expand Down
8 changes: 6 additions & 2 deletions R/biotmle.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
utils::globalVariables(c("new"))

#' Constructor for class union data.frame_OR_EList
#' @title S4 class union data.frame_OR_EList
#'
#' @description Class union contaning \code{data.frame} and \code{limma::Elist},
#' used internally to handle situations when a returned object has
#' a type that cannot be guessed from the function call.
#'
#' @return fusion of classes \code{data.frame} and \code{EList}, used within
#' \code{.biotmle} by class \code{bioTMLE} to handle uncertainty in the
Expand All @@ -11,7 +15,7 @@ utils::globalVariables(c("new"))
#'
#' @export
#'
methods::setClassUnion("data.frame_OR_EList", c("data.frame", "EList"))
setClassUnion(name = "data.frame_OR_EList", members = c("data.frame", "EList"))

################################################################################

Expand Down
10 changes: 5 additions & 5 deletions R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#'
plot.bioTMLE <- function(x, ..., type = "pvals_adj") {

pal1 <- wesanderson::wes_palette("GrandBudapest", 100, type = "continuous")
pal2 <- wesanderson::wes_palette("Darjeeling", type = "continuous")
pal1 <- wesanderson::wes_palette("Royal2", 100, type = "continuous")
pal2 <- wesanderson::wes_palette("Darjeeling2", type = "continuous")

if(type == "pvals_raw") {
p <- ggplot2::ggplot(as.data.frame(x@topTable), ggplot2::aes(P.Value))
Expand Down Expand Up @@ -104,8 +104,8 @@ volcano_ic <- function(biotmle, fc_bound = 3.0, pval_bound = 0.2) {

stopifnot(class(biotmle) == "bioTMLE")

pal1 <- wesanderson::wes_palette("GrandBudapest", 100, type = "continuous")
pal2 <- wesanderson::wes_palette("Darjeeling", type = "continuous")
pal1 <- wesanderson::wes_palette("Royal2", 100, type = "continuous")
pal2 <- wesanderson::wes_palette("Darjeeling2", type = "continuous")

tt_volcano <- as.data.frame(biotmle@topTable) %>%
dplyr::arrange(adj.P.Val) %>%
Expand Down Expand Up @@ -207,7 +207,7 @@ heatmap_ic <- function(x, ..., design, FDRcutoff = 0.05, top = 25) {

annot <- ifelse(design == 0, "Control", "Treated")

pal <- wes_palette("Zissou", 100, type = "continuous")
pal <- wes_palette("Moonrise3", 100, type = "continuous")

superheat::superheat(as.matrix(biomarkerTMLEout_top), row.dendrogram = TRUE,
grid.hline.col = "white", force.grid.hline = TRUE,
Expand Down
16 changes: 16 additions & 0 deletions man/data.frame_OR_EList-class.Rd

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

0 comments on commit da26e25

Please sign in to comment.