@@ -0,0 +1,1671 @@
+import sys%0A%0Aif len(sys.argv) %3C 2:%0A        print 'usage python thisscript.py pathtoyourinputfile outfilename'%0A%0Ainfilename = str(sys.argv%5B1%5D)%0A %0Aoutfilename = str(sys.argv%5B2%5D)%0A%0Aqsubscriptname = 'WQMCquartetsfor_' + infilename +'.qsub'%0A %0Aheadstr1 = '#declare name of job %5Cn#PBS -N ruthquartets.' + infilename + '%5Cn'%0A%0Aheadstr2 = '# request 1 node %5Cn#PBS -l nodes=1:ppn=1:taub %5Cn# request 2 hours and 0 minutes of cpu time %5Cn#PBS -l cput=02:00:00  %5Cn# request 3 hours and 0 minutes of wall time (ask %5Cn#PBS -l walltime=03:00:00  %5Cn# mail is sent to you when the job starts and when it exits, terminates or aborts %5Cn#PBS -m ea %5Cn#this submits to queue cse %5Cn#PBS -q cse %5Cn#PBS -l naccesspolicy=singleuser %5Cn# specify your email address %5Cn#PBS -M redavids@ncsu.edu %5Cn# By default, PBS scripts execute in your home directory, not the %5Cn# directory from which they were submitted. The following line %5Cn# places you in the directory from which the job was submitted.  %5Cn# run the program; -t 1-2 runs it twice, 100 or 0-99 both run 100 times %5Cn#PBS -t 1%5Cn%5Cn' %0A%0Acdstr = 'cd /home/redavid2/phylogenetics/quartets %5Cn%5Cn'%0A%0Amakequartetsstr = 'sh quartet-controller.sh ' + infilename + ' /home/redavid2/scratch/quartets/' + outfilename + '%5Cn%5Cn'%0A%0Acdscratchstr = 'cd /home/redavid2/scratch/quartets %5Cn%5Cn'%0A%0AwQMCstr = '/home/redavid2/scratch/quartets/' + outfilename%0A%0AfixtoQMCstr = 'cat '+ wQMCstr +' %7C sed s/%22((%22//g %7C sed s/%22),(%22/%22%7C%22/g %7C sed s/%22)); %22/%22:%22/g %7C sed %5C'/%7C/!d%5C' %3E ' +wQMCstr+'.wQMC%5Cn%5Cn'%0A%0Aendstr = 'done%5Cn%5Cnexit 0%5Cn%5Cn'%0A%0A%0Abigstring = headstr1 + headstr2 + cdstr + makequartetsstr + cdscratchstr + fixtoQMCstr + endstr %0A%0AH = open(qsubscriptname, 'w')%0A%0AH.write(bigstring)%0A%0AH.close()%0A%0A%0A

add functionality for making WQMC quartet files