Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • KoenVdb
    Junior Member
    • Jan 2014
    • 1

    EdgeR LogCpm and LogFC

    Dear all,

    First of all, I realize there are already several topics on this forum regarding this subject, however none of these seemed to solve my question.
    I am analyzing RNA-Seq data with EdgeR. I have found several DE genes and now my idea is to plot these DE genes. I would like to do so in terms of changes in logCPM, aswell as in logFC.
    Furthermore, I realize these values can be found in the LRT table provided by the glmLRT function when testing for a particular coefficient or contrast matrix. However, I can not seem to reproduce these results using my count matrix (DGE list) to start with.

    Here is what I have tried so far:
    'y' is my DGE list with counts and fitted tagwise dispersion
    'fit' is my glmFit, fitted according to my design matrix.
    'SignGeneID' is the gene ID of a DE gene
    The three columns I provide in my calculation code are the columns of the respective coefficients I want to test (so, in this particular case, columns 1,7 and 13 represent three control treatments of three separate patients and columns 3,9,15 represent three treatments.

    For the LogCpm:
    Code:
    design <- model.matrix(~ patient +Treat+Time + Treat:Time)
    fcRaw <- y$counts[SignGeneID,c(1,7,13)] / y$counts[SignGeneID,c(3,9,15)]
    log2FC <- log(fcRaw , base = 2)
    mean(log2FC) #not equal to LRT table FC
    I have tried several variations on this basic calculations, however I can not reach the same conclusion as the LRT table provided me with.

    For the LogFC, I can get to the same results of the LRT table through the coefficients of my glmFit in this fashion, with "TreatDPN" being the coefficient I have tested:

    Code:
    coef <- "TreatDPN"
    logFC <- fit2$coefficients[, coef, drop = FALSE]/log(2)
    However, again, I can not come to the LRT table reported value starting from my raw count data. What am I overlooking here?

    Any help would be greatly appreciated.
    Koen.

Latest Articles

Collapse

  • SEQadmin2
    Nine Things a Sample Prep Scientist Thinks About Before Sequencing
    by SEQadmin2


    I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

    Here are nine questions we think about, in roughly the order they matter, before...
    06-18-2026, 07:11 AM
  • SEQadmin2
    From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
    by SEQadmin2


    Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


    The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
    ...
    06-02-2026, 10:05 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, Today, 05:37 AM
0 responses
5 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-26-2026, 11:10 AM
0 responses
16 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-17-2026, 06:09 AM
0 responses
49 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-09-2026, 11:58 AM
0 responses
109 views
0 reactions
Last Post SEQadmin2  
Working...