From eb9e81f4c0b08ffe807eb78dbc449ff6c18fadf8 Mon Sep 17 00:00:00 2001 From: Auden Cote-L'Heureux <52716489+AudenCote@users.noreply.github.com> Date: Sun, 12 Jan 2025 12:35:53 -0500 Subject: [PATCH] adding iqtree-fast --- PTL2/Scripts/trees.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PTL2/Scripts/trees.py b/PTL2/Scripts/trees.py index 747594f..375ea71 100644 --- a/PTL2/Scripts/trees.py +++ b/PTL2/Scripts/trees.py @@ -34,7 +34,7 @@ def run(params): for file in [f for f in os.listdir(guidance_path) if f.endswith('.fa') or f.endswith('.faa') or f.endswith('.fasta') or f.endswith('.fas') or f.endswith('.aln')]: #Run IQ-Tree - if params.tree_method == 'iqtree': + if params.tree_method == 'iqtree' or params.tree_method == 'iqtree_fast': #Make intermediate folders if not os.path.isdir(params.output + '/Output/Intermediate/IQTree'): os.mkdir(params.output + '/Output/Intermediate/IQTree') @@ -43,8 +43,11 @@ def run(params): os.mkdir(tax_iqtree_outdir) #Run IQ-Tree - os.system('iqtree2 -s ' + guidance_path + '/' + file + ' -m LG+G -T 10 --prefix ' + tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree') - + if params.tree_method == 'iqtree': + os.system('iqtree2 -s ' + guidance_path + '/' + file + ' -m LG+G -T 10 --prefix ' + tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree') + elif params.tree_method == 'iqtree_fast': + os.system('iqtree2 -s ' + guidance_path + '/' + file + ' -m LG+G -T 10 --fast --prefix ' + tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree') + #Copy over the final output if os.path.isfile(tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree.treefile'): os.system('cp ' + tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree.treefile ' + params.output + '/Output/Trees/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree.tree')