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
$ grapetree -h | grep "\--method" -A 6
usage: grapetree [-h] --profile FNAME [--method TREE] [--matrix MATRIX_TYPE]
[--recraft] [--missing HANDLER] [--wgMLST]
[--heuristic HEURISTIC] [--n_proc NUMBER_OF_PROCESSES]
[--check] [--block_penalty BLOCK_PENALTY]
For details, see "https://github.com/achtman-lab/GrapeTree/blob/master/README.md".
In brief, GrapeTree generates a NEWICK tree to the default output (screen)
--
--method TREE, -m TREE
"MSTreeV2" [DEFAULT]
"MSTree"
"NJ": FastME V2 NJ tree
"RapidNJ": RapidNJ for very large datasets
"ninja": Alternative NJ algorithm for very large datasets
"distance": allelic distance matrix in PHYLIP format.
The -c or --check option to only calculate the expected time/memory requirements works for just the first four methods:
$ for M in MSTreeV2 MSTree NJ RapidNJ ninja distance; do echo $M; grapetree -p Grapetree_Agona.profile -m $M -c; done
MSTreeV2
{"time": 33.77119490714262, "memory": 517090823.53, "affordable": true}
MSTree
{"time": 32.64200608256635, "memory": 429867607.233, "affordable": true}
NJ
{"time": 5, "memory": 52428800, "affordable": true}
RapidNJ
{"time": 32.64200608256635, "memory": 429867607.233, "affordable": true}
ninja
Traceback (most recent call last):
File "/mnt/.../conda/bin/grapetree", line 8, in <module>
sys.exit(main())
File "/mnt/.../conda/lib/python3.7/site-packages/grapetree/grapetree.py", line 62, in main
print (backend(**add_args()))
File "/mnt/s.../conda/lib/python3.7/site-packages/grapetree/module/MSTrees.py", line 721, in backend
time, memory = estimate_Consumption(platform.system(), params['method'], params['matrix_type'], int(params['n_proc']), profiles.shape[1], profiles.shape[0])
File "/mnt/.../conda/lib/python3.7/site-packages/grapetree/module/MSTrees.py", line 786, in estimate_Consumption
return max(time, 5), max(memory, 50*1024*1024)
UnboundLocalError: local variable 'time' referenced before assignment
distance
Traceback (most recent call last):
File "/mnt/.../conda/bin/grapetree", line 8, in <module>
sys.exit(main())
File "/mnt/.../conda/lib/python3.7/site-packages/grapetree/grapetree.py", line 62, in main
print (backend(**add_args()))
File "/mnt/.../conda/lib/python3.7/site-packages/grapetree/module/MSTrees.py", line 721, in backend
time, memory = estimate_Consumption(platform.system(), params['method'], params['matrix_type'], int(params['n_proc']), profiles.shape[1], profiles.shape[0])
File "/mnt/.../conda/lib/python3.7/site-packages/grapetree/module/MSTrees.py", line 786, in estimate_Consumption
return max(time, 5), max(memory, 50*1024*1024)
UnboundLocalError: local variable 'time' referenced before assignment
The estimate_Consumption if statement needs an else statement for methods without an estimate here:
Tested on Linux,
There are 6 documented methods:
The
-c
or--check
option to only calculate the expected time/memory requirements works for just the first four methods:The estimate_Consumption if statement needs an else statement for methods without an estimate here:
GrapeTree/module/MSTrees.py
Line 781 in f92fe3e
The text was updated successfully, but these errors were encountered: