From 0b026174bca907a85eccfcd841d2e4f9e6782300 Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Sun, 19 May 2024 13:18:00 -0400 Subject: [PATCH] fix: enable staged input files for phylogenetic github action --- phylogenetic/config/config_dengue.yaml | 6 ++++++ phylogenetic/rules/prepare_sequences.smk | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phylogenetic/config/config_dengue.yaml b/phylogenetic/config/config_dengue.yaml index 5d2e14a9..a110c969 100644 --- a/phylogenetic/config/config_dengue.yaml +++ b/phylogenetic/config/config_dengue.yaml @@ -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" diff --git a/phylogenetic/rules/prepare_sequences.smk b/phylogenetic/rules/prepare_sequences.smk index b9521a4c..7f651b68 100644 --- a/phylogenetic/rules/prepare_sequences.smk +++ b/phylogenetic/rules/prepare_sequences.smk @@ -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}