configfile: "config.yml"
include: "rules/base.rules"
populate_metadata(config)
from snakemake.utils import validate
validate(config, "config.schema.yml")


include: "rules/reads.rules"
include: "rules/align.rules"
include: "rules/denovo.rules"
include: "rules/varcall.rules"
include: "rules/taxonid.rules"
include: "rules/metagenome.rules"
include: "rules/sampleset.rules"

rule all:
    input:
        rules.all_reads.input,
        rules.all_align.input,
        rules.all_varcall.input,
        rules.all_denovo.input,
        rules.all_taxonid.input,
        rules.all_megahit.input,


# This must always be put at the end. It scans all rules and updates their
# resource requests per the config file.
postprocess_rules(workflow, config)

# Unlike other code files in Acathophis, this file is placed in the public
# domain, so there are no restrictions on its modification. Specifically, these
# example files are licensed under the Creative Commons Zero licence, as that
# is a more portable concept of "public domain".
