# Use default configuration values. Override with Snakemake's --configfile/--config options.
configfile: "defaults/config.yaml"


rule all:
    input:
        "results/sequences.fasta",
        "results/metadata.tsv",


include: "rules/fetch_from_ncbi.smk"
include: "rules/curate.smk"
include: "rules/nextclade.smk"


rule clean:
    params:
        targets=[
            ".snakemake",
            "benchmarks",
            "data",
            "logs",
            "results",
        ],
    shell:
        """
        rm -rfv {params.targets}
        """


# Import custom rules provided via the config.
if "custom_rules" in config:
    for rule_file in config["custom_rules"]:

        include: rule_file
