Skip to content

Commit

Permalink
phylo: add quality filters and clades to builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rneher committed Dec 13, 2023
1 parent 208c265 commit b260651
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
5 changes: 0 additions & 5 deletions config/auspice_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
"build_url": "https://github.com/nextstrain/rsv",

"colorings": [
{
"key": "genome_clade",
"title": "Genome Clade",
"type": "categorical"
},
{
"key": "gt",
"title": "Genotype",
Expand Down
3 changes: 0 additions & 3 deletions ingest/workflow/snakemake_rules/sort.smk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ It produces output files as
"""

TIME = ['1', '2','3']


rule sort:
input:
sequences = rules.transform.output.sequences
Expand Down
1 change: 1 addition & 0 deletions workflow/snakemake_rules/core.smk
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ rule filter:
--metadata {input.metadata} \
--metadata-id-columns {params.strain_id} \
--exclude {input.exclude} \
--exclude-where 'qc.overallStatus=bad' \
--output {output.sequences} \
--group-by {params.group_by} \
--subsample-max-sequences {params.subsample_max_sequences} \
Expand Down
7 changes: 3 additions & 4 deletions workflow/snakemake_rules/export.smk
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ def get_node_data(w):
if w.build_name in config["genesforglycosylation"]:
node_data.append(rules.glycosylation.output.glycosylations)
if w.build_name == "genome":
node_data.append(rules.clades_genome.output.node_data)
node_data.append(rules.clades_consortium.output.node_data)
if w.build_name in ["genome", "G"]:
node_data.append(rules.clades_Goya.output.node_data)

return node_data

rule colors:
Expand Down Expand Up @@ -43,11 +41,12 @@ rule export:
params:
title = lambda w: f"RSV-{w.a_or_b.upper()} phylogeny",
strain_id=config["strain_id_field"],
metadata_colors = lambda w: '' if w.build_name=='genome' else f"--color-by-metadata clade"
shell:
"""
augur export v2 \
--tree {input.tree} \
--metadata {input.metadata} \
--metadata {input.metadata} {params.metadata_colors} \
--metadata-id-columns {params.strain_id} \
--node-data {input.node_data} \
--title {params.title:q} \
Expand Down

0 comments on commit b260651

Please sign in to comment.