-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRplot.csh
More file actions
executable file
·26 lines (17 loc) · 1.01 KB
/
Rplot.csh
File metadata and controls
executable file
·26 lines (17 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/tcsh
set mymatrix=`ls *bootstrap_avg_mutinf_res_sum_0diag.txt | tail -n 1`
set myprefix = `echo $mymatrix | sed -e 's/bootstrap_avg_mutinf_res_sum_0diag.txt/mutinf/'`
cat > makeplot.R <<EOF
source("http://bioconductor.org/biocLite.R")
biocLite("marray")
library(marray)
S1M47_mutent <- read.table("${mymatrix}")
pdf("${myprefix}_unclustered.pdf",width=48,height=48)
heatmap(as.matrix(S1M47_mutent), col=maPalette(low="white",mid="blue",high="red"), add = FALSE, xaxs = "i", yaxs = "i", xaxt = "n", yaxt = "n", Rowv = NA, Colv = NA, cexRow=1.05, cexCol=1.05, oldstyle=FALSE,symm = TRUE)
dev.off()
pdf("${myprefix}_clustered.pdf",width=48,height=48)
heatmap(x=as.matrix((S1M47_mutent)),zlim=c(0,max(S1M47_mutent)*1.0), col = maPalette(low = "white", mid = "blue", high = "red", k =50), add = FALSE, xaxs = "i", yaxs = "i",xaxt= "n", yaxt = "n", reorderfun = function(d,w) rev(reorder(d,w)),revC=TRUE, cexRow=0.8, cexCol=0.8, oldstyle = FALSE,symm=TRUE )
dev.off()
EOF
cat makeplot.R | R --no-save
#END