From b5955eece4ca891b6cdbe42ab8a0a885f58fce18 Mon Sep 17 00:00:00 2001 From: Scott Daniel Date: Thu, 31 May 2018 10:39:33 -0700 Subject: [PATCH 1/2] accepting mean as valid option for fitType since deseq DOES allow it --- R/checkParameters.DESeq2.r | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/checkParameters.DESeq2.r b/R/checkParameters.DESeq2.r index 4a1021b..8f1527c 100755 --- a/R/checkParameters.DESeq2.r +++ b/R/checkParameters.DESeq2.r @@ -60,8 +60,8 @@ checkParameters.DESeq2 <- function(projectName,author,targetFile,rawDir, message("batch must be NULL or a character vector of length 1") problem <- TRUE } - if (!is.character(fitType) | length(fitType)!=1 || !I(fitType %in% c("parametric","local"))){ - message("fitType must be equal to 'parametric' or 'local'") + if (!is.character(fitType) | length(fitType)!=1 || !I(fitType %in% c("parametric","local","mean"))){ + message("fitType must be equal to 'parametric', 'local', or 'mean'") problem <- TRUE } if (!is.logical(cooksCutoff) | length(cooksCutoff)!=1){ @@ -100,7 +100,7 @@ checkParameters.DESeq2 <- function(projectName,author,targetFile,rawDir, message("colors must be a vector of colors") problem <- TRUE } - + if (!problem){ print("All the parameters are correct") } From 8d1425c4283c5c3ba2f4139f2b03bce682ea7c4d Mon Sep 17 00:00:00 2001 From: hvaret Date: Fri, 1 Jun 2018 07:27:20 +0200 Subject: [PATCH 2/2] fitTypeMean --- DESCRIPTION | 4 ++-- NEWS | 4 ++++ R/checkParameters.DESeq2.r | 2 +- inst/report_DESeq2.rmd | 2 +- template_script_DESeq2.r | 2 +- template_script_DESeq2_CL.r | 2 +- template_script_edgeR.r | 2 +- template_script_edgeR_CL.r | 2 +- vignettes/SARTools.rmd | 2 +- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ec0660c..fd0441e 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: SARTools Type: Package Title: Statistical Analysis of RNA-Seq Tools -Version: 1.6.2 -Date: 2018-05-23 +Version: 1.6.3 +Date: 2018-06-01 Author: Marie-Agnes Dillies and Hugo Varet Maintainer: Hugo Varet Depends: R (>= 3.3.0), DESeq2 (>= 1.12.0), edgeR (>= 3.12.0), xtable diff --git a/NEWS b/NEWS index 9757488..1f899c8 100755 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +CHANGES IN VERSION 1.6.3 +------------------------ + o now allows fitType="mean" in DESeq2 + CHANGES IN VERSION 1.6.2 ------------------------ o fixed a bug in template_script_edgeR_CL.r to use forceCairoGraph option diff --git a/R/checkParameters.DESeq2.r b/R/checkParameters.DESeq2.r index 8f1527c..304209a 100755 --- a/R/checkParameters.DESeq2.r +++ b/R/checkParameters.DESeq2.r @@ -100,7 +100,7 @@ checkParameters.DESeq2 <- function(projectName,author,targetFile,rawDir, message("colors must be a vector of colors") problem <- TRUE } - + if (!problem){ print("All the parameters are correct") } diff --git a/inst/report_DESeq2.rmd b/inst/report_DESeq2.rmd index 858a3b0..177caea 100755 --- a/inst/report_DESeq2.rmd +++ b/inst/report_DESeq2.rmd @@ -167,7 +167,7 @@ Model outliers are features for which at least one sample seems unrelated to the ## Dispersions estimation -The DESeq2 model assumes that the count data follow a negative binomial distribution which is a robust alternative to the Poisson law when data are over-dispersed (the variance is higher than the mean). The first step of the statistical procedure is to estimate the dispersion of the data. Its purpose is to determine the shape of the mean-variance relationship. The default is to apply a GLM (Generalized Linear Model) based method (fitType="parametric"), which can handle complex designs but may not converge in some cases. The alternative is to use fitType="local" as described in the original paper [@Anders2010]. The parameter used for this project is fitType="`r fitType`". Then, DESeq2 imposes a Cox Reid-adjusted profile likelihood maximization [@cox1897 and McCarthy, 2012] and uses the maximum _a posteriori_ (MAP) of the dispersion [Wu, 2013]. +The DESeq2 model assumes that the count data follow a negative binomial distribution which is a robust alternative to the Poisson law when data are over-dispersed (the variance is higher than the mean). The first step of the statistical procedure is to estimate the dispersion of the data. Its purpose is to determine the shape of the mean-variance relationship. The default is to apply a GLM (Generalized Linear Model) based method (fitType="parametric"), which can handle complex designs but may not converge in some cases. The alternative is to use fitType="local" as described in the original paper [@Anders2010] or fitType="mean". The parameter used for this project is fitType="`r fitType`". Then, DESeq2 imposes a Cox Reid-adjusted profile likelihood maximization [@cox1897 and McCarthy, 2012] and uses the maximum _a posteriori_ (MAP) of the dispersion [Wu, 2013].
diff --git a/template_script_DESeq2.r b/template_script_DESeq2.r index 8d119cf..1bcd33d 100755 --- a/template_script_DESeq2.r +++ b/template_script_DESeq2.r @@ -2,7 +2,7 @@ ### R script to compare several conditions with the SARTools and DESeq2 packages ### Hugo Varet ### March 20th, 2018 -### designed to be executed with SARTools 1.6.2 +### designed to be executed with SARTools 1.6.3 ################################################################################ ################################################################################ diff --git a/template_script_DESeq2_CL.r b/template_script_DESeq2_CL.r index eaec070..0c1c9e1 100755 --- a/template_script_DESeq2_CL.r +++ b/template_script_DESeq2_CL.r @@ -2,7 +2,7 @@ ### R script to compare several conditions with the SARTools and DESeq2 packages ### Hugo Varet ### March 20th, 2018 -### designed to be executed with SARTools 1.6.2 +### designed to be executed with SARTools 1.6.3 ### run "Rscript template_script_DESeq2_CL.r --help" to get some help ################################################################################ diff --git a/template_script_edgeR.r b/template_script_edgeR.r index e9ad4ae..cf10932 100755 --- a/template_script_edgeR.r +++ b/template_script_edgeR.r @@ -2,7 +2,7 @@ ### R script to compare several conditions with the SARTools and edgeR packages ### Hugo Varet ### March 20th, 2018 -### designed to be executed with SARTools 1.6.2 +### designed to be executed with SARTools 1.6.3 ################################################################################ ################################################################################ diff --git a/template_script_edgeR_CL.r b/template_script_edgeR_CL.r index 38ad1ac..0c83b30 100755 --- a/template_script_edgeR_CL.r +++ b/template_script_edgeR_CL.r @@ -2,7 +2,7 @@ ### R script to compare several conditions with the SARTools and edgeR packages ### Hugo Varet ### May 16th, 2018 -### designed to be executed with SARTools 1.6.2 +### designed to be executed with SARTools 1.6.3 ### run "Rscript template_script_edgeR_CL.r --help" to get some help ################################################################################ diff --git a/vignettes/SARTools.rmd b/vignettes/SARTools.rmd index 5c33e21..e344d6b 100755 --- a/vignettes/SARTools.rmd +++ b/vignettes/SARTools.rmd @@ -72,7 +72,7 @@ All the parameters that can be modified by the user are at the beginning of the - `varInt`: variable of interest, i.e. biological condition, in the target file (`"group"` by default); - `condRef`: reference biological condition used to compute fold-changes (no default, must be one of the levels of `varInt`); - `batch`: adjustment variable to use as a batch effect, must be a column of the target file (`"day"` for example, or `NULL` if no batch effect needs to be taken into account); - - `fitType`: (if use of DESeq2) type of model for the mean-dispersion relationship (`"parametric"` by default, or `"local"`); + - `fitType`: (if use of DESeq2) type of model for the mean-dispersion relationship (`"parametric"` by default, or `"local"` or `"mean"`); - `cooksCutoff`: (if use of DESeq2) `TRUE` (default) of `FALSE` to execute or not the detection of the outliers [7]; - `independentFiltering`: (if use of DESeq2) `TRUE` (default) of `FALSE` to execute or not the independent filtering [8]; - `alpha`: significance threshold applied to the adjusted p-values to select the differentially expressed features (default is `0.05`);