Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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


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


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


        • #5
          Hi,

          I'm using DESeq version 1.10.1

          Comment


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

            Thanks.

            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
            24 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            25 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            21 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