Treatment AND Sex in EdgeR
2
0
Entering edit mode
@science555111
Last seen 3.9 years ago

Hi all,

I have an RNA-Seq experiment with about twenty-patients. The patients are either in the treatment or control group and then also denoted by gender. I am looking to analyze the following contrasts:

  • ALL Treatment vs ALL Control (1)
  • Male Treatment vs Male Control Female (2)
  • Female Treatment vs Female Control (3)
  • Male Treatment vs Female Control Female (4)
  • Female Treatment vs Male Control (5)
Individuals       Group      Gender
patient_one       T              M
patient_two       C             M
patient_three     C             M
patient_four      C             M
...
patient_twenty   C            M

For contrasts 2-5, I'm having trouble deciding on how to incorporate gender into the model matrix and creating contrasts:

    model = model.matrix(~group + gender)
    rna_seq_expr = estimateDisp(rna_seq_expr, model,)
    contrast =  makeContrasts(TM - CS, levels = model)
    rna_seq_exp =  glmQLFit(rna_seq_expr, model)
    rna_seq_exp = glmQLFTest(rna_seq_expr, contrast = contrast)

Thanks!

edgeR • 1.7k views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

If you want to allow all gender by group combinations to be different, then you should combine treatment and gender into one factor with four groups: Male.Treatment, Male.Control, Female.Treatment, Female.Control. Then it'll be easy to form contrasts.

ADD COMMENT
1
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States

There may be valid reasons to do so, but I think it might be difficult to interpret the results of your 4th and 5th contrasts, ie. "treated patients of one sex" vs "control patients from the other sex".

You might want to consider exploring the interaction of effect between treatment and sex, which will tell you how the treatment effect differs based on sex.

Let's suppose you take Gordon's suggestion of combining "Group" and "Gender" into a new covariate, ie:

sample.info$group2 <- paste(sample.info$Group, sample.info$Gender, sep = ".")

Now you can set up the contrast matrix for your contrasts, plus the interaction I'm suggesting, like so:

model <- model.matrix(~ 0 + group2, data = sample.info)
cm <- makeContrasts(
  treatment = (T.M + T.F) / 2 - (C.M + C.F) / 2,  # 1
  male.trt = T.M - C.M,                           # 2
  female.trt = T.F - C.F,                         # 3
  male.crossed = T.M - C.F                        # 4,
  female.crossed = T.F - C.M                      # 5,
  interaction = (T.M - C.M) - (T.F - C.F),        # my suggestion
  levels = model)

Positive logFC's from the interaction tell you that the treatment effect is higher for that gene in males than females, and vice versa.

ADD COMMENT

Login before adding your answer.

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