Hey all,
i wanted to try DESeq2 in a pairwise comparison setting without replicates.
unfortunately using the code below on a pasilla-test-case i can only find differentially expressed genes using DESeq and not DESeq2.
(DESeq2 says "same number of samples and coefficients to fit, estimating dispersion by treating samples as replicates" so should be getting the task)
i know it must be me, but where am I going wrong?
thanks a lot!!
#-------------------------- deseq2
DataFrame with 6 rows and 5 columns
baseMean log2FoldChange lfcSE pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric>
FBgn0000008 60.7056967 -0.09993564 0.36063169 0.7816935 0.9973207
FBgn0000014 0.8344279 -0.03920709 0.08405437 0.6408940 0.9973207
FBgn0000015 0.4172140 -0.02034815 0.06095374 0.7385084 0.9973207
#-------------------------- deseq
id baseMean baseMeanA baseMeanB foldChange log2FoldChange
9696 FBgn0039155 513.8001 31.70826 995.89187 31.40796187 4.973058
2605 FBgn0026562 20645.8226 6151.40275 35140.24243 5.71255758 2.514137
29 FBgn0000071 241.5499 444.75009 38.34963 0.08622736 -3.535710
pval padj
9696 9.669445e-23 1.062188e-18
2605 1.477349e-12 8.114339e-09
29 3.097019e-10 1.134025e-06
i wanted to try DESeq2 in a pairwise comparison setting without replicates.
unfortunately using the code below on a pasilla-test-case i can only find differentially expressed genes using DESeq and not DESeq2.
(DESeq2 says "same number of samples and coefficients to fit, estimating dispersion by treating samples as replicates" so should be getting the task)
i know it must be me, but where am I going wrong?
thanks a lot!!
#-------------------------- deseq2
Code:
library(DESeq2) library(pasilla) data("pasillaGenes") countData <- counts(pasillaGenes) countData<-countData[,c("treated1fb","untreated1fb")] colData <- pData(pasillaGenes)[c("treated1fb","untreated1fb"),c("condition","type")] dds <- DESeqDataSetFromMatrix( countData = countData, colData = colData, design = ~ condition) colData(dds)$condition <- factor(colData(dds)$condition,levels=c("treated","untreated")) dds dds <- DESeq(dds) res <- results(dds) res <- res[order(res$padj),] head(res)
baseMean log2FoldChange lfcSE pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric>
FBgn0000008 60.7056967 -0.09993564 0.36063169 0.7816935 0.9973207
FBgn0000014 0.8344279 -0.03920709 0.08405437 0.6408940 0.9973207
FBgn0000015 0.4172140 -0.02034815 0.06095374 0.7385084 0.9973207
#-------------------------- deseq
Code:
library(DESeq) library(pasilla) data("pasillaGenes") countData <- counts(pasillaGenes) countData<-countData[,c("treated1fb","untreated1fb")] condition <- factor( c( "treated", "untreated") ) cds <- newCountDataSet( countData, condition ) cds <- estimateSizeFactors( cds ) cds <- estimateDispersions( cds, method="blind", sharingMode="fit-only" ) res <- nbinomTest( cds, "treated", "untreated") res <- res[order(res$padj),] head(res)
9696 FBgn0039155 513.8001 31.70826 995.89187 31.40796187 4.973058
2605 FBgn0026562 20645.8226 6151.40275 35140.24243 5.71255758 2.514137
29 FBgn0000071 241.5499 444.75009 38.34963 0.08622736 -3.535710
pval padj
9696 9.669445e-23 1.062188e-18
2605 1.477349e-12 8.114339e-09
29 3.097019e-10 1.134025e-06
Comment