I just came across a very serious problem with very known package. Either I am mistake or there is something going on with this package.
You can test it on any sample you have . I tested it on a count value of two of my transcriptome data
First
condition <- factor(c(rep("Normal", 10),rep("Tumor", 11)))
dds <- DESeqDataSetFromMatrix(dfm, DataFrame(condition), ~ condition)
keep <- rowSums(counts(dds)) >= 1
dds <- dds[keep,]
dds <- DESeq(dds)
Second way to do
condition <- factor(c(rep("Tumor", 11),rep("Normal", 10)))
dds <- DESeqDataSetFromMatrix(dfm, DataFrame(condition), ~ condition)
keep <- rowSums(counts(dds)) >= 1
dds <- dds[keep,]
dds <- DESeq(dds)
Both will give you the same LogFold change, This is not correct , am I mistaken in any way?
ensembl_gene_id baseMean log2FoldChange lfcSE
1 ENSG00000000003 3796.1249 -0.53555500 0.08317700
2 ENSG00000000005 488.0348 -4.05982089 0.24879251
3 ENSG00000000419 1955.4115 0.38420490 0.05960030
4 ENSG00000000457 1714.8072 0.46568839 0.06396953
5 ENSG00000000460 561.7435 1.34575314 0.07998034
6 ENSG00000000938 737.0033 -0.07637925 0.13679817
stat pvalue padj
1 -6.4387389 1.204703e-10 4.953873e-10
2 -16.3180992 7.338521e-60 4.064709e-58
3 6.4463581 1.145698e-10 4.721174e-10
4 7.2798468 3.341996e-13 1.659606e-12
5 16.8260485 1.572530e-63 1.044359e-61
6 -0.5583353 5.766154e-01 6.495767e-01
Is there a factor of -1?
@russhh can you explian what you mean with -1?
Surely you see that the simplest explanation is that you have something wrong, but you need to show us the first few lines of your input and output for us to see what it is.
@swbarnes2 look at above please
I don't think you've made the colData part right, so I think both of your scripts are really running with design ~ 1
@swbarnes2 can you please tell me how to make that then?
In general, you need to figure that people will spend about 1/10th the time answering your question as you demonstrate you have put into trying to solve it. How much time do you think your responses here make it look like you've spent?
@swbarnes2 can you please be specific? I cannot understand your point? do you mean that I don't spend enough time on solving the issue myself? if so and if I knew how to solve it why then should I bother and post it here ?
To understand this, try reading https://stackoverflow.com/a/5963610/1394178 or https://reprex.tidyverse.org/
This is not an answer - should be a comment as it is asking for clarification and not answering the question.