Skip to content

Commit

Permalink
phylogenetic: Move input URLs to config YAML
Browse files Browse the repository at this point in the history
Allows us to easily update the input URLs both from the config YAML
and `--config` args.

This is mostly motivated by the desire to run phylogenetic builds
from trial ingest outputs.
  • Loading branch information
joverlee521 committed Apr 12, 2024
1 parent fa3ba47 commit 27c6557
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions phylogenetic/defaults/config_zika.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Sequences must be FASTA and metadata must be TSV
# Both files must be zstd compressed
sequences_url: "https://data.nextstrain.org/files/workflows/zika/sequences.fasta.zst"
metadata_url: "https://data.nextstrain.org/files/workflows/zika/metadata.tsv.zst"

strain_id_field: "accession"
display_strain_field: "strain"

Expand Down
6 changes: 3 additions & 3 deletions phylogenetic/rules/prepare_sequences.smk
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ rule download:
sequences = "data/sequences.fasta.zst",
metadata = "data/metadata.tsv.zst"
params:
sequences_url = "https://data.nextstrain.org/files/workflows/zika/sequences.fasta.zst",
metadata_url = "https://data.nextstrain.org/files/workflows/zika/metadata.tsv.zst"
sequences_url = config["sequences_url"],
metadata_url = config["metadata_url"],
shell:
"""
curl -fsSL --compressed {params.sequences_url:q} --output {output.sequences}
Expand Down Expand Up @@ -101,4 +101,4 @@ rule align:
--output {output.alignment} \
--fill-gaps \
--remove-reference
"""
"""

0 comments on commit 27c6557

Please sign in to comment.