Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alisrpp
    Member
    • Dec 2010
    • 40

    #1

    DESeq - estimateDispersion doubt

    Hi,

    I'm using DESeq for the first time and at the step of variance estimation i'm obtaining very different plots from the manual and i have no idea about how to interpretate them.

    My data are: 2 different conditions with 2 replicates each

    Code:
                  condition    libType
    C4                   SP paired-end
    CRL_2APR10           SP paired-end
    CRL_1_15JUL11        EB paired-end
    CRL_2_15JUL11        EB paired-end
    Code:
    'data.frame':	307048 obs. of  4 variables:
     $ C4           : int  5 7 0 2 3 0 0 0 3 0 ...
     $ CRL_2APR10   : int  0 0 0 0 0 0 0 0 0 0 ...
     $ CRL_1_15JUL11: int  0 0 0 0 0 0 0 0 0 10 ...
     $ CRL_2_15JUL11: int  0 0 0 0 0 0 0 0 0 3 ...
    My size factors are:

    Code:
    C4    CRL_2APR10 CRL_1_15JUL11 CRL_2_15JUL11 
        2.6549225     0.8623452     1.3987823     0.3507545
    If i run:

    Code:
    > cds <- estimateDispersions( cds, method="per-condition", 
    +                             sharingMode="maximum", 
    +                             fitType="local")
    > plotDispEsts <- function( cds )
    + {
    +    plot(
    +       rowMeans( counts( cds, normalized=TRUE ) ),
    +       fitInfo(cds, name="SP")$perGeneDispEsts,
    +       pch = '.', log="xy" )
    +    xg <- 10^seq( -.5, 5, length.out=300 )
    +    lines( xg, fitInfo(cds, name="SP")$dispFun( xg ), col="red" )
    + }
    > plotDispEsts(cds)
    Warning messages:
    1: In xy.coords(x, y, xlabel, ylabel, log) :
      115300 x values <= 0 omitted from logarithmic plot
    2: In xy.coords(x, y, xlabel, ylabel, log) :
      30294 y values <= 0 omitted from logarithmic plot
    my dispersion plot looks like:

    plotDispEsts_fitInfo(cds,name=SP).jpeg (see attach.)

    Doing the same by fitInfo(cds, name="EB"):

    plotDispEsts_fitInfo(cds,name=EB).jpeg (see attach.)

    And just running:

    Code:
    > cds <- estimateDispersions( cds, 
    +                             sharingMode="maximum", 
    +                             fitType="local")
    > plotDispEsts <- function( cds )
    + {
    +    plot(
    +       rowMeans( counts( cds, normalized=TRUE ) ),
    +       fitInfo(cds)$perGeneDispEsts,
    +       pch = '.', log="xy" )
    +    xg <- 10^seq( -.5, 5, length.out=300 )
    +    lines( xg, fitInfo(cds)$dispFun( xg ), col="red" )
    + }
    > plotDispEsts(cds)
    Warning messages:
    1: In xy.coords(x, y, xlabel, ylabel, log) :
      115300 x values <= 0 omitted from logarithmic plot
    2: In xy.coords(x, y, xlabel, ylabel, log) :
      28498 y values <= 0 omitted from logarithmic plot
    My dispersion plot is:

    plotDispEsts_fitInfo(cds).jpeg (see attach.)

    I need some help to interpretate the plots.
    Can anyone?

    Thanks in advanced!
    Attached Files
  • muthu545
    Member
    • Jul 2011
    • 32

    #2
    Hi,
    plotDispEst plots the dispersion vs rowCounts of DESeq object.
    Usually as shown in the Vignette, the dispersions will be higher with lower row counts and go on to decrease with increasing row counts.

    You have modified by the plotDispEst function, that might be one possible reason that
    your plot did not meet the above explanation.

    open new R file, load the DESeq package and run plotDispEsts, the output should be

    ------------------------------------------------
    > plotDispEsts
    function (cds, name = NULL, ymin, linecol = "#ff000080", xlab = "mean of normalized counts",
    ylab = "dispersion", log = "xy", cex = 0.45, ...)
    {
    px = rowMeans(counts(cds, normalized = TRUE))
    sel = (px > 0)
    px = px[sel]
    py = fitInfo(cds, name = name)$perGeneDispEsts[sel]
    if (missing(ymin))
    ymin = 10^floor(log10(min(py[py > 0], na.rm = TRUE)) -
    0.1)
    plot(px, pmax(py, ymin), xlab = xlab, ylab = ylab, log = log,
    pch = ifelse(py < ymin, 6, 16), cex = cex, ...)
    xg = 10^seq(-0.5, 5, length.out = 100)
    lines(xg, fitInfo(cds, name = name)$dispFun(xg), col = linecol,
    lwd = 4)
    }
    <environment: namespace: DESeq>
    --------------------------------------

    To run DispEst plot for the DESeq object, just run:
    plotDispEsts(cds)

    To run DispEst plot for any specific condition use the following:
    plotDispEsts(cds, name='Cond')

    Suggestion:
    since you have only 2 replicates, you the following parameters:
    cds <- estimateDispersions( cds,
    method="pooled",
    sharingMode="fit_only",
    fitType="parametric")

    Thanks
    --
    Muthu

    Comment

    • alisrpp
      Member
      • Dec 2010
      • 40

      #3
      Hi Muthu,

      I'm trying to run your suggestion:

      Suggestion:
      since you have only 2 replicates, you the following parameters:
      cds <- estimateDispersions( cds,
      method="pooled",
      sharingMode="fit_only",
      fitType="parametric")
      and this is what is happening to me:

      Code:
      > cds <- estimateDispersions( cds,
      +                             method="pooled",
      +                             sharingMode="fit-only", 
      +                             fitType="parametric")
      Error in parametricDispersionFit(means, disps) : 
        Parametric dispersion fit failed. Try a local fit and/or a pooled estimation. (See '?estimateDispersions')
      Why are you suggesting me a "parametric" fitType instead of "local"? Do you think that i can use local without a problem?

      Thanks.

      Comment

      • muthu545
        Member
        • Jul 2011
        • 32

        #4
        Hi,

        I think you could try local fit, if it does not throw out error.

        Are you using DESeq1.X version or DESeq2.X

        Thanks
        --
        Muthu

        Comment

        • alisrpp
          Member
          • Dec 2010
          • 40

          #5
          Hi,

          I'm using DESeq version 1.10.1

          Comment

          • alisrpp
            Member
            • Dec 2010
            • 40

            #6
            I'm still generating the same plot, any ideas about how to interpretate it?

            Thanks.

            Comment

            Latest Articles

            Collapse

            • 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
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 10-22-2026, 11:13 AM
            0 responses
            26 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 10:48 AM
            0 responses
            20 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            36 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            43 views
            0 reactions
            Last Post SEQadmin2  
            Working...