Hi,
I'm currently struggling with some DEseq2 analyses of RNA-seq data. I'm told this should be pretty 'easy' and just follow the vignette, but I'm finding some difficulties.
My situation is that everything seems to be working. I'm coming from this raw counts for a gene:
A_1: 900
A_2: 134
B_1: 14825
B_2: 8312
These are the normalized counts:
A_1: 784.8627
A_2: 203.5322
B_1: 19424.8883
B_2: 4966.5403
The sample table includes condition (A,A,B,B) and replicate (1,1,2,2). The design has been:
design = ~ condition + replicate
And the results have been obtained with:
results(dds,contrast=c("condition","A","B"))
How is it possible that for the gene with the counts above, I'm getting a positive log2FoldChange? When it should be more highly expressed in condition B according to the counts?
log2 fold change (MLE): condition A vs B
Wald test p-value: condition A vs B
baseMean: 6344.96
log2FoldChange: 1.95771
lfcSE: 0.373301
stat: 5.2443
pvalue: 1.56873e-07
padj: 2.76881e-05
I must be missing something. Can anyone point me to the right direction or to some documentation apart from the vignette? I'm aware the replicates are showing variability (they're far in the PCA). Could that be causing this?
Thank you very much for the help
You are right that the coding for replicates was wrong. Cannot believe it. Feels like I was blind. I guess it happens. Thanks for your time!
This fully resolves the issue?
Yes, along with other errors in the sample table. Just needed to pay more attention to it. Thanks for your time and apologize for the inconvenience
No inconvenience at all, nanoide.