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), 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