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
              Advancing Precision Medicine for Rare Diseases in Children
              by seqadmin




              Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
              12-16-2024, 07:57 AM
            • seqadmin
              Recent Advances in Sequencing Technologies
              by seqadmin



              Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

              Long-Read Sequencing
              Long-read sequencing has seen remarkable advancements,...
              12-02-2024, 01:49 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 12-17-2024, 10:28 AM
            0 responses
            33 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-13-2024, 08:24 AM
            0 responses
            49 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-12-2024, 07:41 AM
            0 responses
            34 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-11-2024, 07:45 AM
            0 responses
            46 views
            0 likes
            Last Post seqadmin  
            Working...
            X