Skip to content

Commit

Permalink
Set final targets
Browse files Browse the repository at this point in the history
Set final targets to be the pair of metadata_denvX.tsv and sequences_denvX.fasta files.
  • Loading branch information
j23414 committed Dec 6, 2023
1 parent bd9b420 commit e638db2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ingest/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ if not config:

send_slack_notifications = config.get("send_slack_notifications", False)

serotypes = ['all', 'denv1', 'denv2', 'denv3', 'denv4']

def _get_all_targets(wildcards):
# Default targets are the metadata TSV and sequences FASTA files
all_targets = ["results/sequences.fasta", "results/metadata.tsv"]
all_targets = expand(["results/sequences_{serotype}.fasta", "results/metadata_{serotype}.tsv"], serotype=serotypes)

# Add additional targets based on upload config
upload_config = config.get("upload", {})
Expand Down
12 changes: 10 additions & 2 deletions ingest/config/optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ upload:
files_to_upload:
genbank.ndjson.xz: data/genbank.ndjson
all_sequences.ndjson.xz: data/sequences.ndjson
metadata.tsv.gz: results/metadata.tsv
sequences.fasta.xz: results/sequences.fasta
metadata_all.tsv.zst: results/metadata_all.tsv
sequences_all.fasta.zst: results/sequences_all.fasta
metadata_denv1.tsv.zst: results/metadata_denv1.tsv
sequences_denv1.fasta.zst: results/sequences_denv1.fasta
metadata_denv2.tsv.zst: results/metadata_denv2.tsv
sequences_denv2.fasta.zst: results/sequences_denv2.fasta
metadata_denv3.tsv.zst: results/metadata_denv3.tsv
sequences_denv3.fasta.zst: results/sequences_denv3.fasta
metadata_denv4.tsv.zst: results/metadata_denv4.tsv
sequences_denv4.fasta.zst: results/sequences_denv4.fasta
alignment.fasta.xz: data/alignment.fasta
insertions.csv.gz: data/insertions.csv
translations.zip: data/translations.zip
Expand Down
3 changes: 3 additions & 0 deletions ingest/workflow/snakemake_rules/nextclade.smk
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ rule split_dengue_sequences:
metadata="results/metadata.tsv",
nextclade_all_results="results/nextclade_results/nextclade_all.tsv",
output:
sequences_all="results/sequences_all.fasta",
sequences_denv1="results/sequences_denv1.fasta",
sequences_denv2="results/sequences_denv2.fasta",
sequences_denv3="results/sequences_denv3.fasta",
sequences_denv4="results/sequences_denv4.fasta",
shell:
"""
cp {input.sequences} {output.sequences_all}
augur filter \
--sequences {input.sequences} \
--metadata {input.nextclade_all_results} \
Expand Down

0 comments on commit e638db2

Please sign in to comment.