Skip to content

Commit

Permalink
Merge pull request #284 from nextstrain/fix-clade-i
Browse files Browse the repository at this point in the history
Fix Clade I build
  • Loading branch information
joverlee521 authored Oct 31, 2024
2 parents 4ce0b5b + 831138b commit cddd5f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phylogenetic/defaults/clade-i/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ auspice_name: "mpox_clade-I"
filter:
min_date: 1900
min_length: 100000
exclude_where: 'clade!=I'


### We don't want to subsample, so specify a config which is essentially a no-op
### Filter to only Clade I sequences
subsample:
everything:
group_by: ""
sequences_per_group: ""
query: "'clade in [\"I\", \"Ia\", \"Ib\"]'"

## align
max_indel: 10000
Expand Down
6 changes: 6 additions & 0 deletions phylogenetic/rules/prepare_sequences.smk
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ rule subsample:
sequences_per_group=lambda w: config["subsample"][w.sample][
"sequences_per_group"
],
query=lambda w: (
f"--query {config['subsample'][w.sample]['query']}"
if "query" in config["subsample"][w.sample]
else ""
),
other_filters=lambda w: config["subsample"][w.sample].get("other_filters", ""),
exclude=lambda w: (
f"--exclude-where {' '.join([f'lineage={l}' for l in config['subsample'][w.sample]['exclude_lineages']])}"
Expand All @@ -113,6 +118,7 @@ rule subsample:
--output-strains {output.strains} \
{params.group_by} \
{params.sequences_per_group} \
{params.query} \
{params.exclude} \
{params.other_filters} \
--output-log {output.log}
Expand Down

0 comments on commit cddd5f2

Please sign in to comment.