R NanoStringDiff: DE analysis, from 2 group comparison method how "logFC" generated?
Entering edit mode
choijamts • 0
Last seen 2.9 years ago
South Korea

Hello there, I've tried to use NanoStringDiff package to find out differential expression analysis between 2 group (NC vs Treat) data.

And here is the data of mRNAs counts from each condition. Input data.

#  CodeClass  Name    Accession    NC  Treat 
#1  Positive POS_A ERCC_00117.1 43570  42535  
#2  Positive POS_B ERCC_00112.1 14932  14485  
#3  Positive POS_C ERCC_00002.1  4043   3922   
#4  Positive POS_D ERCC_00092.1   915    854    
#5  Positive POS_E ERCC_00035.1   184    163    
#6  Positive POS_F ERCC_00034.1    84     94     
#7  Endogenous A2M NM_000014.4     17     30

#                  CodeClass  Name    Accession    NC  Treat 
#782 Housekeeping     TLK2    NM_006852.3  210    146    156
#783 Housekeeping    TMUB2    NM_177441.2  118     70    122
#784 Housekeeping      UBB    NM_018955.3 1340   1067   1129

And i followed vignette carefully and get the differential expression results below.

#'[Generalize linear model likelihood ratio test:]

result = glm.LRT(NanoStringData,design.full,contrast=contrast)

#              logFC         lr       pvalue       qvalue
#A2M      13.2536182  4.9222949 2.651228e-02 2.687055e-01
#ACVR1C  -18.5250820  0.7255828 3.943187e-01 9.085508e-01
#ADAM12    0.1832845  0.3307115 5.652404e-01 9.085508e-01
  1. But the problem is: In the vignette there were no explanation about how "logFC" is generated. I mean is this log2 fold change between these two groups? or log10 fold change?
  1. Also is it possible to reproduce logFC value, for example from A2M gene by manually? (without package) (You can see count value for the A2M gene above)

Here is the link for the NanoStringDiff package (https://www.bioconductor.org/packages/release/bioc/html/NanoStringDiff.html)

Thank you

Nan NanoStringDiff • 1.0k views
Entering edit mode
Last seen 2 days ago
United States

It's common practice to use natural logs for the model fitting and then convert to base 2 for output. Anyway, you can see in the function for glm.LRT that the base is converted to 2, as there are numerous instances of the following:

 logFC = Beta.full[, Beta, drop = FALSE]/log(2)

And no you won't be able to compute the logFC yourself. There is no closed form solution for the coefficients of a GLM - they are estimated by iteration by the software - so you can't just take logs and subtract.

Entering edit mode

Thanks for your explanation.


Login before adding your answer.

Traffic: 440 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6