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

Limit concurrent fauna connections to 2 #202

Merged
merged 2 commits into from
Jan 13, 2025
Merged
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
11 changes: 10 additions & 1 deletion workflow/snakemake_rules/download_from_fauna.smk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ titers = "data/{lineage}/{center}_{passage}_{assay}_titers.tsv"

'''

# Limit the number of concurrent fauna connections so that we are less likely
# to overwhelm the rethinkdb server.
# Inspired by the ncov's limit on concurrent deploy jobs
# <https://github.com/nextstrain/ncov/blob/20f5fc3c7032f4575a99745cee3238ecbeebb6e0/workflow/snakemake_rules/export_for_nextstrain.smk#L340-L362>
workflow.global_resources.setdefault("concurrent_fauna", 2)

# fields that will be canonicized by augur parse (upper/lower casing etc)

path_to_fauna = '../fauna'
Expand Down Expand Up @@ -42,11 +48,12 @@ def _get_virus_passage_category(wildcards):
return ""

rule download_sequences:
message: "Downloading sequences from fauna"
output:
sequences = "data/{lineage}/raw_{segment}.fasta"
params:
fasta_fields = config["fauna_fasta_fields"],
resources:
concurrent_fauna = 1
conda: "../envs/nextstrain.yaml"
benchmark:
"benchmarks/download_sequences_{lineage}_{segment}.txt"
Expand All @@ -71,6 +78,8 @@ rule download_titers:
dbs = _get_tdb_databases,
assays = _get_tdb_assays,
virus_passage_category=_get_virus_passage_category,
resources:
concurrent_fauna = 1
conda: "../envs/nextstrain.yaml"
benchmark:
"benchmarks/download_titers_{lineage}_{center}_{passage}_{assay}.txt"
Expand Down
Loading