Commit f8644a8d authored by Hugo  VARET's avatar Hugo VARET

round

parent 69b7b59e
......@@ -2,7 +2,7 @@ Package: ChIPuanaR
Type: Package
Title: Differential analysis of ChIP-Seq data
Version: 0.99.0
Date: 2020-01-13
Date: 2020-04-06
Author: Marie-Agnes Dillies, Hugo Varet and Maëlle Daunesse
Maintainer: Maëlle Daunesse <maelle.daunesse@pasteur.fr>
Depends: R (>= 3.4.0), DESeq2, limma, kableExtra, knitr, ggplot2
......
......@@ -44,7 +44,11 @@ run.DESeq2 <- function(counts, conditions, batch=NULL, pAdjustMethod="BH", spike
colnames(counts.norm) <- paste0("norm.",colnames(counts))
res <- results(dds, contrast=c("conditions", levelTest, levelRef),
pAdjustMethod=pAdjustMethod, cooksCutoff=TRUE, independentFiltering=FALSE)
res <- res[, c("baseMean", "log2FoldChange", "pvalue", "padj", "lfcSE", "stat")]
res <- res[, c("baseMean", "log2FoldChange", "lfcSE", "stat", "pvalue", "padj")]
res$baseMean <- round(res$baseMean, 2)
res$log2FoldChange <- round(res$log2FoldChange, 2)
res$lfcSE <- round(res$lfcSE, 2)
res$stat <- round(res$stat, 2)
resAnDif <- data.frame(counts, counts.norm, res)
results[[paste0(levelTest,"_vs_",levelRef)]] <- resAnDif
cat(paste("Comparison", levelTest, "vs", levelRef, "done\n"))
......
......@@ -51,9 +51,10 @@ run.Limma <- function(counts, conditions, normalize.method="quantile", spikes=NU
fit2 <- contrasts.fit(fit=fit, contrasts=cont.matrix)
efit <- eBayes(fit=fit2)
colnames(v$E) <- paste0("norm.", colnames(counts))
resAnDif <- data.frame(counts,v$E,
baseMean=efit$Amean,
log2FoldChange=as.numeric(efit$coefficients),
resAnDif <- data.frame(counts,
round(v$E, 2),
baseMean=round(efit$Amean, 2),
log2FoldChange=round(as.numeric(efit$coefficients), 2),
pvalue=as.numeric(efit$p.val),
padj=p.adjust(efit$p.value, method=pAdjustMethod))
results[[paste0(levelTest,"_vs_",levelRef)]] <- resAnDif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment