Skip to content

Commit

Permalink
0.99.16
Browse files Browse the repository at this point in the history
including examples for plot functions again
  • Loading branch information
stefangraw committed Feb 19, 2019
1 parent cd953ec commit e1e0617
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pwrEWAS
Title: A user-friendly tool for comprehensive power estimation for epigenome wide association studies (EWAS)
Version: 0.99.15
Version: 0.99.16
Description: pwrEWAS is a user-friendly tool to assists researchers in the design and planning of EWAS to help circumvent under- and overpowered studies.
Author: Stefan Graw
Maintainer: Stefan Graw <sgraw@kumc.edu>
Expand Down
60 changes: 56 additions & 4 deletions R/plotFunction_v1.4.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,34 @@
#' @export
#'
#' @examples
#' # pwrEWAS_powerPlot(data = outDelta$powerArray, sd = FALSE)
#' # pwrEWAS_powerPlot(data = outSD$powerArray, sd = TRUE)
#' outDelta = pwrEWAS(minTotSampleSize = 10,
#' maxTotSampleSize = 20,
#' SampleSizeSteps = 10,
#' NcntPer = 0.5,
#' targetDelta = c(0.2, 0.5),
#' J = 1000,
#' targetDmCpGs = 10,
#' tissueType = "Adult (PBMC)",
#' detectionLimit = 0.01,
#' DMmethod = "limma",
#' FDRcritVal = 0.05,
#' core = 2,
#' sims = 30)
#' pwrEWAS_powerPlot(data = outDelta$powerArray, sd = FALSE)
#' outSD = pwrEWAS(minTotSampleSize = 10,
#' maxTotSampleSize = 20,
#' SampleSizeSteps = 10,
#' NcntPer = 0.5,
#' deltaSD = c(0.02, 0.03),
#' J = 1000,
#' targetDmCpGs = 10,
#' tissueType = "Adult (PBMC)",
#' detectionLimit = 0.01,
#' DMmethod = "limma",
#' FDRcritVal = 0.05,
#' core = 2,
#' sims = 30)
#' pwrEWAS_powerPlot(data = outSD$powerArray, sd = TRUE)
pwrEWAS_powerPlot <- function(data, sd = FALSE){
sampleSizes <- as.numeric(dimnames(data)[[2]])
deltas <- dimnames(data)[[3]]
Expand Down Expand Up @@ -87,8 +113,34 @@ gg_color_hue <- function(n) {
#' @export
#'
#' @examples
#' # pwrEWAS_deltaDensity(data = outDelta$deltaArray, detectionLimit = 0.01, sd = FALSE)
#' # pwrEWAS_deltaDensity(data = outSD$deltaArray, detectionLimit = 0.01, sd = TRUE)
#' outDelta = pwrEWAS(minTotSampleSize = 10,
#' maxTotSampleSize = 20,
#' SampleSizeSteps = 10,
#' NcntPer = 0.5,
#' targetDelta = c(0.2, 0.5),
#' J = 1000,
#' targetDmCpGs = 10,
#' tissueType = "Adult (PBMC)",
#' detectionLimit = 0.01,
#' DMmethod = "limma",
#' FDRcritVal = 0.05,
#' core = 2,
#' sims = 30)
#' pwrEWAS_deltaDensity(data = outDelta$deltaArray, detectionLimit = 0.01, sd = FALSE)
#' outSD = pwrEWAS(minTotSampleSize = 10,
#' maxTotSampleSize = 20,
#' SampleSizeSteps = 10,
#' NcntPer = 0.5,
#' deltaSD = c(0.02, 0.03),
#' J = 1000,
#' targetDmCpGs = 10,
#' tissueType = "Adult (PBMC)",
#' detectionLimit = 0.01,
#' DMmethod = "limma",
#' FDRcritVal = 0.05,
#' core = 2,
#' sims = 30)
#' pwrEWAS_deltaDensity(data = outSD$deltaArray, detectionLimit = 0.01, sd = TRUE)
pwrEWAS_deltaDensity <- function(data, detectionLimit = 0.01, sd = FALSE){
maxDensY <- 0
maxDensX <- 0
Expand Down
30 changes: 28 additions & 2 deletions man/pwrEWAS_deltaDensity.Rd

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

30 changes: 28 additions & 2 deletions man/pwrEWAS_powerPlot.Rd

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

0 comments on commit e1e0617

Please sign in to comment.