Skip to content

Commit a5fba42

Browse files
committed
Updated to newest version (minor edits).
1 parent a5c6fda commit a5fba42

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

AlignmentProcessor.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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="",
183184
help="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\tError: 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)

AlignmentProcessorReadMe.pdf

3.13 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111
GNU General Public License for more details.
1212

13-
# AlignmentProcessor1.1 Package
13+
# AlignmentProcessor1.2 Package
1414

1515
# Dependencies:
1616
Python 3
1717
Python 3 version of Biopython
1818
PAML (if using CodeML)
19-
PhyML (if using CodeML)
19+
PhyML (if using CodeML for multiple species alignments)
2020

2121

2222
AlignmentProcessor is a pipeline meant to quickly convert a multi-fasta

0 commit comments

Comments
 (0)