Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Comparing two conditions DESeq2

    I would like to compare several conditions to a reference condition using DESeq2. Currently I am using the contrast option in the "results"-function as follows:

    Code:
    dds$condition <- relevel(dds$condition, reference)
    #Do the calculation
    dds <- DESeq(dds, betaPrior=FALSE)
    res <- results(dds, contrast = c('condition',selected_condition,reference))
    However in a manual I found that they actually take a subset. http://www.ebi.ac.uk/training/sites/...d-s.anders.pdf I found
    Code:
    #First we subset the relevant columns from the full dataset:
    > dds <- ddsFull[ , colData(ddsFull)$treatment %in% c("Control","DPN") &
    + colData(ddsFull)$time == "48h" ]
    My question is: Are both approaches still valid? And, what is the benefit of one over the other?

    Thanks,

    Rob

  • #2
    I don't know if there is a difference in the results.

    I would however stick to the most recent manual, which was written in 2014, whereas the manual you link to was written in 2013.
    The Bioconductor project aims to develop and share open source software for precise and repeatable analysis of biological data. We foster an inclusive and collaborative community of developers and data scientists.


    DESeq2 has been updated many times, and the contrast option is currently the recommended method.
    I suspect the new implementation is just a more elegant way of accomplishing the same objective, but I could be wrong.

    Comment


    • #3
      "Are both approaches still valid? And, what is the benefit of one over the other?"

      Yes both approaches are valid.

      I typically recommend running DESeq() on an object with samples from all the groups. The more samples, the better the estimates of dispersion (under the model assumptions of a dispersion parameter for each gene for all samples).

      One situation where it might be useful to subset is if the groups have very different within-group variance. You can see this in a PCA plot (see vignette for how to). Consider an experiment with groups A,B,C. If groups A and B have small within-group variance, and group C has much larger within-group variance, then subsetting to only A and B for a B vs A comparison might be more powerful, than including C, which would drive up the genes' dispersion estimates.

      Comment


      • #4
        @rubbertjes, Michael's answer is obviously much better than mine.

        @Michael, that is an interesting point. I do have several analyses where the variance varies greatly from one group to another. It's always good to remember that one should take into account that the estimates of dispersion are computed from all the samples, and not just the samples from the groups being compared when using the contrast option.
        Last edited by blancha; 03-13-2015, 05:50 PM.

        Comment


        • #5
          Originally posted by Michael Love View Post
          "Are both approaches still valid? And, what is the benefit of one over the other?"

          Yes both approaches are valid.

          I typically recommend running DESeq() on an object with samples from all the groups. The more samples, the better the estimates of dispersion (under the model assumptions of a dispersion parameter for each gene for all samples).
          Thanks! That was something I was also thinking.

          One situation where it might be useful to subset is if the groups have very different within-group variance. You can see this in a PCA plot (see vignette for how to). Consider an experiment with groups A,B,C. If groups A and B have small within-group variance, and group C has much larger within-group variance, then subsetting to only A and B for a B vs A comparison might be more powerful, than including C, which would drive up the genes' dispersion estimates.
          There no reason for me to a priori assume this for this particular experiment. I guess this is something I should always check...
          In this case I have 6 groups in my study, where I am only comparing 2 at a time.

          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
          27 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          31 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          27 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          52 views
          0 likes
          Last Post seqadmin  
          Working...
          X