Skip to content

Commit

Permalink
Merge pull request #218 from nextstrain/fix-broken-links-14
Browse files Browse the repository at this point in the history
Fix broken links [#14]
  • Loading branch information
genehack authored Aug 6, 2024
2 parents 4b9325b + 3ff6ae8 commit 2804377
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- docutils
- recommonmark
- requests
- sphinx
- sphinx>=7.1
- sphinx-autobuild
- sphinx-markdown-tables
- sphinx-argparse
Expand Down
20 changes: 20 additions & 0 deletions src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,23 @@
'nextclade': ('https://docs.nextstrain.org/projects/nextclade/page/', None),
'ncov': ('https://docs.nextstrain.org/projects/ncov/page/', None)
}


# -- Linkchecking ------------------------------------------------------------
linkcheck_ignore = [
# we have links to localhost for explanatory purposes; obviously
# they will never work in the linkchecker
r'http://127.0.0.1:\d+',
r'http://localhost:\d+',
# these URLs block the client the linkchecker uses
r'https://www.pnas.org/doi/10.1073/pnas.1507071112',
r'https://www.ncbi.nlm.nih.gov/books/NBK25501',
# we specifically use this as an example of a link that _won't_ work
r'https://nextstrain.org/ncov/gisaid/21L/global/6m/2024-01-10',
]
linkcheck_anchors_ignore_for_url = [
# Github uses anchor-looking links for highlighting lines but
# handles the actual resolution with Javascript, so skip anchor
# checks for Github URLs:
r'https?://github.com',
]
8 changes: 4 additions & 4 deletions src/guides/share/groups/migrate-from-s3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ to inform them of these changes. A copy of the email is below.

Thank you for being an early adopter of Nextstrain Groups! We're excited
to keep improving the functionality of Groups. If you have any feedback,
please don't hesitate to `email us`_ or post to `discussions.nextstrain.org
<https://discussions.nextstrain.org>`__.
please don't hesitate to `email us`_ or post to `discussion.nextstrain.org
<https://discussion.nextstrain.org>`__.

—the Nextstrain team

Expand Down Expand Up @@ -248,8 +248,8 @@ migrated.

Thank you for being an early adopter of Nextstrain Groups! We're excited
to keep improving the functionality of Groups. If you have any feedback,
please don't hesitate to `email us`_ or post to `discussions.nextstrain.org
<https://discussions.nextstrain.org>`__.
please don't hesitate to `email us`_ or post to `discussion.nextstrain.org
<https://discussion.nextstrain.org>`__.

—the Nextstrain team

Expand Down
2 changes: 1 addition & 1 deletion src/guides/snapshots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Viewing all available (core) resources and their snapshots
available core datasets grouped by pathogen, as well as exposing all the known
snapshots for each resource. Next to each resource you'll see the total number
of available snapshots as well as an indication of how frequently the dataset is
updated, for instance at the time of writing `nextstrain.org/rsv/A/G <https://nextstrain.org/rsv/A/G>`__
updated, for instance at the time of writing `nextstrain.org/rsv/a/G <https://nextstrain.org/rsv/a/G>`__
had 82 snapshots and was being updated weekly:

.. image:: ../images/snapshots-listing-ui-hover.jpg
Expand Down
6 changes: 3 additions & 3 deletions src/learn/augur-to-auspice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ to see the available options here.
The most comprehensive description of this file is via
`its schema <https://nextstrain.org/schemas/auspice/config/v2>`__, however to
introduce this file here's a snippet of the `Auspice config JSON for the
measles dataset presented above <https://github.com/nextstrain/measles/blob/main/config/auspice_config.json>`__:
measles dataset presented above <https://github.com/nextstrain/measles/blob/main/phylogenetic/defaults/auspice_config.json>`__:

.. code-block:: json
Expand Down Expand Up @@ -535,7 +535,7 @@ A colors TSV file may be provided to ``augur export v2`` which is the
most common way to associate (discrete) values with actual colors. Such
a file has 3 tab-separated columns: the coloring key, the metadata
value, and the color hex; no headers are necessary. As an example, `here
are (some of) the colors TSV <https://github.com/nextstrain/measles/blob/main/config/colors.tsv>`__
are (some of) the colors TSV <https://github.com/nextstrain/measles/blob/main/phylogenetic/defaults/colors.tsv>`__
used in the measles build:

.. code-block:: text
Expand Down Expand Up @@ -757,7 +757,7 @@ The **maintainers** (array of dictionaries) is used in the Auspice
header to identify who created or maintains the dataset.

As an example, here's how the `measles auspice-config uses these
keys <https://github.com/nextstrain/measles/blob/main/config/auspice_config.json>`__
keys <https://github.com/nextstrain/measles/blob/main/phylogenetic/defaults/auspice_config.json>`__
and you can `see here <https://nextstrain.org/measles>`__ how Auspice
renders these:

Expand Down
2 changes: 1 addition & 1 deletion src/reference/documentation-style-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Do not use::
This is particularly important for unversioned subprojects (e.g. using
``latest``) which we might start versioning later.

.. _default version redirect: https://docs.readthedocs.io/en/stable/automatic-redirects.html#redirecting-to-a-page
.. _default version redirect: https://docs.readthedocs.io/en/stable/user-defined-redirects.html#page-redirects-at-page
2 changes: 1 addition & 1 deletion src/reference/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ There are two ways to work around this:

This provides easy compatibility with a broader set of bioinformatics packages, but comes at the cost of relatively longer run times for packages that have native ARM64 support.

2. Create a custom Conda environment that installs and runs packages under `Intel emulation <https://conda-forge.org/docs/user/tipsandtricks.html#installing-apple-intel-packages-on-apple-silicon>`__. Run this after setting up an **empty** Conda environment and before installing any packages to it:
2. Create a custom Conda environment that installs and runs packages under `Intel emulation <https://conda-forge.org/docs/user/tipsandtricks/#installing-apple-intel-packages-on-apple-silicon>`__. Run this after setting up an **empty** Conda environment and before installing any packages to it:

.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions src/tutorials/creating-a-bacterial-phylogenetic-workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Setup
.. note::

The data in this tutorial is public and is a subset of the data from Lee et al.'s 2015 paper `Population genomics of Mycobacterium tuberculosis in the Inuit <http://www.pnas.org/content/112/44/13609>`_. As location was anonymized in the paper, location data provided here was randomly chosen from the region for illustrative purposes.
The data in this tutorial is public and is a subset of the data from Lee et al.'s 2015 paper `Population genomics of Mycobacterium tuberculosis in the Inuit <https://www.pnas.org/doi/10.1073/pnas.1507071112>`_. As location was anonymized in the paper, location data provided here was randomly chosen from the region for illustrative purposes.

Create the Nextstrain Build
===========================
Expand Down Expand Up @@ -307,7 +307,7 @@ Reconstruct Ancestral Traits
Identify Specified Clades
~~~~~~~~~~~~~~~~~~~~~~~~~

In the `original paper <http://www.pnas.org/content/112/44/13609>`_, the authors identified 'sublineages' within the dataset. We can add these to our dataset as 'clades' by defining the sublineages with amino-acid or nucleotide mutations specific to that sublineage, given here in the file ``config/clades.tsv``. Open it up in a text editor to have a look at the format.
In the `original paper <https://www.pnas.org/doi/10.1073/pnas.1507071112>`_, the authors identified 'sublineages' within the dataset. We can add these to our dataset as 'clades' by defining the sublineages with amino-acid or nucleotide mutations specific to that sublineage, given here in the file ``config/clades.tsv``. Open it up in a text editor to have a look at the format.

The ``clades.tsv`` file must be tab-delimited with four columns: clade, gene, site, and alt. The 'clade' column gives the name of the clade being defined - you can have more than one row per clade - it will only be defined from the branch where all criteria are met. The 'gene' and 'site' columns specify the gene (or ``nuc`` for nucleotide) and location (by AA position in the gene, or nucleotide position in the genome) where the branch must have the 'alt' (4th column) value to be considered this clade.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ If you write a custom script that follows the same pattern, you can add your scr
curation pipeline before the final ``augur curate apply-record-annotations`` command.

A typical pathogen-specific step for curation is the standardization of strain names since pathogens usually have different naming conventions
(e.g. `influenza <https://www.cdc.gov/flu/about/viruses/types.htm#naming-influenza-viruses>`_ vs `measles <https://www.cdc.gov/measles/lab-tools/genetic-analysis.html#guide>`_).
(e.g. `influenza <https://www.cdc.gov/flu/about/viruses/types.htm>`_ vs `measles <https://www.cdc.gov/measles/php/laboratories/genetic-analysis.html#cdc_generic_section_3-guidelines-for-naming-measles-strains-or-sequences>`_).
For example, we've added a step in the curation pipeline to normalize the strain names for the `Zika ingest workflow <https://github.com/nextstrain/zika/tree/main/ingest>`_.

1. We added a `custom Python script <https://github.com/nextstrain/zika/blob/a91e575bff38f154390c9eb11a44a89abf95a55b/ingest/bin/fix-zika-strain-names.py>`_
Expand Down

0 comments on commit 2804377

Please sign in to comment.