comparison raxml.py @ 31:a631c2f6d913

Update to Miller Lab devshed revision 3c4110ffacc3
author Richard Burhans <burhans@bx.psu.edu>
date Fri, 20 Sep 2013 13:25:27 -0400
parents
children
comparison
equal deleted inserted replaced
30:4188853b940b 31:a631c2f6d913
1 #!/usr/bin/env python
2
3 import random
4 import sys
5 import shutil
6 import gd_util
7
8 ################################################################################
9
10 if len(sys.argv) != 3:
11 gd_util.die('Usage')
12
13 input, output = sys.argv[1:]
14 random.seed()
15
16 ################################################################################
17
18 prog = 'raxmlHPC'
19
20 args = [ prog ]
21
22 ## required: -s sequenceFileName -n outputFileName -m substitutionModel
23 ## we supply -s, -n (they are not allowed from user)
24
25 args.append('-s') # name of the alignment data file in PHYLIP format
26 args.append(input)
27
28 args.append('-n') # name of the output file
29 args.append('fake')
30
31 ## default options
32 args.append('-m') # substitutionModel
33 args.append('GTRGAMMA') # GTR + Optimization of substitution rates + GAMMA model of rate
34 # heterogeneity (alpha parameter will be estimated)
35
36 args.append('-N') # number of alternative runs on distinct starting trees
37 args.append(1000)
38
39 args.append('-f') # select algorithm
40 args.append('a') # rapid Bootstrap analysis and search for
41 # best-scoring ML tree in one program run
42
43 args.append('-x') # integer random seed and turn on rapid bootstrapping
44 args.append(random.randint(0,100000000000000))
45
46 args.append('-p') # random seed for parsimony inferences
47 args.append(random.randint(0,100000000000000))
48
49 gd_util.run_program(prog, args)
50 shutil.copy2('RAxML_bipartitions.fake', output)
51 sys.exit(0)