Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sindrle
    Senior Member
    • Aug 2013
    • 266

    EdgeR model matrix interpretation

    Hi!
    The EdgeR manual is quite nice, but I dont quite understand what the model.matrix for EdgeR actually will test!

    status <- factor(c(rep("Diabetic",22), rep("Healthy",26)), levels=c("Diabetic","Healthy"));
    patients <- factor(c(04,21,53,55,61,62,67,73,76,77,79,04,21,53,55,61,62,67,73,76,77,79, 01,08,13,70,71,72,75,81,82,83,86,87,88,01,08,13,70,71,72,75,81,82,83,86,87,88));
    timepoints = as.factor(c(1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2));
    targets <- data.frame(Status=status, patient=patients, timepoint=timepoints)

    design <- model.matrix(~patients + timepoints*status);
    colnames(design)

    > colnames(design)
    [1] "(Intercept)" "patients4"
    [3] "patients8" "patients13"
    [5] "patients21" "patients53"
    [7] "patients55" "patients61"
    [9] "patients62" "patients67"
    [11] "patients70" "patients71"
    [13] "patients72" "patients73"
    [15] "patients75" "patients76"
    [17] "patients77" "patients79"
    [19] "patients81" "patients82"
    [21] "patients83" "patients86"
    [23] "patients87" "patients88"
    [25] "timepoints2" "statusHealthy"
    [27] "timepoints2:statusHealthy"

    What I want is to look if diabetics has changed genes at timepoint 2 compared to healthy (I have done this with DESeq2, just want to check if they match).
    Will: [27] "timepoints2:statusHealthy" Give me what I want?

    Any input?

    Thanks!
    Last edited by sindrle; 10-21-2013, 01:22 PM.
  • sindrle
    Senior Member
    • Aug 2013
    • 266

    #2
    Very basic question:

    patients <- factor(c(88,87,86,83,82,81,75,72,71,70,13,08,01,88,87,86,83,82,81,75,72,71,70,13,08,01,79,77,76,73,67,62,61,55,53,21,04,79,77,76,73,67,62,61,55,53,21,04))
    timepoints =as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2))
    time2.healthy <- as.numeric(status=="Healthy" & timepoints==2)
    time2.diabetic <- as.numeric(status=="Diabetic" & timepoints==2)
    design <- model.matrix(~patients+time2.healthy+time2.diabetic)


    > colnames(design)
    [1] "(Intercept)" "patients4" "patients8" "patients13" "patients21"
    [6] "patients53" "patients55" "patients61" "patients62" "patients67"
    [11] "patients70" "patients71" "patients72" "patients73" "patients75"
    [16] "patients76" "patients77" "patients79" "patients81" "patients82"
    [21] "patients83" "patients86" "patients87" "patients88" "time2.healthy"
    [26] "time2.diabetic"

    WHERE IS PATIENT 01?
    Last edited by sindrle; 10-23-2013, 04:42 PM.

    Comment

    • sindrle
      Senior Member
      • Aug 2013
      • 266

      #3
      lrt <- glmLRT(fit, contrast=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1))

      Gives:

      Coefficient: -1*time2.healthy 1*time2.diabetic

      This will give results for:

      genes for which the change from time1 to time2 is different in the diabetic patients vs the healthy patients
      Last edited by sindrle; 10-23-2013, 04:41 PM.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        WHERE IS PATIENT 01?
        The intercept. BTW, since you've moved the discussion to the bioconductor email list, just keep it there. It's too much work for people to jump back and forth between here and there to get the context of everything!

        Comment

        • sindrle
          Senior Member
          • Aug 2013
          • 266

          #5
          Yes, Im sorry for that.

          I was thinking that since the thread was already opened, I should update for people later.

          Comment

          Latest Articles

          Collapse

          • GATTACAT
            Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by GATTACAT
            Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
            07-01-2026, 11:43 AM
          • SEQadmin2
            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by SEQadmin2


            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

            Here are nine questions we think about, in roughly the order they matter, before...
            06-18-2026, 07:11 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 07-02-2026, 11:08 AM
          0 responses
          16 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-30-2026, 05:37 AM
          0 responses
          17 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-26-2026, 11:10 AM
          0 responses
          21 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-17-2026, 06:09 AM
          0 responses
          54 views
          0 reactions
          Last Post SEQadmin2  
          Working...