Skip to content

Commit

Permalink
ingest: move Nextclade dataset to data/ and outputs to results/
Browse files Browse the repository at this point in the history
Move the downloaded Nextclade dataset to the `data/` directory so that
it's automatically ignored by git.

Move Nextclade outputs to `results` as they are part of the final
outputs of the ingest workflow.
  • Loading branch information
joverlee521 committed Oct 18, 2024
1 parent 3850af5 commit cbcc7d4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ingest/rules/nextclade.smk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

rule get_nextclade_dataset:
output:
temp("mpxv.zip"),
temp("data/mpxv.zip"),
params:
dataset_name="MPXV",
shell:
Expand All @@ -15,15 +15,15 @@ rule get_nextclade_dataset:
rule run_nextclade:
input:
sequences="results/sequences.fasta",
dataset="mpxv.zip",
dataset="data/mpxv.zip",
output:
nextclade="data/nextclade.tsv",
alignment="data/alignment.fasta",
translations="data/translations.zip",
nextclade="results/nextclade.tsv",
alignment="results/alignment.fasta",
translations="results/translations.zip",
params:
# The lambda is used to deactivate automatic wildcard expansion.
# https://github.com/snakemake/snakemake/blob/384d0066c512b0429719085f2cf886fdb97fd80a/snakemake/rules.py#L997-L1000
translations=lambda w: "data/translations/{cds}.fasta",
translations=lambda w: "results/translations/{cds}.fasta",
threads: 4
shell:
r"""
Expand All @@ -36,13 +36,13 @@ rule run_nextclade:
--output-fasta {output.alignment:q} \
--output-translations {params.translations:q}
zip -rj {output.translations:q} data/translations
zip -rj {output.translations:q} results/translations
"""


rule join_metadata_clades:
input:
nextclade="data/nextclade.tsv",
nextclade="results/nextclade.tsv",
metadata="data/subset_metadata.tsv",
nextclade_field_map=config["nextclade"]["field_map"],
output:
Expand Down

0 comments on commit cbcc7d4

Please sign in to comment.