Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Simon Anders
    replied
    Originally posted by Marianna85 View Post
    Simon, do you mean the estimateDispersions?
    No, I mean a scatter plot of the reads.

    Try, e.g.,

    Code:
    plot( log10( 1 + counts(cds)[1,] ), log10( 1 + counts(cds)[2,] ), pch="." )
    to plot the raw, unnormalized read counts of the second sample versus the first on a log scale.

    Leave a comment:


  • Marianna85
    replied

    Leave a comment:


  • Marianna85
    replied
    This is the script I used

    CountTable=read.table("decEggs.txt", header=TRUE, row.names=1 )
    head(CountTable)
    decDesign = data.frame(row.names = colnames( CountTable ), condition = c( "stripped", "spawned" ), libType = c( "paired-end", "paired-end" ) )
    decDesign
    pairedSamples = decDesign$libType == "paired-end"
    condition = decDesign$condition[ pairedSamples ]
    library( "DESeq" )
    cds = newCountDataSet( CountTable, condition )
    cds = estimateSizeFactors( cds )
    sizeFactors( cds )
    head( counts( cds, normalized=TRUE ) )


    and the size factors have a 100 fold difference...
    what should I do???

    Leave a comment:


  • Marianna85
    replied
    Originally posted by Simon Anders View Post
    Have you already looked at a scatter plot comparing the counts for the two samples? This should clarify what is going on.
    Simon, do you mean the estimateDispersions?

    Leave a comment:


  • Simon Anders
    replied
    Have you already looked at a scatter plot comparing the counts for the two samples? This should clarify what is going on.

    Leave a comment:


  • Marianna85
    replied
    Originally posted by Jeremy View Post
    Something is going wrong somewhere, 36M and 64M reads should give normalization factors with less than a 2-fold difference. The normalization factors you listed had a 50 fold difference and suggest a much greater difference in read count.
    Hi Jeremy,
    in fact I was surprised to obtain such a difference...
    I've not yet understood which is the mistake in the size factor calculation.

    Leave a comment:


  • Jeremy
    replied
    Something is going wrong somewhere, 36M and 64M reads should give normalization factors with less than a 2-fold difference. The normalization factors you listed had a 50 fold difference and suggest a much greater difference in read count.
    Last edited by Jeremy; 03-04-2013, 05:50 PM.

    Leave a comment:


  • Shanrong
    replied
    I am using both edgeR and DESeq to analyze my own dataset. In general, the fold change reported by both are close (should be, right?).

    If your orignal librares have 36 vs 64 million of total reads, your normalization factors from both methods are very weird (at least quite unusual). Please check whether you analyze your dataset properly.

    The idea of normalization behind edgeR and DESeq is very similar to each other (but implementation is different). In practice, I don't see one method is superior than the other. However, it is definitely a mistake if we feed DESeq with the normalization factor from edgeR, and vice versa.

    Leave a comment:


  • Marianna85
    replied
    Hi Simon,
    happy to read your answer

    Originally posted by Simon Anders View Post
    This is because edgeR gives is norm factors relative to the total read count. To get expression values on a scale comparable across sample, you have to divide the counts
    - for DESeq, just by the size factod
    - for edgeR, by the total read counts and by the normalization factors
    Just an example to better understand.
    For DESeq
    gene A raw counts; 5 reads in library 1 - 70 reads in library 2
    library 1:36 million reads size factor: 0.09
    library 2:64 million reads size factor: 10
    gene A normalized counts lib 1=5/0.09 - lib2=70/10

    For edgeR
    gene A raw counts; 5 reads in library 1 - 70 reads in library 2
    library 1:36 million reads size factor: 0.14
    library 2:64 million reads size factor: 7.2
    gene A normalized counts lib 1=(5/36 million)/0.14 - lib2=(70/64million)/7.2

    in this case with a very huge difference in library size, it seems better to normalize with edgeR. Isn't it?

    Thanks a lot.
    I really appreciate your answer.

    Marianna

    Leave a comment:


  • Simon Anders
    replied
    Originally posted by Marianna85 View Post
    With bot the normalization methods I obtain size factors very different:
    -using DESeq 0,095 for one library and 10,85 for the other.
    -using edgeR 0,14 and 7,2 respectively.
    This is because edgeR gives is norm factors relative to the total read count. To get expression values on a scale comparable across sample, you have to divide the counts
    - for DESeq, just by the size factod
    - for edgeR, by the total read counts and by the normalization factors

    Leave a comment:


  • Marianna85
    replied
    Hi Jeremy,
    yes I have a huge difference in read count between conditions: 36 vs 64 million of total reads.
    I do not have other options unfortunately and I want to make a simple differential espression analysis, maybe with few differential expressed genes.
    I know that, without replicates, it's difficult to make a DE analysis and I don't want to reach false conclusions. I know I have to be very conservative to say something really reliable...but how??
    In your opinion, can I discard some genes, for example those with a low count reads, and make the normalization for the remaining ones?

    Thanks a lot
    Marianna

    Leave a comment:


  • Jeremy
    replied
    Originally posted by Marianna85 View Post
    Hi everyone,
    I'm dealing with the two normalization methods DESeq and edgeR.
    I have two conditions and only one replicate per condition (I know, bad experimental design...) and I tried to normalize the raw counts.
    With bot the normalization methods I obtain size factors very different:
    -using DESeq 0,095 for one library and 10,85 for the other.
    -using edgeR 0,14 and 7,2 respectively.

    Obviously, by dividing the raw counts for the corrisponding size factor, the raw counts drammatically change, sometimes inverting the starting conditions (an upregulated gene become dowregulated).

    Does it make sense?
    do you think it's correct to use this normalization methods despite the weird results??

    Thank you all
    Looks like you have a huge difference (is that a 20-50 fold difference?) in read count between conditions, this is a problem because the normalization will significantly amplify the noise of the smaller sample making the (already unreliable without replicates) data less reliable.
    But yes, you need to normalize. Is more sequencing an option?

    Leave a comment:


  • Marianna85
    replied
    Hi everyone,
    I'm dealing with the two normalization methods DESeq and edgeR.
    I have two conditions and only one replicate per condition (I know, bad experimental design...) and I tried to normalize the raw counts.
    With bot the normalization methods I obtain size factors very different:
    -using DESeq 0,095 for one library and 10,85 for the other.
    -using edgeR 0,14 and 7,2 respectively.

    Obviously, by dividing the raw counts for the corrisponding size factor, the raw counts drammatically change, sometimes inverting the starting conditions (an upregulated gene become dowregulated).

    Does it make sense?
    do you think it's correct to use this normalization methods despite the weird results??

    Thank you all

    Leave a comment:


  • chadn737
    replied
    Originally posted by Shanrong View Post
    Yes, both DESeq and edgeR have functions to normalize the data. However, it's wrong to assign the size factors calculated in edgeR to DESeq, though conceptually fine at first sight. Because in DESEq, the size factor is used to 'transform' the raw reads into a 'common' ground, and you can use the normalized counts for differential analysis. But the size factor in edgeR adjusts the library size so that the gene abundence (=counts/"effective library size", and "effective library size = "library size" * "size factor") is comparable across samples.

    To illustrate this point, see example below.

    Code:
    # data
    y <- x <- rep(1,100)
    y[1] <- 101  
    xy <- data.frame(x=x,y=y)
    
    #edgeR
    edger <- DGEList(counts=xy)
    edger <- calcNormFactors(edger)
    edger$samples
    
    #DESeq
    deseq = newCountDataSet( xy, conditions=c("c1","c2") )
    deseq = estimateSizeFactors( deseq )
    sizeFactors( deseq )
    > sizeFactors( deseq )
    x y
    1 1

    > edger$samples
    group lib.size norm.factors
    x 1 100 1.4142
    y
    1 200 0.7071
    Thank you for this. For my own work I have not done this, but in a project where I am a collaborator, the statistician in the group did use the EdgeR normalized data for input into DESeq. I know it gives very different results, and have avoided it in my own work because the DESeq size factors seemed to give more conservative results and I prefer working with fewer genes that I am very confident in than more genes of lower confidence. I'll have to bring this up on the project that I am collaborating on.

    Leave a comment:


  • Shanrong
    replied
    size factors in DESeq and edgeR

    Originally posted by chadn737 View Post
    When you first use DESeq, you combine a table of counts and a list of conditions to create a count data set

    Code:
    cds <- newCountDataSet(countTable,conditions)
    You can give the count data set your own size factors using

    Code:
    sizeFactors(cds) <- #input
    If you wanted to use TMM normalized sizeFactors from EdgeR rather than those given by DESeq then you can first:

    Code:
    x <- calcNormFactors(as.matrix(countTable)
    and then give this to the count data set:

    Code:
    sizeFactors(cds) <- x
    Yes, both DESeq and edgeR have functions to normalize the data. However, it's wrong to assign the size factors calculated in edgeR to DESeq, though conceptually fine at first sight. Because in DESEq, the size factor is used to 'transform' the raw reads into a 'common' ground, and you can use the normalized counts for differential analysis. But the size factor in edgeR adjusts the library size so that the gene abundence (=counts/"effective library size", and "effective library size = "library size" * "size factor") is comparable across samples.

    To illustrate this point, see example below.

    Code:
    # data
    y <- x <- rep(1,100)
    y[1] <- 101  
    xy <- data.frame(x=x,y=y)
    
    #edgeR
    edger <- DGEList(counts=xy)
    edger <- calcNormFactors(edger)
    edger$samples
    
    #DESeq
    deseq = newCountDataSet( xy, conditions=c("c1","c2") )
    deseq = estimateSizeFactors( deseq )
    sizeFactors( deseq )
    > sizeFactors( deseq )
    x y
    1 1

    > edger$samples
    group lib.size norm.factors
    x 1 100 1.4142
    y
    1 200 0.7071
    Last edited by Shanrong; 02-13-2013, 07:36 PM.

    Leave a 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, Yesterday, 11:13 AM
0 responses
16 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, Yesterday, 10:48 AM
0 responses
17 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-15-2026, 10:52 AM
0 responses
35 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-14-2026, 05:39 AM
0 responses
42 views
0 reactions
Last Post SEQadmin2  
Working...