R Tips: How to normalize data?
When I was analyzing RNA-seq data, I usually need to normalize the gene expression value (FPKM).
Packages "recommenderlab" can easily help us to do this.
Here is an example:
setwd("Y:/conte/x/xie186/DrZhaoChunzhao/project_CBF_RNA-seq/results/RNA-seq_cdf_151202/cuffdiff/cdf_regulon_genes")
library(gplots)
cc<-read.table("cbf_regulon_gene_fc1_fc1_heat.txt")
library(recommenderlab)
r <- as(as.matrix(log2(cc + 0.001)), "realRatingMatrix")
r_norm <- normalize(r, method="Z-score", row=TRUE)
dat <- as(r_norm, "matrix")
Comments
Post a Comment