Skip to content

Commit 949477a

Browse files
committed
add modelname and outdir to ft2 treebuilder
1 parent 3dd8aeb commit 949477a

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

foldtree2/ft2treebuilder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__ ( self , model , decoder_model = None, mafftmat = None , submat = N
3434
self.raxml_path = raxml_path
3535
self.raxmlng_path = raxml_path
3636
self.modelname = model.split('/')[-1].split('.')[0]
37+
3738
if charmaps is None:
3839
self.rev_replace_dict_ord = { ord(v):ord(k) for k,v in self.replace_dict.items() }
3940
self.raxml_path = raxml_path
@@ -666,9 +667,10 @@ def main():
666667

667668
if args.outdir is not None:
668669
if not os.path.exists(args.outdir):
669-
os.makedirs(args.outdir)
670+
os.makedirs(args.outdir , exist_ok=True)
671+
670672
if args.output_prefix is None:
671-
args.output_prefix = 'encoded'
673+
args.output_prefix = os.path.join(args.outdir, args.model.split('/')[-1])
672674
else:
673675
if not args.output_prefix.endswith('_'):
674676
args.output_prefix += '_'

foldtree2/notebooks/benchmarks/alphabet_Information_content_benchmark.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4091,7 +4091,7 @@
40914091
"output_type": "stream",
40924092
"text": [
40934093
"\n",
4094-
" Family: 1372175\n"
4094+
" Family: 1058114\n"
40954095
]
40964096
}
40974097
],

0 commit comments

Comments
 (0)