annotate alignvis.r @ 12:2f4ea569f048

Uploaded
author xuebing
date Sat, 10 Mar 2012 08:10:44 -0500
parents b7f1d9f8f3bc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
1 args <- commandArgs(TRUE)
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
2 x <- read.table(args[1])
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
3 pdf(args[2])
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
4 #visualize the profile with heatmap
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
5 srt <- sort(x[,2],index.return=T) # sort by total number of reads
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
6 image(-t(log(as.matrix(x[srt$ix[1:nrow(x)],3:ncol(x)],nc=ncol(x)-2))),col=gray.colors(100))
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
7 dev.off()
b7f1d9f8f3bc Uploaded
xuebing
parents:
diff changeset
8