SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate TMM normalization Nepa10 Bioinformatics 7 06-13-2017 03:13 PM
N50 explained maasha Bioinformatics 19 06-11-2015 08:27 AM
RNA-seq normalization: How to use TMM and rpkm() in EdgeR?? alisonewr Bioinformatics 2 10-27-2014 08:48 AM
PacBio CCS vs subreads explained ? curious.genome Pacific Biosciences 3 10-24-2013 10:39 PM
TMM nomalization in RNA-seq minghui Bioinformatics 1 05-14-2010 02:01 AM

Reply
 
Thread Tools
Old 11-10-2014, 11:05 PM   #1
LeonDK
Member
 
Location: Denmark

Join Date: Sep 2014
Posts: 69
Default TMM normalization examplified and explained

So according to the Robinson's 2010 paper on TMM normalization, the calculation of TMM factors, is given by:

If we then take this hypothetical count matrix:
Code:
    1   2   3   4   5
a 711 662 138 424 604
b 247 879 547 406 230
c 390 891 678 919 967
d  92 567 529 809 605
e 963 594  87 541 640
f  11 365 620 108 919
g 575 358  32 455 148
h 765 592 462  52 330
i 874 866 331 759 733
j  42 681 634  84 681
Could anyone briefly exemplify how to perform the calculation of the TMM factors manually?

I realise, that I can the normalization factors like so:
Code:
R
library(edgeR)
set.seed(13)
counts = as.data.frame(matrix( floor(runif(10*5,1,1001)), 10, 5))
rownames(counts) = letters[1:10]
colnames(counts) = seq(1,5)
d = DGEList(counts=counts)
d = calcNormFactors(d,method="TMM”)
d$samples$norm.factors
[1] 0.9412422 0.9510114 0.9604313 1.1794450 0.9862088
But i'd love to do a manual calculation, to understand the details of exactly how the TMM values are calculated

Cheers,
Leon
LeonDK is offline   Reply With Quote
Old 11-10-2014, 11:49 PM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,479
Default

Just look at the code for calcNormFactors. I recall it being fairly short.
dpryan is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:46 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO