|
| 1 | +# The bulk of the rules are generic and are located in the (included) generic.snakefile |
| 2 | +# It needs inputs of "results/{species}/sequences.fasta" and "results/{species}/metadata.tsv" |
| 3 | +# which we provision in this file |
| 4 | + |
| 5 | +from pathlib import Path |
| 6 | +REPO = Path(workflow.current_basedir).parent.parent |
| 7 | + |
| 8 | +config['sequences'] = REPO / "ingest/results/{species}/sequences.fasta", |
| 9 | +config['metadata'] = REPO / "ingest/results/{species}/metadata.tsv", |
| 10 | +config['exclude'] = REPO / "phylogenetic" / "species-workflows" / "exclude_bdbv.txt" |
| 11 | +config['id_column'] = "accession" |
| 12 | +config['species'] = ['bdbv'] |
| 13 | +config['qc_min_length'] = 5_000 |
| 14 | +# config['treetime_args'] = "--timetree --clock-filter-iqd 0 --root best --precision 3 --max-iter 5", |
| 15 | +config['treetime_args'] = "--root mid_point" |
| 16 | +config['cds'] = ["NP", "VP35", "VP40", "GP", "GP_003", "VP30", "VP24", "L"] |
| 17 | +config['id_column'] = "accession" |
| 18 | +config['genbank_reference'] = REPO / "shared" / "bdbv" / "reference.gb" |
| 19 | +config['fasta_reference'] = REPO / "shared" / "bdbv" / "reference.fasta" |
| 20 | +config['gff_annotation'] = REPO / "shared" / "bdbv" / "annotation.gff" |
| 21 | +config['nextclade_pathogen_json'] = REPO / "nextclade" / "dataset_files" / "bdbv" / "pathogen.json" |
| 22 | +config['warning'] = "This dataset sources RESTRICTED sequences from [Pathoplexus](https://pathoplexus.org/). Please see [virological](https://virological.org/t/initial-genomes-from-may-2026-bundibugyo-virus-disease-outbreak-in-the-democratic-republic-of-the-congo-and-uganda/1032) for more detail on the ongoing outbreak in DRC & Uganda." |
| 23 | + |
| 24 | +# Define an input function so that species can vary which node-data files are generated/used |
| 25 | +def node_data_files(wildcards): |
| 26 | + return [ |
| 27 | + "results/{species}/branch_lengths.json", |
| 28 | + "results/{species}/muts.json", |
| 29 | + "results/{species}/sampling-year.json", |
| 30 | + ] |
| 31 | + |
| 32 | +include: "generic.snakefile" |
| 33 | + |
| 34 | +rule all: |
| 35 | + input: |
| 36 | + tree=expand("auspice/ebola_{species}.json", species=config['species']), |
| 37 | + |
0 commit comments