def _check_jointcaller(data): """Ensure specified jointcaller is valid. """ allowed = set(joint.get_callers() + [None, False]) cs = data["algorithm"].get("jointcaller", []) if not isinstance(cs, (tuple, list)): cs = [cs] problem = [x for x in cs if x not in allowed] if len(problem) > 0: raise ValueError("Unexpected algorithm 'jointcaller' parameter: %s\n" "Supported options: %s\n" % (problem, sorted(list(allowed))))