DESeq: LFC and results function
0
0
Entering edit mode
2.7 years ago
axe880 • 0

Hi everyone,

I am currently processing data regarding DEGs expression. I am referencing a demo script provided to me. However, in their script they use the "source" command to utilise a function unavailable to me.

This function performs both results and lfcShrink together at the same time.

I am just wondering how I can replicate this myself, would I perform lfcShrink first then results, or vice versa?

Below is the script I am referencing, with results_extract being the funciton unavailable to me:

#40min vs Control
slrcr_slc <- results_extract(dds, "group_LeafSusceptibleRecovery_vs_LeafSusceptibleControl", 
                            alpha = padj.cutoff, shrink = TRUE, type = "apeglm")

slrcr_slc_df <- na.omit(data.frame(slrcr_slc)) %>% 
  mutate(pass = ifelse(padj < padj.cutoff & abs(log2FoldChange) >= lfc.cutoff, 
                        ifelse(log2FoldChange >= lfc.cutoff, 'Upregulated', 'Downregulated'), 'Stable'))

Meanwhile, this is my attempt at adapting it:

# 40-minutes vs Control
sl40_slc <- results(dds, name = "group_LeafSusceptible40min_vs_LeafSusceptibleControl", 
                            alpha = 0.05, lfcThreshold = 1, contrast = c("group", "LeafSusceptible40min", "LeafSusceptibleControl"))

shrink_sl40_slc <- lfcShrink(dds, coef = 2, type = "apeglm")


#Try shrinkage step first? 

sl40_slc_df <- na.omit(data.frame(sl40_slc)) %>% 
  mutate(pass = ifelse(padj < padj.cutoff & abs(log2FoldChange) >= lfc.cutoff, 
                        ifelse(log2FoldChange >= lfc.cutoff, 'Upregulated', 'Downregulated'), 'Stable'))

This wont give the same results as the demo script I think.

Any help would be appreciated - thank you!

DESeq2 • 503 views
ADD COMMENT

Login before adding your answer.

Traffic: 2060 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6