adding iqtree-fast

This commit is contained in:
Auden Cote-L'Heureux 2025-01-12 12:35:53 -05:00 committed by GitHub
parent 4f5bce5963
commit eb9e81f4c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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')]: 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 #Run IQ-Tree
if params.tree_method == 'iqtree': if params.tree_method == 'iqtree' or params.tree_method == 'iqtree_fast':
#Make intermediate folders #Make intermediate folders
if not os.path.isdir(params.output + '/Output/Intermediate/IQTree'): if not os.path.isdir(params.output + '/Output/Intermediate/IQTree'):
os.mkdir(params.output + '/Output/Intermediate/IQTree') os.mkdir(params.output + '/Output/Intermediate/IQTree')
@ -43,8 +43,11 @@ def run(params):
os.mkdir(tax_iqtree_outdir) os.mkdir(tax_iqtree_outdir)
#Run IQ-Tree #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 #Copy over the final output
if os.path.isfile(tax_iqtree_outdir + '/' + file.split('.')[0].split('_preguidance')[0] + '.IQTree.treefile'): 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') 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')