@@ -126,10 +126,11 @@ def convert(outdir, axt, phylip):
126126 if cf .returncode == 0 :
127127 return True
128128
129- def calculateKaKs (outdir , method ):
129+ def calculateKaKs (outdir , method , cpu ):
130130 '''Calls KaKs_Calculator to calculate substition rates.'''
131131 ck = Popen (split ("python bin/04_CallKaKs.py -i" + outdir +
132- "03_axtFiles -o " + outdir + "04_KaKsOutput -m " + method ))
132+ "03_axtFiles -o " + outdir + "04_KaKsOutput -m " + method +
133+ " -t " + str (cpu )))
133134 ck .wait ()
134135 if ck .returncode == 0 :
135136 return True
@@ -140,7 +141,7 @@ def runcodeml(cpu, outdir, forward, cleanup):
140141 cmd = ("python bin/04_CallCodeML.py -t " + str (cpu ) + " -i " + outdir +
141142 "03_phylipFiles" + " -o " + outdir + "04_CodemlOutput" )
142143 if cleanup == False :
143- cmd += " --noCleanUp "
144+ cmd += " --cleanUp "
144145 if forward :
145146 cmd += " -f " + forward
146147 cm = Popen (split (cmd ))
@@ -181,8 +182,9 @@ def main():
181182 parser .add_argument ("-t" , type = int , default = 1 , help = "Number of threads." )
182183 parser .add_argument ("-f" , default = "" ,
183184help = "Forward species (name must be the same as it appears in input files." )
184- parser .add_argument ("--noCleanUp" , action = "store_false" ,
185- help = "Keep temporary files." )
185+ parser .add_argument ("--cleanUp" , action = "store_false" ,
186+ help = "Remove temporary files (it may be useful to retain phylogenic trees \
187+ for future use)." )
186188 # Parse arguments and assign to variables
187189 args = parser .parse_args ()
188190 infile = args .i
@@ -199,7 +201,7 @@ def main():
199201 codeml = args .codeml
200202 cpu = args .t
201203 forward = args .f
202- cleanup = args .noCleanUp
204+ cleanup = args .cleanUp
203205 # Check inout commands prior to running:
204206 if not ref :
205207 print ("\n \t Error: Please specify a reference species.\n " )
@@ -226,7 +228,7 @@ def main():
226228 if cf == True :
227229 # Run KaKs_Calculator:
228230 if kaks == True :
229- done = calculateKaKs (outdir , method )
231+ done = calculateKaKs (outdir , method , cpu )
230232 # Run codeml
231233 elif codeml == True :
232234 done = runcodeml (cpu , outdir , forward , cleanup )
0 commit comments