Skip to content

Commit 66b4b3d

Browse files
authored
Merge pull request #110 from PF2-pasteur-fr/development
Development
2 parents 3e504af + 5c8c9bd commit 66b4b3d

17 files changed

Lines changed: 30 additions & 28 deletions

DESCRIPTION

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
Package: SARTools
22
Type: Package
33
Title: Statistical Analysis of RNA-Seq Tools
4-
Version: 1.8.1
5-
Date: 2022-03-23
6-
Author: Marie-Agnes Dillies and Hugo Varet
4+
Version: 1.8.2
5+
Date: 2025-10-09
6+
Authors@R: c(
7+
person(given = "Hugo", family = "Varet", role = c("aut", "cre"), email = "hugo.varet@pasteur.fr"),
8+
person(given = "Marie-Agnès", family = "Dillies", role = c("aut"), email = "marie-agnes.dillies@pasteur.fr")
9+
)
710
Maintainer: Hugo Varet <hugo.varet@pasteur.fr>
811
Depends: R (>= 3.3.0),
912
DESeq2 (>= 1.32.0),
@@ -19,7 +22,6 @@ Imports: genefilter (>= 1.44.0),
1922
grDevices,
2023
grid,
2124
gridExtra,
22-
knitr,
2325
limma,
2426
rlang,
2527
rmarkdown (>= 1.4),
@@ -28,10 +30,10 @@ Imports: genefilter (>= 1.44.0),
2830
stats,
2931
SummarizedExperiment,
3032
utils
31-
Suggests: optparse
33+
Suggests: knitr, optparse
3234
biocViews: Software
3335
VignetteBuilder: knitr, rmarkdown
3436
Encoding: latin1
3537
Description: Provide R tools and an environment for the statistical analysis of RNA-Seq projects: load and clean data, produce figures, perform statistical analysis/testing with DESeq2 or edgeR, export results and create final report.
3638
License: GPL-2
37-
RoxygenNote: 7.1.2
39+
RoxygenNote: 7.3.2

NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
CHANGES IN VERSION 1.8.2
2+
------------------------
3+
o use of after_stat(density) instead of ..density..
4+
o fixed other few deprecated usages of ggplot2
5+
o back to default DESeq2 shrinkage as "ashr" tends to produce aberrant log2FoldChanges
6+
17
CHANGES IN VERSION 1.8.1
28
------------------------
39
o log2FoldChanges from DESeq2 are now computed using lfcShrink() with type="ashr" as "apeglm"

R/SARTools-package.r

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#' Provide R tools and an environment for the statistical analysis of RNA-Seq projects: load and clean data, produce figures, perform statistical analysis/testing with DESeq2 or edgeR, export results and create final report
22
#' @title Statistical Analysis of RNA-Seq Tools
33
#' @author Marie-Agnes Dillies and Hugo Varet
4-
#' @docType package
54
#' @name SARTools-package
6-
NULL
5+
"_PACKAGE"

R/barplotNull.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ barplotNull <- function(counts, group, col=c("lightblue","orange","MediumVioletR
2525
ggplot_theme +
2626
theme(axis.text.x=element_text(angle=90, hjust=1, vjust=0.5)) +
2727
scale_y_continuous(expand=expansion(mult=c(0.01, 0.05))) +
28-
geom_hline(yintercept=percentage.allNull, linetype="dashed", color="black", size=1))
28+
geom_hline(yintercept=percentage.allNull, linetype="dashed", color="black", linewidth=1))
2929
if (outfile) dev.off()
3030
}

R/countsBoxplots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' @author Marie-Agnes Dillies and Hugo Varet
1212

1313
countsBoxplots <- function(object, group, col = c("lightblue","orange","MediumVioletRed","SpringGreen"), outfile=TRUE, ggplot_theme=theme_gray()){
14-
if (class(object)=="DESeqDataSet"){
14+
if (inherits(object, "DESeqDataSet")){
1515
counts <- counts(object)
1616
counts <- removeNull(counts)
1717
norm.counts <- counts(object, normalized=TRUE)

R/diagSizeFactorsPlots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ diagSizeFactorsPlots <- function(dds, group, col=c("lightblue","orange","MediumV
3131
xlab(expression(log[2]~(counts/geometric~mean))) +
3232
ylab("") +
3333
ggtitle(paste0("Size factor diagnostic - ", samples[j])) +
34-
geom_vline(xintercept=log2(sizeFactors(dds)[j]), linetype="dashed", color="red", size=1) +
34+
geom_vline(xintercept=log2(sizeFactors(dds)[j]), linetype="dashed", color="red", linewidth=1) +
3535
ggplot_theme
3636
}
3737
tmpfun <- function(...) grid.arrange(..., nrow=nrow, ncol=ncol)

R/dispersionsPlot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dispersionsPlot <- function(dds, outfile=TRUE, ggplot_theme=theme_gray()){
4343
disp <- disp[disp>1e-8]
4444
d <- data.frame(disp)
4545
p2 <- ggplot(data=d, aes(x=.data$disp)) +
46-
geom_histogram(bins=80, aes(y=.data$..density..)) +
46+
geom_histogram(bins=80, aes(y=after_stat(density))) +
4747
scale_x_continuous(trans = log10_trans(),
4848
breaks = trans_breaks("log10", function(x) 10^x),
4949
labels = trans_format("log10", math_format())) +

R/exploreCounts.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
exploreCounts <- function(object, group, typeTrans="VST", gene.selection="pairwise",
1515
col=c("lightblue","orange","MediumVioletRed","SpringGreen"),
1616
ggplot_theme=theme_light()){
17-
if (class(object)=="DESeqDataSet"){
17+
if (inherits(object, "DESeqDataSet")){
1818
if (typeTrans == "VST") counts.trans <- assay(varianceStabilizingTransformation(object))
1919
else counts.trans <- assay(rlogTransformation(object))
2020
PCAPlot(counts.trans=counts.trans, group=group, col=col, ggplot_theme=ggplot_theme)
2121
clusterPlot(counts.trans=counts.trans, group=group, ggplot_theme=ggplot_theme)
22-
} else if (class(object)=="DGEList"){
22+
} else if (inherits(object, "DGEList")){
2323
MDSPlot(dge=object, group=group, col=col, gene.selection=gene.selection, ggplot_theme=ggplot_theme)
2424
clusterPlot(counts.trans=cpm(object, prior.count=2, log=TRUE), group=group, ggplot_theme=ggplot_theme)
2525
} else{

R/pairwiseScatterPlots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pairwiseScatterPlots <- function(counts, outfile=TRUE, ggplot_theme=theme_gray()
2020
for (j in 1:ncol){
2121
if (i==j) next
2222
if (i > j){
23-
p[[k]] <- ggplot(data=cbind(d, z=1), aes_string(x=names(d)[i], y=names(d)[j], z="z")) +
23+
p[[k]] <- ggplot(data=cbind(d, z=1), aes(x=.data[[names(d)[i]]], y=.data[[names(d)[j]]], z=.data[["z"]])) +
2424
stat_summary_2d(fun=function(z) log(sum(z)), bins=60, show.legend=FALSE) +
2525
scale_x_continuous(trans = log10_trans(),
2626
breaks = trans_breaks("log10", function(x) 10^x),

R/run.DESeq2.r

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ run.DESeq2 <- function(counts, target, varInt, batch=NULL,
3434
dds <- estimateDispersions(dds, fitType=fitType)
3535

3636
# statistical testing: perform all the comparisons between the levels of varInt
37-
dds <- nbinomWaldTest(dds, ...)
37+
dds <- nbinomWaldTest(dds, betaPrior=TRUE, ...)
3838
results <- list()
3939
for (comp in combn(nlevels(colData(dds)[,varInt]), 2, simplify=FALSE)){
4040
levelRef <- levels(colData(dds)[,varInt])[comp[1]]
@@ -43,10 +43,6 @@ run.DESeq2 <- function(counts, target, varInt, batch=NULL,
4343
contrast=c(varInt, levelTest, levelRef),
4444
pAdjustMethod=pAdjustMethod, cooksCutoff=cooksCutoff,
4545
independentFiltering=independentFiltering, alpha=alpha)
46-
lfcs <- lfcShrink(dds, res=res,
47-
contrast=c(varInt, levelTest, levelRef),
48-
type="ashr", quiet=TRUE)
49-
res$log2FoldChange <- lfcs$log2FoldChange
5046
results[[paste0(levelTest,"_vs_",levelRef)]] <- res
5147
cat(paste("Comparison", levelTest, "vs", levelRef, "done\n"))
5248
}

0 commit comments

Comments
 (0)