I am running the example nextstrain for SARS-CoV-2 and am continually receiving the error below that the max date (3/17/2021) isn’t valid (‘invalid float value’). How do I change the max date for augur filter? I set max_date for all of my sampling schemes in builds.yaml to 2021-03-15 but still receive the same error. Thanks in advance.
Welcome, @Amanda! This error is caused by an out-of-date version of Augur (we added support for dates formatted like
YYYY-MM-DD in Augur v9.0.0). There are a couple of ways you can fix this issue that all involve upgrading Augur.
You can upgrade to the latest version of Augur with either of the following commands.
# Upgrade with conda conda install -c conda-forge -c bioconda augur==11.2.0 # Or upgrade with pip python3 -m pip install --upgrade nextstrain-augur
Create a fresh Nextstrain environment from scratch
If you wanted to make sure all of your software is installed with the latest versions, you can start from scratch with a fresh Conda environment, as shown below. This assumes you’ve already installed Miniconda.
# Remove the current Nextstrain environment. conda activate base conda env remove -n nextstrain # Update Conda. conda update conda # Create a fresh Conda environment for Nextstrain. conda create -n nextstrain -c conda-forge -c bioconda nextstrain # Confirm your environment worked. conda activate nextstrain augur --version
Let Snakemake manage your Conda environment automatically
Alternately, you can run the ncov workflow with Snakemake’s
--use-conda flag (
snakemake --use-conda [other arguments you normally provide]) and the workflow will automatically create a standalone Conda environment for you. Whenever that environment changes in our main repo and you pull down the changes, Snakemake will detect the change and update the environment for you. This also assumes you’ve already installed Miniconda.
Hi @jlhudd , thank you so much! I updated my version of Augur and the build now runs.