You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run FlaGs with tree mode, I receive the message.
'> ETE3 failed to create tree due to lack of valid protein accesions, at least 2 required !'
ETE3 actually succeeded in creating the tree, but the problem is with my output prefix.
I normally used a path in my output prefix to send data to an output directory to organise my data (say if I am using Flags on multiple different gene lists in the same set of genomes).
So my output prefix is something like "outputdir/output_prefix"
Unfortunately this doesn't play nicely with the following test for whether a tree has been sucessfully built by ete3:
if os.path.isfile(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/'+args.out_prefix+'_tree.fasta.final_tree.nw') == True:
This would mean looking for the treefile in "outputdir/output_prefix_tree/mafft_default-trimal01-none-fasttree_full/outputdir/output_predix_tree.fasta.final_tree.nw'
It might be useful to either have a separate option to allow a user-specified output directory.
Or otherwise, as a quick fix for my own use I have swapped out os.path.isfile for glob.glob which allows wildcards and prevents the need to add a second args.out_prefix argument.
if glob.glob(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/*fasta.final_tree.nw'): with open(glob.glob(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/*fasta.final_tree.nw')[0], 'r') as treeIn:
Thanks!
Andrew
The text was updated successfully, but these errors were encountered:
ak-watson
changed the title
Using a path in the output prefix results in a
Using a path in the output prefix results in false message that there is no tree file
Jul 6, 2021
When I run FlaGs with tree mode, I receive the message.
'> ETE3 failed to create tree due to lack of valid protein accesions, at least 2 required !'
ETE3 actually succeeded in creating the tree, but the problem is with my output prefix.
I normally used a path in my output prefix to send data to an output directory to organise my data (say if I am using Flags on multiple different gene lists in the same set of genomes).
So my output prefix is something like "outputdir/output_prefix"
Unfortunately this doesn't play nicely with the following test for whether a tree has been sucessfully built by ete3:
if os.path.isfile(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/'+args.out_prefix+'_tree.fasta.final_tree.nw') == True:
This would mean looking for the treefile in "outputdir/output_prefix_tree/mafft_default-trimal01-none-fasttree_full/outputdir/output_predix_tree.fasta.final_tree.nw'
It might be useful to either have a separate option to allow a user-specified output directory.
Or otherwise, as a quick fix for my own use I have swapped out os.path.isfile for glob.glob which allows wildcards and prevents the need to add a second args.out_prefix argument.
if glob.glob(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/*fasta.final_tree.nw'): with open(glob.glob(args.out_prefix+'_tree/mafft_default-trimal01-none-fasttree_full/*fasta.final_tree.nw')[0], 'r') as treeIn:
Thanks!
Andrew
The text was updated successfully, but these errors were encountered: