cl=read.table('genes.fpkm_attr_table_top100_sum_fpkm.csv',header=TRUE,sep="\t") x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8]),0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) x1=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8])) xs1=rowSums(x1) x2=cbind(0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) xs2=rowSums(x2) # xa=cbind(x1/xs1,x2/xs2) xs=rowMeans(x) xa=x/xs rownames(xa)=cl[,21] colnames(xa)=colnames(cl[,c(9,3,4,6,16,11,12,14)]) png("all-de-top100-total-fpkm-heatmap-Zscore.png",width=2048,height=2048) par(lwd=4) aheatmap((xa), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="complete") #aheatmap((xa), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") dev.off() > @@ # top 100 expressed genes (of all diff.exp.list) cl=read.table('genes.fpkm_attr_table_top100_sum_fpkm.csv',header=TRUE,sep="\t") x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8]),0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(9,3,4,6,16,11,12,14)]) png("all-de-top100-total-fpkm-heatmap2.png",width=2048,height=2048) par(lwd=4) aheatmap(log2(0.125+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") dev.off() # wt de genes cl=read.table('genes.fpkm_attr_table_wt_total-fpkm-ge2.csv',header=TRUE,sep="\t") x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7)]) x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(9,3,4,6)]) png("wt-de-heatmap2.png",width=1024,height=2048) aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8]),0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(9,3,4,6,16,11,12,14)]) png("wt-de-with-scan-heatmap2.png",width=2048,height=2048) par(lwd=4) #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") dev.off() #scan de genes cl=read.table('known.genes.fpkm_attr_table_scan_total_fpkm_top100.csv',header=TRUE,sep="\t") x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(16,11,12,14)]) png("scan-heatmap-top100.png",width=800,height=2048) #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") aheatmap(log2(1+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() png("scan-heatmap-top100.png",width=800,height=2048) #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") aheatmap(log2(1+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8]),0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(9,3,4,6,16,11,12,14)]) png("scan-de-with-wt-heatmap-top100.png",width=800,height=2048) #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") aheatmap(log2(1+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() #top200 cl=read.table('known.genes.fpkm_attr_table_scan_total_fpkm_top200.csv',header=TRUE,sep="\t") x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(16,11,12,14)]) png("scan-heatmap-top200.png",width=800,height=15000) #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='manhattan',scale="none",cexRow=16,hclustfun="average") aheatmap(log2(1+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="complete") #aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() x2=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) x=cbind(0.5*(x2[,1]+x2[,2]),0.5*(x2[,3]+x2[,4]),0.5*(x2[,5]+x2[,6]),0.5*(x2[,7]+x2[,8]),0.5*(x2[,9]+x2[,10]),0.5*(x2[,11]+x2[,12]),0.5*(x2[,13]+x2[,14]),0.5*(x2[,15]+x2[,16])) rownames(x)=cl[,21] colnames(x)=colnames(cl[,c(9,3,4,6,16,11,12,14)]) png("scan-de-with-scan-heatmap2.png",width=2048,height=2048) par(lwd=4) aheatmap(log2(0.25+x), Colv=NA,color='RdYlGn:25',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16,hclustfun="average") dev.off() ## all genes cl=read.table('/data/images/proton/run90/pairings/cuffnorm/konwn.genes.fpkm_attr_table.csv',header=TRUE,sep="\t") x=as.matrix(cl[,c(8,9,2,3,4,5,6,7,16,17,10,11,12,13,14,15 )]) rownames(x)=cl[,21] #aheatmap(log2(1+x), Colv=NA,color='RdYlGn',annColors=rep('rainbow'),annLegend=FALSE,cexRow=1,Rowv ='manhattan') png("all-heatmap2.png") aheatmap(log2(1+x), Colv=NA,color='RdYlGn',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16, ) dev.off() png("all-heatmap2-hires.png",width=3048,height=32000) par(lwd=4) aheatmap(log2(1+x), Colv=NA,color='RdYlGn',annColors=rep('rainbow'),annLegend=FALSE,Rowv ='euclidean',scale="none",cexRow=16, treeheight =550 ) dev.off()