http://stackoverflow.com/questions/28334066/normalize-all-data-to-single-gene-observation-in-r
Great! another solution to my problem. I just love the stack overflow community. Great advice and a fun model to encourage participation.
So I normalized my data as suggested:
df11<- group_by(df10g,type,pt.num)But then I realized that I was going to try the T/D ratios of the normalized data and converted back to the format with T and D in separate columns sorting by patient to allow for the ratio columns
df11<- mutate(df11, normIGF2R= value/value[GeneID=="IGF2R"])
df11<-mutate(df11, log2normIGF2R = log2(normIGF2R))
df11b<- mutate(df10b, DnormIGF2R= D/D[GeneID=="IGF2R"], TnormIGF2R=T/T[GeneID=="IGF2R"])
df11b<-mutate(df11b, NormT.D = TnormIGF2R/DnormIGF2R, log2NormT.D=log2(NormT.D))
So my data is normalized, log2, and T/D ratios. I can compare all the data by heatmaps.
No comments:
Post a Comment