diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..d47df9d
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,36 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first three.
+SPHINXOPTS ?=
+SPHINXBUILD ?= sphinx-build
+BUILDDIR ?= build
+SOURCEDIR = src
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help help-docker Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+livehtml:
+ sphinx-autobuild -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.ONESHELL:
+docker-html:
+ set -euox
+ docker build -t nextstrain-docs-builder --network=host .
+ docker run -it --rm \
+ --name=nextstrain-docs-builder-$(shell date +%s) \
+ --init \
+ --user=$(shell id -u):$(shell id -g) \
+ --volume=$(shell pwd):/home/user/src \
+ --workdir=/home/user/src \
+ --env 'TERM=xterm-256colors' \
+ nextstrain-docs-builder
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..a8335ed
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,56 @@
+# Docs about Zika Docs
+
+
+## Dependencies
+
+in `conda.yml` - install these in the same environment you run augur in
+
+## Testing (WIP!)
+
+To test with nextstrain run we either need to symlink the checked out repo:
+
+```bash
+mkdir ~/.nextstrain/pathogens/zika
+ln -sv ~/github/nextstrain/zika ~/.nextstrain/pathogens/zika/local=NRXWGYLM
+```
+
+and check it's installed:
+
+```console
+$ nextstrain version --pathogens
+Nextstrain CLI 10.2.1.post1+git
+
+Pathogens
+ ...
+
+ zika
+ zika@local (default)
+```
+
+or you should be able to use `nextstrain setup` from this branch (UNTESTED!)
+
+```bash
+nextstrain setup 'zika@james/docs-prototyping'
+```
+
+> Assumptions:
+> 1. That we installed using the symlink method, if not replace `zika@local` with `zika@james/docs-prototyping`
+> 2. That you've installed the docs dependencies (see above) into the nextstrain runtime you want to use. The following commands use `--ambient`
+> 3. That you're running from an external analysis directory (shouldn't matter, but easier to clean up if things go wrong)
+
+We then need to build the docs - in the future this step will be done during `nextstrain setup`, or when we build the image for a repo (via buildpacks etc etc), or some other way - but for now we can achieve this in a ad-hoc way:
+
+```bash
+nextstrain run --ambient zika@local docs . build
+```
+
+And then open the docs (might only work on MacOS). Long term we wouldn't use `nextstrain run` for this, we'd have a nicer interface like `nextstrain docs zika@local`.
+
+```bash
+nextstrain run --ambient zika@local docs . open
+```
+
+## Helpful commands:
+* `make html && open build/html/index.html`
+* `make livehtml`
+* `make clean`
\ No newline at end of file
diff --git a/docs/Snakefile b/docs/Snakefile
new file mode 100644
index 0000000..897efe3
--- /dev/null
+++ b/docs/Snakefile
@@ -0,0 +1,19 @@
+# -----------------------------------------------------------------------------
+# This snakefile is an ad-hoc way to test out concepts for docs using nextstrain run
+# -----------------------------------------------------------------------------
+
+rule build:
+ params: workflow.basedir
+ shell:
+ r"""
+ cd {params[0]}
+ make clean && make html
+ """
+
+rule open:
+ # open is MacOS specific I think?
+ params: workflow.basedir
+ shell:
+ r"""
+ open {params[0]}/build/html/index.html
+ """
diff --git a/docs/conda.yml b/docs/conda.yml
new file mode 100644
index 0000000..0c7a13f
--- /dev/null
+++ b/docs/conda.yml
@@ -0,0 +1,18 @@
+name: ncov-docs
+channels:
+ - defaults
+dependencies:
+ - make
+ - pip
+ - pip:
+ - nextstrain-sphinx-theme>=2022.5
+ - recommonmark
+ - requests
+ - sphinx
+ - docutils
+ - sphinx-argparse
+ - sphinx-autobuild
+ - sphinx-copybutton
+ - sphinx-markdown-tables
+ - sphinx-tabs
+ - PyYAML
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000..6162957
--- /dev/null
+++ b/docs/make.bat
@@ -0,0 +1,37 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+if "%BUILDDIR%" == "" (
+ set BUILDDIR=build
+)
+set SOURCEDIR=src
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.http://sphinx-doc.org/
+ exit /b 1
+)
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/docs/src/_static/css/configuration-reference.css b/docs/src/_static/css/configuration-reference.css
new file mode 100644
index 0000000..fe44fd4
--- /dev/null
+++ b/docs/src/_static/css/configuration-reference.css
@@ -0,0 +1,29 @@
+/* Custom CSS to be applied to the reference/workflow-config-file.rst
+ page. That page defines a custom class of .configuration-reference */
+
+
+/* We detail a lot of nested (snakemake) configuration entries in the
+page. The parent key (top-level config key) is
and sub-keys are .
+The default nextstrain-theme renders and extremely similarly.
+The following style changes are intended to convey that certain config
+entries are children of a higher-level config, rather than being top-level
+config parameters themselves */
+
+.configuration-reference h4 {
+ font-size: 100%;
+}
+
+/* Pad lists generated by a (local) contents directive showing sub-keys */
+.configuration-reference section > section > div.contents.local.topic {
+ margin-left: 24px; /* same as a nested
*/
+ margin-top: -20px; /* CSS can't select previous sibling, FYI */
+}
+.configuration-reference section > section > div.contents.local.topic > ul > li {
+ list-style: circle;
+}
+/* pad out their siblings (which come _after_ the list) so that they
+ are in line with the start of text in the preceding element */
+.configuration-reference section > section > div.contents.local.topic ~ * {
+ margin-left: 48px;
+}
+
diff --git a/docs/src/conf.py b/docs/src/conf.py
new file mode 100644
index 0000000..fef74f5
--- /dev/null
+++ b/docs/src/conf.py
@@ -0,0 +1,155 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+import os
+import sys
+sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+from datetime import date
+import subprocess
+
+def git_authors():
+ result = subprocess.run(
+ ["git", "shortlog", "--summary", "HEAD"],
+ stdout = subprocess.PIPE,
+ check = True)
+
+ names = [
+ line.strip().split("\t")[1]
+ for line in result.stdout.decode("utf-8").splitlines()
+ ]
+
+ return names
+
+def prose_list(items):
+ if not items:
+ return ""
+ if len(items) == 1:
+ return items[0]
+ elif len(items) == 2:
+ return " and ".join(items)
+ else:
+ return ", ".join([*items[0:-1], "and " + items[-1]])
+
+project = 'Zika Workflow'
+#TODO copyright date change? copied from augur
+copyright = '2014–%d Trevor Bedford and Richard Neher' % (date.today().year)
+author = prose_list(git_authors())
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'recommonmark',
+ 'sphinx.ext.autodoc',
+ 'sphinxarg.ext',
+ 'sphinx.ext.graphviz',
+ 'sphinx.ext.napoleon',
+ 'sphinx_markdown_tables',
+ 'sphinx.ext.intersphinx',
+ 'nextstrain.sphinx.theme',
+ 'extensions.config_value_role',
+ 'extensions.snakemake_dag',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# Add external directories to the source path
+# This allows including RST files from outside the docs/src directory
+html_extra_path = ['../../shared/vendored']
+
+# A string of reStructuredText that will be included at the end of every source
+# file that is read. This is a possible place to add substitutions that should
+# be available in every file.
+rst_epilog = f"""
+.. |authors| replace:: {author}
+"""
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'nextstrain-sphinx-theme'
+
+html_theme_options = {
+ 'logo_only': False, # if True, don't display project name at top of the sidebar
+ 'collapse_navigation': False, # if True, no [+] icons in sidebar
+ 'titles_only': True, # if True, page subheadings not included in nav
+}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# These paths are either relative to html_static_path
+# or fully qualified paths (eg. https://...)
+html_css_files = [
+ 'css/custom.css',
+ 'css/configuration-reference.css'
+]
+
+# -- Cross-project references ------------------------------------------------
+
+intersphinx_mapping = {
+ 'docs.nextstrain.org': ('https://docs.nextstrain.org/en/latest/', None),
+ 'augur': ('https://docs.nextstrain.org/projects/augur/en/stable', None),
+ 'auspice': ('https://docs.nextstrain.org/projects/auspice/en/stable', None),
+ 'snakemake': ('https://snakemake.readthedocs.io/en/stable', 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+',
+ # the top level bucket link 404s
+ r'^https://data\.nextstrain\.org$',
+ # they block the client, probably anti-scraping measure
+ r'^https://czgenepi\.org/resources',
+ r'^https://science\.sciencemag\.org/content/early/2020/06/05/science\.abb9263',
+ # this link is correct but the lack of a top-level dataset means
+ # it 404s initially — because the point of this link is showing
+ # the community page, allow it to fail here:
+ r'^https://nextstrain\.org/community/ESR-NZ/GenomicsNarrativeSARSCoV2$'
+]
+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',
+ # you need to be logged in to see the anchor (and it looks like
+ # Terra is using it for redirecting more than anchoring too…)
+ r'^https://app\.terra\.bio/',
+ # client is blocked but links work
+ r'^https://www\.science\.org/doi/10\.1126/science\.abb9263',
+ # linkchecker doesn't support text fragments, and we link to one
+ # anchored to this page
+ r'^https://en\.wikipedia\.org/wiki/Consensus_sequence',
+]
diff --git a/docs/src/customise.rst b/docs/src/customise.rst
new file mode 100644
index 0000000..c8f8166
--- /dev/null
+++ b/docs/src/customise.rst
@@ -0,0 +1,32 @@
+*****************************************************************
+Customisation of workflow: using your own data
+*****************************************************************
+
+.. note::
+ Text mostly lifted from Avian flu docs for expediency
+
+
+
+The aim is to allow easy customisation of the workflow via config overlays. This includes defining the data inputs, modification of parameters (e.g. clock rates, minimum lengths, subsampling criteria, DTA metadata) is possible through overlays without needing to modify the underlying base config or Snakemake pipeline itself.
+
+Config overlays allow you to essentially maintain one or more modifications of the workflow for your own purposes. Using an overlay keeps this change separate from the config used for Nextstrain automation
+
+
+We'll start by creating a config (overlay) YAML, ``config.yaml`` in our analysis directory
+
+.. note::
+ You can choose a different name for the file, but if you do you'll have to supply it to the command via --configfile as only config.yaml will be automatically detected.
+
+Currently the default inputs for the workflow are:
+
+:configvalue:`phylogenetic/defaults/config.yaml:inputs`
+
+
+Let's add a similar block in our custom ``config.yaml`` defining some additional inputs:
+
+.. code-block:: yaml
+
+ additional_inputs:
+ - name: unreleased-data
+ metadata: https://data.nextstrain.org/something.tsv.zst
+ sequences: https://data.nextstrain.org/something.fasta.zst
diff --git a/docs/src/extensions/__init__.py b/docs/src/extensions/__init__.py
new file mode 100644
index 0000000..29653e9
--- /dev/null
+++ b/docs/src/extensions/__init__.py
@@ -0,0 +1 @@
+# Extensions package for Sphinx documentation
\ No newline at end of file
diff --git a/docs/src/extensions/config_value_role.py b/docs/src/extensions/config_value_role.py
new file mode 100644
index 0000000..4f54414
--- /dev/null
+++ b/docs/src/extensions/config_value_role.py
@@ -0,0 +1,119 @@
+"""
+Sphinx extension providing a custom interpreted text role for reading YAML config values.
+
+This extension adds a :configvalue:`file:key` role that reads values from YAML files
+and inserts them into the documentation.
+"""
+
+import os
+import yaml
+from docutils import nodes
+from docutils.parsers.rst import roles
+from sphinx.application import Sphinx
+from sphinx.util.docutils import ReferenceRole
+
+
+class ConfigValueRole(ReferenceRole):
+ """Custom role for reading values from YAML configuration files."""
+
+ def __init__(self):
+ super().__init__()
+ self.name = 'configvalue'
+
+ def run(self):
+ """Process the role and return the appropriate node."""
+ # Parse the target to extract file path and key
+ target = self.target
+
+ if ':' not in target:
+ # If no colon, assume it's just a key in the default config
+ config_file = "phylogenetic/defaults/config.yaml"
+ key = target
+ else:
+ # Split on first colon to separate file path and key
+ parts = target.split(':', 1)
+ config_file = parts[0]
+ key = parts[1]
+
+ # Resolve the config file path relative to the project root
+ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+ config_path = os.path.join(project_root, config_file)
+
+ try:
+ # Read and parse the YAML file
+ with open(config_path, 'r') as f:
+ config_data = yaml.safe_load(f)
+
+ # Navigate to the nested key using dot notation
+ value = self._get_nested_value(config_data, key)
+
+ if value is None:
+ # Key not found
+ return [nodes.literal(text=f"")], []
+
+ # Check if the value is a list or dictionary (complex data structure)
+ if isinstance(value, (list, dict)):
+ # Render as YAML code block
+ yaml_content = yaml.dump(value, default_flow_style=False, indent=2)
+ code_block = nodes.literal_block(text=yaml_content, language='yaml')
+ return [code_block], []
+ else:
+ # Return simple values as inline literal text
+ return [nodes.literal(text=str(value))], []
+
+ except FileNotFoundError:
+ return [nodes.literal(text=f"")], []
+ except yaml.YAMLError as e:
+ return [nodes.literal(text=f"")], []
+ except Exception as e:
+ return [nodes.literal(text=f"")], []
+
+ def _get_nested_value(self, data, key):
+ """Get a nested value from a dictionary using dot notation and array indexing."""
+ if '.' in key or '[' in key:
+ # Handle nested keys like "filter.group_by" or "inputs[0].metadata"
+ current = data
+
+ # Split by dots but preserve array indices
+ parts = key.split('.')
+ for part in parts:
+ if '[' in part and ']' in part:
+ # Handle array indexing like "inputs[0]"
+ base_key = part[:part.index('[')]
+ index_str = part[part.index('[')+1:part.index(']')]
+
+ if isinstance(current, dict) and base_key in current:
+ current = current[base_key]
+ else:
+ return None
+
+ try:
+ index = int(index_str)
+ if isinstance(current, list) and 0 <= index < len(current):
+ current = current[index]
+ else:
+ return None
+ except (ValueError, TypeError):
+ return None
+ else:
+ # Handle regular dictionary keys
+ if isinstance(current, dict) and part in current:
+ current = current[part]
+ else:
+ return None
+ return current
+ else:
+ # Simple key lookup
+ return data.get(key)
+
+
+def setup(app: Sphinx):
+ """Set up the Sphinx extension."""
+ # Register the custom role
+ roles.register_local_role('configvalue', ConfigValueRole())
+
+ return {
+ 'version': '1.0',
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
\ No newline at end of file
diff --git a/docs/src/extensions/snakemake_dag.py b/docs/src/extensions/snakemake_dag.py
new file mode 100644
index 0000000..ca5de45
--- /dev/null
+++ b/docs/src/extensions/snakemake_dag.py
@@ -0,0 +1,69 @@
+from docutils import nodes
+from docutils.parsers.rst import Directive
+import subprocess
+import os
+
+# Try to import SphinxDirective and SphinxError, fallback if not available for linter
+try:
+ from sphinx.util.docutils import SphinxDirective # type: ignore
+except ImportError:
+ SphinxDirective = Directive
+try:
+ from sphinx.errors import SphinxError # type: ignore
+except ImportError:
+ if 'SphinxError' not in globals():
+ class SphinxError(Exception):
+ pass
+# Import the graphviz node
+try:
+ from sphinx.ext.graphviz import graphviz # type: ignore
+except ImportError:
+ graphviz = None
+
+class SnakemakeDagDirective(SphinxDirective):
+ has_content = False
+ required_arguments = 1 # workflow directory, e.g., 'ingest'
+ optional_arguments = 0
+ final_argument_whitespace = False
+
+ def run(self):
+ workflow_dir = self.arguments[0]
+ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..'))
+ workflow_path = os.path.join(project_root, workflow_dir)
+ command = [
+ 'snakemake', '--cores', '1', '-npf', '--forceall', '--dag'
+ ]
+ try:
+ # Run the command in the workflow directory
+ proc = subprocess.run(
+ command,
+ cwd=workflow_path,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ check=True,
+ text=True
+ )
+ # Filter out lines containing 'Building'
+ dot_output = '\n'.join(
+ line for line in proc.stdout.splitlines() if 'Building' not in line
+ )
+ except subprocess.CalledProcessError as e:
+ raise SphinxError(f"Failed to generate Snakemake DAG for '{workflow_dir}': {e.stderr}")
+
+ if graphviz is None:
+ # Fallback: show as literal block if graphviz node is not available
+ graphviz_node = nodes.literal_block(dot_output, dot_output)
+ graphviz_node['language'] = 'dot'
+ return [graphviz_node]
+ # Return a graphviz node for rendering (correct usage)
+ node = graphviz('', code=dot_output)
+ node['options'] = {}
+ return [node]
+
+def setup(app):
+ app.add_directive('snakemake-dag', SnakemakeDagDirective)
+ return {
+ 'version': '0.1',
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
\ No newline at end of file
diff --git a/docs/src/index.rst b/docs/src/index.rst
new file mode 100644
index 0000000..33b62a3
--- /dev/null
+++ b/docs/src/index.rst
@@ -0,0 +1,58 @@
+*****************************************************************
+Nextstrain's Zika pathogen analysis pipeline
+*****************************************************************
+
+This is the documentation for the Zika pathogen analysis which is behind `nextstrain.org/zika `_ and which can be used to run your own customised analyses.
+Etc etc etc.
+
+
+Our analysis of `nextstrain.org/zika `_ is achieved via two workflows:
+
+1. :doc:`ingest <./ingest-workflow>` -- Download data from GenBank, clean and curate it to produce a metadata file and a sequences file
+2. :doc:`phylogenetic <./phylo-workflow>` -- Filter sequences, align, construct phylogeny, and export for visualization
+
+
+For a quickstart tutorial, including installation instructions, which will run through each of these workflows see here TKTK.
+
+To see a full description of each of the workflows see the :doc:`ingest <./ingest-workflow>` and :doc:`phylogenetic <./phylo-workflow>` pages.
+
+For a detailed list of all configuration options and docs see :doc:`config <./phylogenetic-config>`.
+
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ self
+
+
+.. toctree::
+ :maxdepth: 1
+ :titlesonly:
+ :caption: Tutorials
+ :hidden:
+
+ quickstart
+ customise
+
+.. toctree::
+ :maxdepth: 1
+ :titlesonly:
+ :caption: Workflow details
+ :hidden:
+
+ ingest-workflow
+ phylo-workflow
+
+
+
+.. toctree::
+ :maxdepth: 1
+ :titlesonly:
+ :caption: Customisation & configuration
+ :hidden:
+
+ phylogenetic-config
+ shared-vendored-snakemake-config
+ shared-vendored-inputs
+
diff --git a/docs/src/ingest-workflow.rst b/docs/src/ingest-workflow.rst
new file mode 100644
index 0000000..b1b42bd
--- /dev/null
+++ b/docs/src/ingest-workflow.rst
@@ -0,0 +1,24 @@
+*****************************************************************
+Detailed overview of the ingest workflow
+*****************************************************************
+
+I'm not sure how much we can automate this... We could (of course) manually document the steps, but then it's on us to keep it up to date.
+
+- Generate the Snakemake DAG and embed it here (via Graphviz) - see below.
+- Write inline documentation in the Snakemake rules (e.g., docstrings), and write a custom Sphinx extension (similar to ``:configvalue:``) to parse the rules and walk through each rule here.
+-
+
+Example: embedding the ingest workflow DAG.
+The rST code for this graph is just ``.. snakemake-dag:: ingest``, everything else happens when we build the docs via a custom sphinx extension.
+
+
+.. snakemake-dag:: ingest
+
+---
+
+Some example text:
+
+We use NCBI Datasets to download the data filtering to taxon ID :configvalue:`ingest/defaults/config.yaml:ncbi_taxon_id` and fetch the following fiels:
+
+:configvalue:`ingest/defaults/config.yaml:ncbi_datasets_fields`
+
diff --git a/docs/src/phylo-workflow.rst b/docs/src/phylo-workflow.rst
new file mode 100644
index 0000000..560cf3f
--- /dev/null
+++ b/docs/src/phylo-workflow.rst
@@ -0,0 +1,5 @@
+*****************************************************************
+Detailed overview of the phylogenetic workflow
+*****************************************************************
+
+TKTK - see the ingest workflow for ideas
\ No newline at end of file
diff --git a/docs/src/phylogenetic-config.rst b/docs/src/phylogenetic-config.rst
new file mode 100644
index 0000000..90e4a12
--- /dev/null
+++ b/docs/src/phylogenetic-config.rst
@@ -0,0 +1,10 @@
+*****************************************************************
+Phylogenetic configuration
+*****************************************************************
+
+General idea would be to somehow document all of the config values available to the workflow, and do so in a way that won't fall out of sync with the code.
+
+In avian-flu `I prototyped `_ implementing a full schema (not easy!) and then automatically generating HTML from it. It wasn't pretty, and would be a lot of work I think.
+
+An easier solution would be to document the config options here (in the rst file), use the custom ``:configvalue:`` role (or similar) to show the default values, and have some custom sphinx built-time code to check that all values in the config are documented.
+
diff --git a/docs/src/quickstart.rst b/docs/src/quickstart.rst
new file mode 100644
index 0000000..465871a
--- /dev/null
+++ b/docs/src/quickstart.rst
@@ -0,0 +1,52 @@
+*****************************************************************
+Simple walkthrough of the Zika pathogen analysis pipeline
+*****************************************************************
+
+Prerequisites
+=============
+
+Follow the `standard installation instructions `_ for Nextstrain's suite of software tools.
+
+Install the zika pathogen repo:
+
+.. code-block:: bash
+
+ nextstrain setup zika
+ nextstrain update zika # run this periodically
+
+Run the phylo pipeline
+======================
+
+We assume that you have created an analysis directory somewhere where input files will be stored, intermediate files created and final outputs saved.
+Furthermore, we assume that you are in this directory and that it is empty.
+
+
+.. code-block:: bash
+
+ nextstrain run --docker zika phylogenetic .
+
+
+What just happened?
+-------------------
+
+Input data was downloaded from :configvalue:`phylogenetic/defaults/config.yaml:inputs[0].metadata` and :configvalue:`phylogenetic/defaults/config.yaml:inputs[0].sequences` (these files were produced by the ingest pipeline, BTW).
+
+We then ran through a number of analysis steps, for full details see the :doc:`phylo-workflow` page.
+
+To see how you can customise this analysis, by using your own data or changing some of the analysis parameters, see the :doc:`customise` page.
+
+View the results
+======================
+
+Either ``nextstrain view ???`` or take the produced files and drag and drop em on to auspice.us
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/src/shared-vendored-inputs.rst b/docs/src/shared-vendored-inputs.rst
new file mode 100644
index 0000000..51107e6
--- /dev/null
+++ b/docs/src/shared-vendored-inputs.rst
@@ -0,0 +1,10 @@
+*****************************************************************
+Config-definable inputs
+*****************************************************************
+
+.. note::
+ Code not in the shared repo, but it will be soon
+
+Docs describing the ``inputs`` and ``additional_inputs`` config values.
+`https://github.com/nextstrain/avian-flu `_ is the best (only!) example so far.
+
diff --git a/docs/src/shared-vendored-snakemake-config.rst b/docs/src/shared-vendored-snakemake-config.rst
new file mode 120000
index 0000000..b6aa628
--- /dev/null
+++ b/docs/src/shared-vendored-snakemake-config.rst
@@ -0,0 +1 @@
+../../shared/vendored/snakemake/config.rst
\ No newline at end of file
diff --git a/ingest/profiles/default/config.yaml b/ingest/profiles/default/config.yaml
index c69390b..31d04ef 100644
--- a/ingest/profiles/default/config.yaml
+++ b/ingest/profiles/default/config.yaml
@@ -1,4 +1,3 @@
cores: all
rerun-incomplete: true
printshellcmds: true
-reason: true
diff --git a/shared/vendored/snakemake/config.rst b/shared/vendored/snakemake/config.rst
new file mode 100644
index 0000000..e1460d6
--- /dev/null
+++ b/shared/vendored/snakemake/config.rst
@@ -0,0 +1,7 @@
+*****************************************************************
+Path resolution of config values
+*****************************************************************
+
+Some documentation which is vendored (i.e. in the shared directory / repo) and which documents the path resolution functionality injected into workflows via ``config.smk``
+
+Via symlinks we can include this in the repo's docs, whilst having it sourced from the shared repo and thus always in-sync with the shared code.
\ No newline at end of file