예제 #1
0
def get_common_template_args(config: Dict) -> Dict[str, Any]:
    """
    Each placement query has a template name based on two type of inputs:
    1) common arguments: tree and query sequences -- independent of software
    2) specific arguments: model params etc. -- depends on software used

    This method creates a dict of common template arguments that can be passed to
    'expand' function of snakemake to resolve the common query name template given
    by get_common_queryname_template().
    """

    if cfg.get_mode(config) == cfg.Mode.LIKELIHOOD:
        return {
            "pruning": ["0"],
            "length": ["0"],
            "query": fasta.get_sequence_ids(config["query_user"])
        }
    else:
        return {
            "pruning": range(config["pruning_count"]),
            "length": config["read_length"]
        }
예제 #2
0
def get_name_prefix(config: Dict) -> str:
    return "query" if cfg.get_mode(
        config) == cfg.Mode.LIKELIHOOD else "pruning"