diff --git a/ingest/Snakefile b/ingest/Snakefile index 7163a3e..c8a48f3 100644 --- a/ingest/Snakefile +++ b/ingest/Snakefile @@ -20,6 +20,7 @@ rule upload_all: input: sequences=expand("fauna/s3/sequences_{segment}.done", segment=config["segments"]), metadata="fauna/s3/metadata.done", + nextclade="fauna/s3/nextclade.done", include: "rules/ingest_fauna.smk" include: "rules/merge_segment_metadata.smk" diff --git a/ingest/build-configs/ncbi/Snakefile b/ingest/build-configs/ncbi/Snakefile index c1052d9..a8856f0 100644 --- a/ingest/build-configs/ncbi/Snakefile +++ b/ingest/build-configs/ncbi/Snakefile @@ -40,6 +40,7 @@ rule upload_all_ncbi: expand([ "{data_source}/s3/sequences_{segment}.done", "{data_source}/s3/metadata.done", + "{data_source}/s3/nextclade.done", ], data_source=NCBI_DATA_SOURCES, segment=config["segments"]), diff --git a/ingest/rules/upload_to_s3.smk b/ingest/rules/upload_to_s3.smk index 5fb123c..a9c309a 100644 --- a/ingest/rules/upload_to_s3.smk +++ b/ingest/rules/upload_to_s3.smk @@ -37,3 +37,21 @@ rule upload_metadata: {params.s3_dst:q}/metadata.tsv.zst \ {params.cloudfront_domain} 2>&1 | tee {output.flag} """ + + +rule upload_nextclade_tsv: + input: + nextclade="{data_source}/results/nextclade.tsv", + output: + flag="{data_source}/s3/nextclade.done", + params: + s3_dst=lambda wildcards: config["s3_dst"][wildcards.data_source], + cloudfront_domain=config.get("cloudfront_domain", ""), + shell: + """ + ./vendored/upload-to-s3 \ + --quiet \ + {input.nextclade:q} \ + {params.s3_dst:q}/nextclade.tsv.zst \ + {params.cloudfront_domain} 2>&1 | tee {output.flag} + """