Skip to content

Commit

Permalink
1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hvaret committed May 2, 2017
1 parent b261284 commit 9890059
Show file tree
Hide file tree
Showing 44 changed files with 40 additions and 56 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: SARTools
Type: Package
Title: Statistical Analysis of RNA-Seq Tools
Version: 1.4.1
Date: 2017-03-21
Date: 2017-05-02
Author: Marie-Agnes Dillies and Hugo Varet
Maintainer: Hugo Varet <[email protected]>
Depends: R (>= 3.3.0), DESeq2 (>= 1.12.0), edgeR (>= 3.12.0), xtable
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHANGES IN VERSION 1.4.1
------------------------
o SARTools now accepts count files generated by featureCounts (still one count file per sample)
o added sample names and colors to the diagnostic of the size factors with DESeq2

CHANGES IN VERSION 1.4.0
------------------------
Expand Down
24 changes: 18 additions & 6 deletions R/diagSizeFactorsPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
#' Plots to assess the estimations of the size factors
#'
#' @param dds a \code{DESeqDataSet} object
#' @param group factor vector of the condition from which each sample belongs
#' @param col colors for the plots
#' @param outfile TRUE to export the figure in a png file
#' @param plots vector of plots to generate
#' @return Two files in the figures directory: diagSizeFactorsHist.png containing one histogram per sample and diagSizeFactorsTC.png for a plot of the size factors vs the total number of reads
#' @author Marie-Agnes Dillies and Hugo Varet

diagSizeFactorsPlots <- function(dds, outfile=TRUE, plots=c("diag","sf_libsize")){
diagSizeFactorsPlots <- function(dds, group, col=c("lightblue","orange","MediumVioletRed","SpringGreen"),
outfile=TRUE, plots=c("diag","sf_libsize")){
# histograms
if ("diag" %in% plots){
ncol <- ifelse(ncol(counts(dds))<=4, ceiling(sqrt(ncol(counts(dds)))), 3)
Expand All @@ -27,13 +30,22 @@ diagSizeFactorsPlots <- function(dds, outfile=TRUE, plots=c("diag","sf_libsize")
}
if (outfile) dev.off()
}

# total read counts vs size factors
if ("sf_libsize" %in% plots){
if (outfile) png(filename="figures/diagSizeFactorsTC.png",width=1800,height=1800,res=300)
plot(sizeFactors(dds), colSums(counts(dds)), pch=19, las=1, xlab="Size factors",
ylab="Total number of reads",main="Diagnostic: size factors vs total number of reads")
abline(lm(colSums(counts(dds)) ~ sizeFactors(dds) + 0), lty=2, col="grey")
if (outfile) png(filename="figures/diagSizeFactorsTC.png", width=1800, height=1800, res=300)
sf <- sizeFactors(dds)
libsize <- colSums(counts(dds))/1e6
plot(sf, libsize, pch=16, las=1,
col = col[as.integer(group)],
xlab="Size factors", ylab="Total number of reads (millions)",
main="Diagnostic: size factors vs total number of reads")
abs <- range(sf); meanAbs <- mean(abs); abs <- abs(abs[2]-abs[1])/25;
ord <- range(libsize); meanOrd <- mean(ord); ord <- abs(ord[2]-ord[1])/25;
text(sf - ifelse(sf > meanAbs, abs, -abs),
libsize - ifelse(libsize > meanOrd, ord, -ord),
colnames(dds), col=col[as.integer(group)])
abline(lm(libsize ~ sf + 0), lty=2, col="grey")
if (outfile) dev.off()
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/summarizeResults.DESeq2.r
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ summarizeResults.DESeq2 <- function(out.DESeq2, group, independentFiltering=TRUE
results <- out.DESeq2$results

# diagnostic of the size factors
diagSizeFactorsPlots(dds=dds)
diagSizeFactorsPlots(dds=dds, group=group, col=col)

# boxplots before and after normalisation
countsBoxplots(dds, group=group, col=col)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To install the SARTools package from GitHub, open a R session and:
- install DESeq2, edgeR and genefilter with `source("http://bioconductor.org/biocLite.R")` and `biocLite(c("DESeq2", "edgeR", "genefilter"))` (if not installed yet)
- install devtools with `install.packages("devtools")` (if not installed yet)
- Note: Ubuntu users may have to install some libraries (libxml2-dev, libcurl4-openssl-dev and libssl-dev) to be able to install DESeq2 and devtools
- for Windows users only, install [Rtools](http://cran.r-project.org/bin/windows/Rtools/) or check that it is already installed (needed to build the package)
- for Windows users only, install [Rtools](https://cran.r-project.org/bin/windows/Rtools/) or check that it is already installed (needed to build the package)
- load the devtools R package with `library(devtools)`
- run `install_github("PF2-pasteur-fr/SARTools", build_vignettes=TRUE)`

Expand Down
1 change: 0 additions & 1 deletion man/BCVPlot.Rd

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

1 change: 0 additions & 1 deletion man/MAPlot.Rd

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

1 change: 0 additions & 1 deletion man/MDSPlot.Rd

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

1 change: 0 additions & 1 deletion man/PCAPlot.Rd

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

1 change: 0 additions & 1 deletion man/SARTools-package.Rd

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

7 changes: 3 additions & 4 deletions man/SERE.Rd

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

1 change: 0 additions & 1 deletion man/barplotNull.Rd

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

1 change: 0 additions & 1 deletion man/barplotTotal.Rd

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

1 change: 0 additions & 1 deletion man/checkParameters.DESeq2.Rd

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

1 change: 0 additions & 1 deletion man/checkParameters.edgeR.Rd

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

1 change: 0 additions & 1 deletion man/clusterPlot.Rd

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

1 change: 0 additions & 1 deletion man/countsBoxplots.Rd

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

1 change: 0 additions & 1 deletion man/densityPlot.Rd

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

1 change: 0 additions & 1 deletion man/descriptionPlots.Rd

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

9 changes: 7 additions & 2 deletions man/diagSizeFactorsPlots.Rd

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

1 change: 0 additions & 1 deletion man/dispersionsPlot.Rd

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

1 change: 0 additions & 1 deletion man/exploreCounts.Rd

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

1 change: 0 additions & 1 deletion man/exportResults.DESeq2.Rd

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

1 change: 0 additions & 1 deletion man/exportResults.edgeR.Rd

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

1 change: 0 additions & 1 deletion man/loadCountData.Rd

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

1 change: 0 additions & 1 deletion man/loadTargetFile.Rd

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

1 change: 0 additions & 1 deletion man/majSequences.Rd

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

1 change: 0 additions & 1 deletion man/nDiffTotal.Rd

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

1 change: 0 additions & 1 deletion man/pairwiseScatterPlots.Rd

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

1 change: 0 additions & 1 deletion man/rawpHist.Rd

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

1 change: 0 additions & 1 deletion man/removeNull.Rd

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

1 change: 0 additions & 1 deletion man/run.DESeq2.Rd

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

1 change: 0 additions & 1 deletion man/run.edgeR.Rd

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

1 change: 0 additions & 1 deletion man/summarizeResults.DESeq2.Rd

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

1 change: 0 additions & 1 deletion man/summarizeResults.edgeR.Rd

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

1 change: 0 additions & 1 deletion man/tabIndepFiltering.Rd

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

1 change: 0 additions & 1 deletion man/tabSERE.Rd

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

1 change: 0 additions & 1 deletion man/volcanoPlot.Rd

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

1 change: 0 additions & 1 deletion man/writeReport.DESeq2.Rd

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

1 change: 0 additions & 1 deletion man/writeReport.edgeR.Rd

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

4 changes: 2 additions & 2 deletions template_script_DESeq2.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################################
### R script to compare several conditions with the SARTools and DESeq2 packages
### Hugo Varet
### May 9th, 2016
### designed to be executed with SARTools 1.4.0
### May 2nd, 2017
### designed to be executed with SARTools 1.4.1
################################################################################

################################################################################
Expand Down
4 changes: 2 additions & 2 deletions template_script_DESeq2_CL.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################################
### R script to compare several conditions with the SARTools and DESeq2 packages
### Hugo Varet
### November 28th, 2016
### designed to be executed with SARTools 1.4.0
### May 2nd, 2017
### designed to be executed with SARTools 1.4.1
### run "Rscript template_script_DESeq2_CL.r --help" to get some help
################################################################################

Expand Down
4 changes: 2 additions & 2 deletions template_script_edgeR.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################################
### R script to compare several conditions with the SARTools and edgeR packages
### Hugo Varet
### May 9th, 2016
### designed to be executed with SARTools 1.4.0
### May 2nd, 2017
### designed to be executed with SARTools 1.4.1
################################################################################

################################################################################
Expand Down
4 changes: 2 additions & 2 deletions template_script_edgeR_CL.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################################
### R script to compare several conditions with the SARTools and edgeR packages
### Hugo Varet
### November 28th, 2016
### designed to be executed with SARTools 1.4.0
### May 2nd, 2017
### designed to be executed with SARTools 1.4.1
### run "Rscript template_script_edgeR_CL.r --help" to get some help
################################################################################

Expand Down

0 comments on commit 9890059

Please sign in to comment.