Hi, I am currently performing differential expression analysis using DESeq2.
I want to filter out lowly expressed genes, although I read on another post here that this may not be necessary because IndependentFiltering within results() kind of does that. However, I am comparing different approaches for differential expression analysis and I need to follow the same "criteria" kind of.
What I want to know is, what is the difference between
Code should be placed in three backticks as shown below
DESeqDataSetFromMatrix() # and DESeq()
I have seen some performing filtering before utilising DESeq() function
dds <- DESeqDataSetFromMatrix(countData = countData, colData = metaData, design = ~ condition) keep <- rowSums(counts(dds) >= 10) >= 10 dds <- dds[keep,] dds <- DESeq(dds) normalizedCounts <- counts(dds, normalized=TRUE)
Whilst the developer utilised DESeq() function and then performed filtering
dds <- DESeqDataSetFromMatrix(countData = countData, colData = metaData, design = ~ condition) dds <- DESeq(dds) dds <- estimateSizeFactors(dds) # Apply the filtering criteria idx <- rowSums(counts(dds, normalized=TRUE) >= 10) >= 10 dds <- dds[idx,] dds <- DESeq(dds)
So I just want to understand which approach is the right one and why :)