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

          • SEQadmin2
            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
            by SEQadmin2



            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
            ...
            07-09-2026, 11:10 AM
          • SEQadmin2
            Cancer Drug Resistance: The Lingering Barrier to Rising Survival
            by SEQadmin2



            Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

            There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
            07-08-2026, 05:17 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 07-13-2026, 10:26 AM
          0 responses
          15 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-09-2026, 10:04 AM
          0 responses
          29 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-08-2026, 10:08 AM
          0 responses
          16 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-07-2026, 11:05 AM
          0 responses
          33 views
          0 reactions
          Last Post SEQadmin2  
          Working...