Assigning condition and coldata
condition <- factor(c("C","C","C","P","P","P"))
coldata <-data.frame(row.names = colnames(counts_filtered)[-1], condition)
#Deseq
dds<-DESeqDataSetFromMatrix(countData = counts_filtered[, -1],, colData = coldata, design = ~condition)
dds <- DESeq(dds)
#extracting deseq2 results
res <- results(dds, contrast = c ("condition", "C","P"))
res
above is the code I am using to run deseq2. When I look at the results they are different, upregulated genes according to the raw read counts showing me a negative value and the genes which pretty much looks like downregulated in the read counts showing me a positive value. This is between three cases and 3 controls. For example, the read counts of one gene across cases and controls:
C01 C02 C03 P01 P02 P03
14 47 19 129874 25114 31346
and desq results for this gene is as follows:
baseMean log2FoldChange
23071.1919508785 -10.843407253606
Can anybody help with this?