From a7932fb0359585db9daf6c7e21504868929377e7 Mon Sep 17 00:00:00 2001 From: Victor Lin Date: Wed, 25 Feb 2026 13:15:27 -0800 Subject: [PATCH 1/2] Set threads for augur subsample Take advantage of built-in parallelism. --- src/guides/bioinformatics/filtering-and-subsampling.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/guides/bioinformatics/filtering-and-subsampling.rst b/src/guides/bioinformatics/filtering-and-subsampling.rst index 5df0215..e65e9e1 100644 --- a/src/guides/bioinformatics/filtering-and-subsampling.rst +++ b/src/guides/bioinformatics/filtering-and-subsampling.rst @@ -529,7 +529,7 @@ Below is an example of how it can be used in Snakemake. .. code-block:: python import yaml - from augur.subsample import get_referenced_files + from augur.subsample import get_referenced_files, get_parallelism with open("results/subsample_config.yaml", "w") as f: yaml.dump(config["builds"]["build1"]["subsample"], f, sort_keys=False) @@ -541,11 +541,13 @@ Below is an example of how it can be used in Snakemake. referenced_files = get_referenced_files("results/subsample_config.yaml"), output: metadata = "results/subsampled.tsv", + threads: get_parallelism("results/subsample_config.yaml", limit=workflow.cores) shell: """ augur subsample \ --metadata {input.metadata} \ --config {input.config} \ + --nthreads {threads} \ --output-metadata {output.metadata} """ @@ -556,6 +558,10 @@ Below is an example of how it can be used in Snakemake. using it ensures that changes to those files will trigger this rule to re-run. + :py:func:`augur.subsample.get_parallelism` is a helper function that returns + the degree of parallelism based on the ``augur subsample`` config. While optional, + using it allows Snakemake to allocate an optimal amount of threads. + Other options (less ideal): - Maintain a separate YAML dedicated to ``augur subsample``. This is not ideal From b30e0bdb75026dfbd7bf372c62c55d3018cad96b Mon Sep 17 00:00:00 2001 From: Victor Lin Date: Wed, 25 Feb 2026 13:19:46 -0800 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9B=94=EF=B8=8F=20use=20docs=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.py b/src/conf.py index d1c2360..0c84ced 100644 --- a/src/conf.py +++ b/src/conf.py @@ -79,7 +79,7 @@ # -- Cross-project references ------------------------------------------------ intersphinx_mapping = { - 'augur': ('https://docs.nextstrain.org/projects/augur/page/', None), + 'augur': ('https://nextstrain--1963.org.readthedocs.build/projects/augur/en/1963/', None), 'auspice': ('https://docs.nextstrain.org/projects/auspice/page/', None), 'cli': ('https://docs.nextstrain.org/projects/cli/page/', None), 'nextclade': ('https://docs.nextstrain.org/projects/nextclade/page/', None),