Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable staged input files for the phylogenetic github action #50

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/phylogenetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ on:
type: string
sequences_url:
description: |
URL for a sequences.fasta.zst file.
URL for sequences_{serotype}.fasta.zst files where {serotype} will be replaced by all, denv1 to denv4.
If not provided, will use default sequences_url from phylogenetic/config/config_dengue.yaml
required: false
type: string
metadata_url:
description: |
URL for a metadata.tsv.zst file.
URL for metadata_{serotype}.tsv.zst files where {serotype} will be replaced by all, denv1 to denv4.
If not provided, will use default metadata_url from phylogenetic/config/config_dengue.yaml
required: false
type: string
Expand Down
6 changes: 6 additions & 0 deletions phylogenetic/config/config_dengue.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Sequences must be FASTA and metadata must be TSV
# Both files must be zstd compressed
# Both files must have a {serotype} expandable field to be replaced by all, denv1-denv4
sequences_url: "https://data.nextstrain.org/files/workflows/dengue/sequences_{serotype}.fasta.zst"
metadata_url: "https://data.nextstrain.org/files/workflows/dengue/metadata_{serotype}.tsv.zst"

strain_id_field: "genbank_accession"
display_strain_field: "strain"

Expand Down
4 changes: 2 additions & 2 deletions phylogenetic/rules/prepare_sequences.smk
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ rule download:
metadata = "data/metadata_{serotype}.tsv.zst"

params:
sequences_url = "https://data.nextstrain.org/files/workflows/dengue/sequences_{serotype}.fasta.zst",
metadata_url = "https://data.nextstrain.org/files/workflows/dengue/metadata_{serotype}.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