INNER CODE UNIT · Python
return_algorithm_choices
nickjcroucher/gubbins · python/gubbins/common.py:802
def return_algorithm_choices(args,i):
# Check that at least 2 iterations will be run if customised options for 1st iteration
if args.iterations == 1:
if args.first_tree_builder is not None or args.first_model \
or args.custom_first_model is not None or args.first_tree_args is not None:
sys.stderr.write('Please do not use options specific to the first iteration when'
' only one iteration is to be run\n')
sys.exit()
# Check on first tree builder
if args.first_tree_builder is not None:
# Raise error if first tree builder and starting tree
if args.starting_tree is not None:
sys.stderr.write('Initial tree builder is not used if a starting tree is provided\n')
sys.exit()
# Pick tree builder
if args.first_tree_builder is not None and i==1:
current_tree_builder = args.first_tree_builder
extra_tree_arguments = args.first_tree_args