Mercurial > repos > xuebing > sharplabtool
diff intervalSize.py @ 14:76e1b1b21cce default tip
Deleted selected files
author | xuebing |
---|---|
date | Tue, 13 Mar 2012 19:05:10 -0400 |
parents | 292186c14b08 |
children |
line wrap: on
line diff
--- a/intervalSize.py Sat Mar 10 08:17:36 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -''' -plot histogram of interval size -''' - -import os,sys - -inputfile = sys.argv[1] -outputfile = sys.argv[2] - -rf = open('tmp.r','w') -rf.write("x <- read.table('"+inputfile+"')\n") -rf.write("len <- x[,3]-x[,2]\n") -rf.write("pdf('"+outputfile+"')\n") -rf.write("hist(len,breaks=100,xlab='interval size',main=paste('mean=',mean(len),sep=''))\n") -rf.write("dev.off()") -rf.close() -os.system("R --vanilla < tmp.r") -os.system('rm tmp.r')