Skip to content

Commit

Permalink
clarify parameter options in description
Browse files Browse the repository at this point in the history
  • Loading branch information
bvieth committed Mar 29, 2018
1 parent d308e46 commit df4b965
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 24 deletions.
22 changes: 11 additions & 11 deletions R/Plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ plotSpike <- function(estSpike, annot=TRUE) {
Deviation=sd(normCounts),
Error=sd(normCounts)/sqrt(n())) %>%
dplyr::ungroup()
limits <- ggplot2::aes(ymax = log10(Expectation) + log10(Error),
ymin= log10(Expectation) - log10(Error))
limits <- ggplot2::aes(ymax = Expectation + Error,
ymin= Expectation - Error)
Calibration = cal.dat %>%
dplyr::left_join(estSpike$Input$spikeInfo, by="SpikeID") %>%
dplyr::group_by(SampleID) %>%
Expand All @@ -342,16 +342,16 @@ plotSpike <- function(estSpike, annot=TRUE) {

# calibration curve plot
cal.plot <- ggplot2::ggplot(data = cal.info.dat,
ggplot2::aes(x=log10(SpikeInput),
y=log10(Expectation))) +
ggplot2::geom_pointrange(limits) +
ggplot2::aes(x=SpikeInput,
y=Expectation)) +
# ggplot2::geom_pointrange(limits) +
ggplot2::geom_point() +
ggplot2::geom_smooth(method='lm',formula=y~x) +
ggplot2::geom_smooth(method='lm', se=TRUE) +
ggplot2::annotate("text", label = paste0("italic(R) ^ 2 == ",
round(Calibration$Rsquared, digits = 2),
"%+-%",
round(Calibration$RsquaredSE, digits = 2)),
parse = T, x = 0.2, y = 4, size = 4) +
parse = T, x = 0.1, y = 100, size = 4) +
ggplot2::theme_minimal() +
ggplot2::scale_x_log10(labels=c("0.1","1","10","100","1,000"),breaks=c(0.1,1,10,100,1000)) +
ggplot2::scale_y_log10(labels=c("0.1","1","10","100","1,000"),breaks=c(0.1,1,10,100,1000)) +
Expand All @@ -372,7 +372,7 @@ plotSpike <- function(estSpike, annot=TRUE) {
dplyr::left_join(estSpike$Input$spikeInfo, by="SpikeID")

capture.plot <- ggplot2::ggplot(data = capture.dat,
ggplot2::aes(x=log10(SpikeInput+1),
ggplot2::aes(x=SpikeInput,
y=hat_p_success)) +
ggplot2::geom_point() +
ggplot2::geom_smooth(method="glm", method.args = list(family = "binomial"), se=T) +
Expand Down Expand Up @@ -551,7 +551,7 @@ plotCounts <- function(simCounts, Distance, Scale, DimReduce, verbose = T) {
# plotEvalDE -------------------------------------------------------------
#' @name plotEvalDE
#' @aliases plotEvalDE
#' @title Visualize power assessment
#' @title Visualize statistical power assessment
#' @description This function plots the results of \code{\link{evaluateDE}} for assessing the error rates and sample size requirements.
#' @usage plotEvalDE(evalRes, rate=c('marginal', 'stratified'),
#' quick=TRUE, annot=TRUE)
Expand Down Expand Up @@ -824,7 +824,7 @@ plotEvalDE <- function(evalRes, rate=c('marginal', 'stratified'), quick=TRUE, an

#' @name plotEvalSim
#' @aliases plotEvalSim
#' @title Visualize power assessment
#' @title Visualize simulation setup assessment
#' @description This function plots the results of \code{\link{evaluateSim}} for assessing the setup performance, i.e. normalisation method performance.
#' @usage plotEvalSim(evalRes, annot=TRUE)
#' @param evalRes The output of \code{\link{evaluateSim}}.
Expand Down Expand Up @@ -1093,7 +1093,7 @@ plotEvalSim <- function(evalRes, annot=TRUE) {

#' @name plotTime
#' @aliases plotTime
#' @title Visualize computational time
#' @title Visualize computational time of simulations
#' @description This function plots the computational running time of simulations.
#' @usage plotTime(simRes, Table=TRUE, annot=TRUE)
#' @param simRes The output of \code{\link{simulateDE}}.
Expand Down
15 changes: 10 additions & 5 deletions R/Simulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' The simulation parameters are specified with \code{\link{SimSetup}}.
#' The user needs to specify furthermore
#' the number of samples per group, preprocessing, normalisation and differential testing method.
#' There is also the option to consider spike-ins. \cr
#' There is also the option to consider spike-ins or apply imputation prior to normalisation. \cr
#' The return object contains DE test results from all simulations as well as descriptive statistics.
#' The error matrix calculations will be conducted with \code{\link{evaluateDE}}.\cr
#' @usage simulateDE(n1=c(20,50,100), n2=c(30,60,120),
Expand All @@ -24,20 +24,25 @@
#' @param n1,n2 Integer vectors specifying the number of biological replicates in each group. Default values are n1=c(20,50,100) and n2=c(30,60,120).
#' @param sim.settings This object specifies the simulation setup. This must be the return object from \code{\link{SimSetup}}.
#' @param DEmethod A character vector specifying the DE detection method to be used.
#' Please consult the Details section for available options.
#' Available options include "edgeR-LRT", "edgeR-QL", "edgeR-zingeR", "edgeR-ZINB-WaVE", "limma-voom", "limma-trend", "DESeq2", "DESeq2-zingeR", "DESeq2-ZINB-WaVE", "ROTS", "baySeq", "NOISeq", "EBSeq", "MAST", "scde", "BPSC", "scDD", "DECENT".
#' Please consult the Details section for more information.
#' @param normalisation Normalisation method to use.
#' Please consult the Details section for available options.
#' Available options include 'TMM', 'MR', 'PosCounts', 'UQ', 'scran', 'Linnorm',
#' 'SCnorm', 'Census'.
#' Please consult the Details section for more information.
#' @param Preclust Whether to run a hierarchical clustering prior to normalisation.
#' This is implemented for scran only. Default is \code{FALSE}.
#' For details, see \code{\link[scran]{quickCluster}}.
#' @param Prefilter A character vector specifying the gene expression filtering method
#' to be used prior to normalisation (and possibly imputation).
#' Default is \code{NULL}, i.e. no filtering.
#' Please consult the Details section for available options.
#' Available options include 'FreqFilter', 'CountFilter'.
#' Please consult the Details section for more information.
#' @param Impute A character vector specifying the gene expression imputation method
#' to be used prior to normalisation.
#' Default is \code{NULL}, i.e. no imputation.
#' Please consult the Details section for available options.
#' Available options include 'DrImpute', 'scImpute', 'scone', 'Seurat', 'SAVER'.
#' Please consult the Details section for more information.
#' @param spikeIns Logical value to indicate whether to simulate spike-ins.
#' Default is \code{FALSE}.
#' @param NCores integer positive number of cores for parallel processing.
Expand Down
2 changes: 1 addition & 1 deletion man/plotEvalDE.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/plotEvalSim.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/plotTime.Rd

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

15 changes: 10 additions & 5 deletions man/simulateDE.Rd

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

0 comments on commit df4b965

Please sign in to comment.