Unconfigured Ad

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

    #1

    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
            16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by SEQadmin2





            NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
            10-30-2026, 06:46 AM
          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Yesterday, 07:59 AM
          0 responses
          13 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-05-2026, 09:25 AM
          0 responses
          32 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-03-2026, 11:54 AM
          0 responses
          45 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-28-2026, 09:57 AM
          0 responses
          170 views
          0 reactions
          Last Post SEQadmin2  
          Working...