From 9e4d605bfff77fdcdc4b2c7ab4d9706b625ef130 Mon Sep 17 00:00:00 2001 From: GiuliaRibeiro <41350697+GiuliaRibeiro@users.noreply.github.com> Date: Fri, 18 Apr 2025 13:01:33 -0400 Subject: [PATCH] Update trees.py --- PTL2/Scripts/trees.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/PTL2/Scripts/trees.py b/PTL2/Scripts/trees.py index a555525..9018f0b 100644 --- a/PTL2/Scripts/trees.py +++ b/PTL2/Scripts/trees.py @@ -42,13 +42,21 @@ def run(params): tax_iqtree_outdir = params.output + '/Output/Intermediate/IQTree/' + file.split('.')[0].split('_preguidance')[0] os.mkdir(tax_iqtree_outdir) - #Run IQ-Tree + #Examples on how to run IQ-Tree + #Comment on the lines that do not fit your system + #Run IQ-Tree on the Smith College grid 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 + #Run IQ-Tree in HPC Unity Cluster + #if params.tree_method == 'iqtree': + #os.system('iqtree2 -s ' + guidance_path + '/' + file + ' -m LG+G --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 --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') #color(params.output + '/Output/Trees/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree.tree')