What will the the classic approach is to make pairwise comparisons between the groups in edgeR?
1
0
Entering edit mode
2.5 years ago
Info.shi ▴ 30

The edge manual I understand

The classic edgeR approach is to make pairwise comparisons between the groups. For example,

et <- exactTest(y, pair=c("A","B")) will find genes differentially expressed (DE) in B vs A.

Similarly

et <- exactTest(y, pair=c("A","C")) for C vs A,

or

et <- exactTest(y, pair=c("C","B")) for B vs C.

I have a query about how to define group and their calculations.

  1. et = exactTest(exp_study, pair=c("Treatment", "control")) will do calculation =Control/Treament

  2. et = exactTest(exp_study, pair=c( "control" ,"Treatment")) will do calculation =Treament/Control

As I understand from the manual I need to define a group as 2. I am a little unsure about it

Please guide me regarding my confusion about defining group and their calculations.

Thank you!

edgeR • 2.8k views
ADD COMMENT
1
Entering edit mode
2.5 years ago
Gordon Smyth ★ 7.0k

You seem to be specifying the pair argument without any problem. All the options you list will work just fine. The manual does not say that you need to make one comparison rather than the other.

I am not following what your confusion is. The comparisons work exactly as you say. When you specify pair the first value is the base group in the comparison and the second is group that is compared to the first group. That seems pretty straightforward, is it not?

ADD COMMENT
0
Entering edit mode

Thank you so much. I am concern about how to define the contrast between control and treatment because its calculation will reverse like pair=c("A","C")) will do C vs A. So I have control and treatment samples so what pair do I need to choose for my further analysis.

Thank you again.

ADD REPLY
1
Entering edit mode

Comparing treatment vs control or control vs treatment are exactly the same thing, the log-fold-changes just change sign.

Personally I always compare treatment vs control (i.e., pair = c("control","treatment")) so that positive logFC means higher in the treatment.

ADD REPLY
0
Entering edit mode

Thank you so much I do understand just a matter of sign but in downstream analysis I need to define on the bases of sign as up regulatory and down regulatory genes due to so I am concerned about sign .

Thank you so much for explanation.

ADD REPLY
0
Entering edit mode

I have query regarding your comment as you mentioned you choose treatment vs control as in manual of edgeR if we specify treatment vs control it will do reverse like control vs treatment is that right ? Thank you

ADD REPLY
0
Entering edit mode

Everything is identical, only the sign of the fold change changes. A fold change of 2 in treatment vs control is a fold cahnge of -2 in control vs treatment. Pvalues, AveExpr etc is all the same.

ADD REPLY
0
Entering edit mode

Thank you I understand but it means a lot when we say about up-regulating and down-regulating genes. And how edgeR do calculation if we define Comparison pairwise group because in manual I found if we define treatment vs control it gives DEGs control vs treatment as I mentioned above please correct me if I am wrong. Thank you.

ADD REPLY
1
Entering edit mode

No, you're wrong. edgeR does not reverse the calculation as you claim. edgeR does the calculation exactly the way you specify. The comparisons are specified in an unambiguous and straightforward way. It is fully described in the documentation, just type ?exactTest.

All downstream analyses work fine regardless of which way around the comparison is done. If you don't understand how to do downstream analyses or how to interpret DE genes, then you could post a separate question about that. If you have a question about a particular part of the documentation, then please specify exactly the text you are refering to.

ADD REPLY
0
Entering edit mode

Thank you so much for explanation as I saw manual it was specify. “et <- exactTest(y, pair=c("A","B")) will find genes differentially expressed (DE) in B vs A”. I am confused . If it’s straightforward than it should A vs B as we define in pairs.

Thank you so much.

ADD REPLY
1
Entering edit mode

The edgeR syntax is clearly documented and has been the same for more than a decade. The edgeR syntax follows the usual convention in R whereby the first level of a factor is the reference level and the second level is compared back to the first level.

I am sorry that you don't like the syntax but we have no plans to change it.

ADD REPLY
0
Entering edit mode

Thank you so much for your explanation sorry for my confusion.

So if we define pairs like below

et = exactTest(exp_study, pair=c("Treatment", "control"))

The calculation will be like Treatment vs control like the same. So that positive logFC means higher in the treatment right?

I really appreciate your quick response it really helps me a lot.

Thank you

ADD REPLY
1
Entering edit mode

I think you have misinterpretted what we mean by "B vs A" in the documentation. When we say "B vs A" we mean that the logFCs represent B - A where A and B are log-scale expression estimates. So B is being compared to A. The logFCs measure expression in B relative to A. So positive logFC means higher expression in B.

If you specify pair=c("Treatment", "control") then it means exactly what you said in your original question, not what you have just said in your comment.

ADD REPLY
0
Entering edit mode

Thank you so much for explaining so nicely. I get it now my original interpretation about control and treatment was correct.

et = exactTest(exp_study, pair=c( "control" ,"Treatment")) will Treatment vs control So positive logFC means higher expression in Treatment as compare to control.

I am very thankful to you I am extremely sorry for my misinterpretation.

Thank you so much you really help me a lot.

ADD REPLY

Login before adding your answer.

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