Question: RNA seq normalization(TMM)
0
gravatar for maryak
17 months ago by
maryak20
maryak20 wrote:

i have htseq-count data now i want to normalize it using TMM for diffrential expression analysis .can anybody tell me how to do this Thanking in anticipation

rna-seq R gene • 1.6k views
ADD COMMENTlink modified 17 months ago by h.mon29k • written 17 months ago by maryak20
1
gravatar for h.mon
17 months ago by
h.mon29k
Brazil
h.mon29k wrote:

The edgeR User Guide is an excellent read, and has the answer to this question, and probably the answer to some questions you will have in the near future.

ADD COMMENTlink written 17 months ago by h.mon29k

can you please guide me in the form of code because i am new with R

ADD REPLYlink written 17 months ago by maryak20
library(edgeR)
#TMM Normalisation
lib.size <- sum(d$sample1)
scale.factors <- calcNormFactors(TMM$sample1, method = "TMM")
norm.data <- t(t(TMM$sample1)/(scale.factors*lib.size))
write.csv(norm.data,"/home/TMM.csv")
ADD REPLYlink modified 17 months ago • written 17 months ago by k.kathirvel93220

lib.size <- sum(d$sample1) is it calculating library size of just one sample??? d is the name of file object that contain counts??

ADD REPLYlink written 17 months ago by maryak20

Read the edgeR User Guide, it has plenty of code examples to guide you through the whole analysis, from the very beginning to the very end. Then, if /when you have difficulties, show us how is your data (ideally, with a small example), tell us what you did (the code), and the error you got.

The Similar Posts links to the right are also a great resource, and indeed I found one link with code and explanations about TMM normalization which would probably be very helpful to you.

ADD REPLYlink written 17 months ago by h.mon29k

i have run this code but no file is created even after the program is executed successfully and no error message appears

library(edgeR)
seqdata <- read.delim("C:\\Users\\hp folio\\Desktop\\TCGA-DLBC.htseq_counts.tsv")
scale.factors <- calcNormFactors(seqdata,lib.size=NULL method = "TMM")
norm.data <- t(t(seqdata)/(scale.factors*lib.size))
write.csv(norm.data,"C:\\Users\\hp folio\\Desktop\\TMM.csv")
ADD REPLYlink modified 17 months ago by h.mon29k • written 17 months ago by maryak20

I suspect that you have a problem on write.csv line. Check your path is correct or not.

ADD REPLYlink written 17 months ago by k.kathirvel93220

if path is incorrect at least it must show some error... and i checked there is no problem in path

ADD REPLYlink written 17 months ago by maryak20

if path is incorrect at least it must show some error... and i checked there is no problem in path

ADD REPLYlink written 17 months ago by maryak20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1028 users visited in the last hour