I am currently learning to perform Differential Analysis via DESEQ2 R Package, and I believe I've made progress, able to format the data correctly [maybe] for DDS(). When I run the results function to see the output, the data seems fine, as can be seen below:
log2 fold change (MLE): Group RA vs C Wald test p-value: Group RA vs
C DataFrame with 6 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric> <numeric> Gnai3 95.1978 0.3458366 0.275366 1.255916 0.209146 0.999383
Cdc45 21.9942 -0.0545177 0.346199 -0.157475 0.874870 0.999383
H19 29.0133 -1.4954220 1.516390 -0.986173 0.324048 0.999383
Narf 16.6967 0.2571059 0.370880 0.693232 0.488164 0.999383
Cav2 63.6356 0.5060019 0.354969 1.425480 0.154018 0.999383
Klf6 65.8469 0.2851175 0.265755 1.072858 0.283335 0.999383
However, when I run summary() or any other function, they do not seem to behave correctly, not counting any stats. Same with MAplot not coloring genes that should be marked red:
out of 13184 with nonzero total read count adjusted p-value < 0.1 LFC
> 0 (up) : 0, 0% LFC < 0 (down) : 0, 0% outliers [1] : 150, 1.1% low counts [2] : 0, 0% (mean count < 1)
I'm confused as to why this is occurring and was wondering if anyone had ideas.
EDIT: Added More Code for context
sergey <- (read.csv("cleanmatrix25+.csv", sep = "\t", header = T,
check.names = F, row.names = "Gene_names"))
meta <-(read.csv("metadata25+.csv", sep = "\t", row.names = 1))
dds <- DESeqDataSetFromMatrix(countData = sergey, colData = meta,
design = ~Group)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds$Group <- relevel(dds$Group, ref = "C")
dds <- DESeq(dds)
res <- results(dds)
head(res)
summary(res)
plotMA(res, ylim=c(-2,2))
EDIT2:
I sorted result by p-value, so all of these should be red on the following MAplot due to having a p-value < 0.1