diff --git a/phylogenetic/build-configs/ci/config.yaml b/phylogenetic/build-configs/ci/config.yaml index f58e32f..1bfdef7 100644 --- a/phylogenetic/build-configs/ci/config.yaml +++ b/phylogenetic/build-configs/ci/config.yaml @@ -2,6 +2,7 @@ custom_rules: - build-configs/ci/copy_example_data.smk reference: "defaults/reference.fasta" +ancestral_root_seq: "defaults/reference.fasta" genome_annotation: "defaults/genome_annotation.gff3" genbank_reference: "defaults/reference.gb" include: "defaults/hmpxv1/include.txt" diff --git a/phylogenetic/rules/annotate_phylogeny.smk b/phylogenetic/rules/annotate_phylogeny.smk index 9dea6a3..ccb2414 100644 --- a/phylogenetic/rules/annotate_phylogeny.smk +++ b/phylogenetic/rules/annotate_phylogeny.smk @@ -31,13 +31,19 @@ rule ancestral: node_data=build_dir + "/{build_name}/nt_muts.json", params: inference="joint", + root_sequence=lambda w: ( + f"--root-sequence {config['ancestral_root_seq']!r}" + if config.get("ancestral_root_seq") + else "" + ), shell: """ augur ancestral \ --tree {input.tree} \ --alignment {input.alignment} \ --output-node-data {output.node_data} \ - --inference {params.inference} + --inference {params.inference} \ + {params.root_sequence} """