Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #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


      • #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


        • #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

          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM
          • seqadmin
            Strategies for Sequencing Challenging Samples
            by seqadmin


            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
            03-22-2024, 06:39 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          18 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          22 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          47 views
          0 likes
          Last Post seqadmin  
          Working...
          X