Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • DESeq versions: mimic 1.4.1 with 1.6.1 settings?

    I am unable to replicate DESeq v1.4.1 results using v1.6.1, even when using the settings that -- as far as I can tell from the docs -- should replicate the old behavior. Here's a self-contained working example . . . but it needs parallel installations of R 2.13.1 and R 2.14.0 in order to work.

    First, I created data using only v1.6.1 and saved it to file:

    Code:
    library(DESeq)
    cds <- makeExampleCountDataSet()
    write.table(counts(cds), file='example.counts')

    In R 2.13.1 I ran DESeq v1.4.1:
    Code:
    library(DESeq)
    x <- read.table('example.counts')
    conds <- c('A', 'A','B','B','B')
    cds <- newCountDataSet(x, conds)
    cds <- estimateSizeFactors(cds)
    
    cds <- estimateVarianceFunctions(cds, method='normal')
    
    res <- nbinomTest(cds, 'A', 'B')
    write.table(res, file='old.results', sep='\t', row.names=F)
    Then, over in R 2.14.0, I ran DESeq v1.6.1. Note that everything except the "estimateDispersions" line is the same:
    Code:
    library(DESeq)
    x <- read.table('example.counts')
    conds <- c('A', 'A','B','B','B')
    cds <- newCountDataSet(x, conds)
    cds <- estimateSizeFactors(cds)
    cds <- estimateSizeFactors(cds)
    
    cds <- estimateDispersions(cds, sharingMode='fit-only', 
                               fitType='local', method='per-condition')
    
    res <- nbinomTest(cds, 'A', 'B')
    write.table(res, file='new.results', sep='\t', row.names=F)
    When I compare new.results with old.results, basemeanA, basemeanB, and the fold change columns are identical.

    However, the pval and padj columns are different; plotting them results in two straight-ish lines on either side of the 1:1 (see attached PNG):

    Code:
    new = read.table('new.results', header=T)
    old = read.table('old.results', header=T)
    plot(new$pval, old$pval)
    abline(0, 1, col='red')
    What could be causing this discrepancy? Are there other parameters to estimateDispersions that I'm missing? Has something changed in nbinomTest between versions?

    -ryan
    Attached Files

  • #2
    Yes, we did change 'nbinomTest'. It used to employ an approximation that usually would only be a few percent off (which, for p values, does not matter; one is only interested ion the magnitude, after all), but gave in a few rare cases drastically wrong results. Realizing that this approximation was not really necessary anyway, we removed it. See the end of the new vignette, by the way, for a summary of this and related changes.

    Comment


    • #3
      Ah, your explanation here plus the note in the vignette (which I somehow missed) clears it up -- 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
      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