Question concerning the testing of interactions using the group design and the use of lfcShrink() (DESeq2)
1
0
Entering edit mode
Jonas B. ▴ 40
@jonas-b-14652
Last seen 5.1 years ago
Belgium, Antwerp, University of Antwerp

Hi all,

 

My question concerns testing interactions using the group design and the use of lfcShrink():

 

As a short intro, my experimental design:

- three treatments: control, mild, severe
- three developmental zones: mer, elo, mat

 

Before lfcShrink() was introduced, the resultsNames() function would produce all groups formed and you could simply use the contrast function to compare groups:

> resultsNames(dds_withint_forgroupanalysis)
 [1] "Intercept"       "groupcontrolelo" "groupcontrolmat" "groupcontrolmer" "groupmildelo"    "groupmildmat"    "groupmildmer"   
 [8] "groupsevereelo"  "groupseveremat"  "groupseveremer" 

results(dds_withint_forgroupanalysis2, contrast=c("group", "mildelo", "controlelo"))

Now, the same analysis does not yield these groups anymore but comparisons with "_vs_" (DESeq2 v1.18):

> resultsNames(dds_withint_forgroupanalysis2)
[1] "Intercept"                      "group_controlmat_vs_controlelo" "group_controlmer_vs_controlelo" "group_mildelo_vs_controlelo"   
[5] "group_mildmat_vs_controlelo"    "group_mildmer_vs_controlelo"    "group_severeelo_vs_controlelo"  "group_severemat_vs_controlelo" 
[9] "group_severemer_vs_controlelo"

 

(Q1) Can you still use the results produced by the contrast functionality with the group names, e.g. controlmat, mildmer, ... (even though the names produced by the resultsNames()-function are different, e.g. group_mildmer_vs_controlelo)? Because it still produces LFCs, pvalues, ... For example:

results(dds_withint_forgroupanalysis2, contrast=c("group", "mildelo", "controlelo"))

 

Concerning lfcShrink(): In another post (https://support.bioconductor.org/p/98833/#98837), it is advised to work with coef instead of contrast. Here I understand that you can use each coef present in the resultsNames() output. Yet there are only 9 contrasts shown (many more are possible) and some of the contrasts which I want to use are not represented, for example: group_severemat_vs_controlmat.

(Q2) How can I overcome this and use the coef for all possible contrasts? Now I have to do contrasts where I compare all the groups (related to my first question), yet using contrasts and coefs generate different LFCs (as explained in: https://support.bioconductor.org/p/98833/#98837)

For example:

lfcShrink(dds_withint_forgroupanalysis2, coef = 7)
lfcShrink(dds_withint_forgroupanalysis2, contrast=c("group", "severeelo", "controlelo"))

 

Thank you in advance!

 

Kind regards,

Jonas

DESeq2 version: 1.18.1, R-version 3.4.4.

deseq2 • 878 views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 day ago
United States

Q1: Yes, results() takes care of this for you. Q2: ‘coef’ is only slightly preferred in that our latest greatest estimator is built around it, but you can continue to use ‘contrast’ with type=“normal” or “ashr”.

ADD COMMENT
1
Entering edit mode

 By the way, if you have many groups and you know you want to shrink the LFC’s between many pairs of them, you should probably instead use betaPrior=TRUE and then results().  This will be a lot faster, because you only estimate the shrunken coefs once.  Also, I will continue to support this usage in the future, to keep it backwards compatible.

ADD REPLY
0
Entering edit mode

Dear Micheal,

Thanks a lot! Using betaPrior works just fine for me!

Kind regards and happy Easter,
Jonas

ADD REPLY

Login before adding your answer.

Traffic: 626 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