Entering edit mode
Hi All,
I am wondering if this is the correct methodology to create Dseq results, particularly the code in regards to the utilization of apeglm Did I shrink l2fc again by using apeglm or instead just ignore that portion of the code, and instead just keep the Dseq(dds) portion?
Counts <- read.csv("1_raw_data.csv", header = TRUE, row.names = 1, sep = ",")
Counts
condition <- factor (c("S","S","S","C","C","C"))
coldata <- data.frame (row.names = colnames(Counts), condition)
coldata
counts2 <- round(Counts)
counts2
write.csv(counts2, file = "TEST.csv")
dds <- DESeqDataSetFromMatrix(countData = counts2, colData = coldata, design = ~condition)
dds <- DESeq(dds)
vsdata <- vst(dds, blind = FALSE)
res <- results(dds, name="condition_S_vs_C")
res <- results(dds, contrast = c ("condition", "S", "C"))
res
resLFC <- lfcShrink(dds, coef="condition_S_vs_C", type="apeglm")
head(res)
deg <- subset(resLFC, padj<0.05)
head(deg)
write.csv( deg,file = "TEST_dseq_results.csv")
I read the paper previously as well as: https://introtogenomics.readthedocs.io/en/latest/2021.11.11.DeseqTutorial.html
To clarify, is the notion of utilizing the conjunction of differential expression analysis (dds <- DESeqDataSetFromMatrix) and apeglm correct? or is one method prefered over the other in publication wise?