EMBL-Hentze-group / DEWSeq

R/Bioconductor package for e/iCLIP data analysis
5 stars 1 forks source link

contrast argument in resultsDEWSeq #12

Closed fulaibaowang closed 5 months ago

fulaibaowang commented 7 months ago

Hi,

I see the order of group in contrast argument changes result of resultsDEWSeq, basically

resultWindows <- resultsDEWSeq(ddw,
                              contrast = c("type", "group1", "group2"),
                              tidy = TRUE) %>% as_tibble
resultWindows <- resultsDEWSeq(ddw,
                              contrast = c("type", "group2", "group1"),
                              tidy = TRUE) %>% as_tibble

are different.

Can you elaborate a bit more about this? Thank you!

sudeepsahadevan commented 7 months ago

Hi resultsDEWSeq is actually a wrapper around DESeq2 results function which you can read in detail here.

resultWindows <- resultsDEWSeq(ddw,
                              contrast = c("type", "group1", "group2"),
                              tidy = TRUE) %>% as_tibble

Here group1 is treated as the numerator (case) and group2 as control, and vice versa in the second case. So as you can imagine, depending on what group is considered as case and what is considered as control, result will change