Error in augur for Nextstrain installation in MmacOS High Sierra v10.13.6

Dear all,

Good day to you. Need help to troubleshoot augur error when running a basic example with example data (Setup and installation — Nextstrain documentation)

nextstrain build . --cores 4 --use-conda
–configfile ./my_profiles/getting_started/builds.yaml

I faced the below error pasted at last, therefore I reinstalled, but this error still persists, may I know how to troubleshoot this error?

Appreciate that.

AUGUR ERROR
usage: augur [-h]
{parse,filter,mask,align,tree,refine,ancestral,translate,reconstruct-sequences,clades,traits,sequence-traits,lbi,distance,titers,frequencies,export,validate,version,import}

augur: error: unrecognized arguments: --exclude-ambiguous-dates-by any results/to-exclude_example-data.txt
xz: results/filtered_example-data.fasta: No such file or directory
[Sun Jul 11 22:18:18 2021]
Error in rule filter:
jobid: 10
output: results/filtered_example-data.fasta.xz
log: logs/filtered_example-data.txt (check log file(s) for error message)
conda-env: /Users/limwaifeng/ncov/.snakemake/conda/7565746688b38acd34f4d18bce26293d
shell:

    augur filter             --sequences results/masked_example-data.fasta.xz             --metadata results/sanitized_metadata_example-data.tsv.xz             --include defaults/include.txt             --max-date 2021-07-12             --min-date 2019.74             --exclude-ambiguous-dates-by any             --exclude defaults/exclude.txt results/to-exclude_example-data.txt             --exclude-where division='USA'            --min-length 27000             --output results/filtered_example-data.fasta 2>&1 | tee logs/filtered_example-data.txt;
    xz -2 results/filtered_example-data.fasta
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /Users/limwaifeng/ncov/.snakemake/log/2021-07-11T221807.799359.snakemake.log

Dear all,

I have reinstalled Nextstrain after removed them. However, after I run
(nextstrain) lims-air:ncov limwaifeng$ nextstrain build . --cores 4 --use-conda \

–configfile ./my_profiles/getting_started/builds.yaml

other augur-related error appear as below. Appreciate if someone can guide me.

Building DAG of jobs…
Creating conda environment workflow/envs/nextstrain.yaml…
Downloading and installing remote packages.



ModuleNotFoundError: No module named ‘augur.io
[Mon Jul 12 19:52:06 2021]
Finished job 11.
4 of 31 steps (13%) done
[Mon Jul 12 19:52:06 2021]
Finished job 14.
5 of 31 steps (16%) done
Select jobs to execute…

[Mon Jul 12 19:52:06 2021]
Job 10:
Filtering alignment results/masked_example-data.fasta.xz → results/filtered_example-data.fasta.xz
- excluding strains in defaults/exclude.txt results/to-exclude_example-data.txt
- including strains in defaults/include.txt
- min length: 27000

    augur filter             --sequences results/masked_example-data.fasta.xz             --metadata results/sanitized_metadata_example-data.tsv.xz             --include defaults/include.txt             --max-date 2021-07-13             --min-date 2019.74             --exclude-ambiguous-dates-by any             --exclude defaults/exclude.txt results/to-exclude_example-data.txt             --exclude-where division='USA'            --min-length 27000             --output results/filtered_example-data.fasta 2>&1 | tee logs/filtered_example-data.txt;
    xz -2 results/filtered_example-data.fasta

Activating conda environment: /Users/limwaifeng/ncov/.snakemake/conda/7565746688b38acd34f4d18bce26293d
usage: augur [-h]
{parse,filter,mask,align,tree,refine,ancestral,translate,reconstruct-sequences,clades,traits,sequence-traits,lbi,distance,titers,frequencies,export,validate,version,import}

augur: error: unrecognized arguments: --exclude-ambiguous-dates-by any results/to-exclude_example-data.txt
xz: results/filtered_example-data.fasta: No such file or directory
[Mon Jul 12 19:52:14 2021]
Error in rule filter:
jobid: 10
output: results/filtered_example-data.fasta.xz
log: logs/filtered_example-data.txt (check log file(s) for error message)
conda-env: /Users/limwaifeng/ncov/.snakemake/conda/7565746688b38acd34f4d18bce26293d
shell:

    augur filter             --sequences results/masked_example-data.fasta.xz             --metadata results/sanitized_metadata_example-data.tsv.xz             --include defaults/include.txt             --max-date 2021-07-13             --min-date 2019.74             --exclude-ambiguous-dates-by any             --exclude defaults/exclude.txt results/to-exclude_example-data.txt             --exclude-where division='USA'            --min-length 27000             --output results/filtered_example-data.fasta 2>&1 | tee logs/filtered_example-data.txt;
    xz -2 results/filtered_example-data.fasta
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /Users/limwaifeng/ncov/.snakemake/log/2021-07-12T194644.564608.snakemake.log

Hi @limwaifeng85 – something seems to be broken with the environment in which the workflow is running (e.g. errors such as ModuleNotFoundError: No module named ‘augur.io’ and augur: error: unrecognized arguments: --exclude-ambiguous-dates-by). It’s not immediately clear why this is happening, but it may be due to nextstrain build trying to use a docker container with in combination with the --use-conda snakemake argument.

Could you try the following command, which will try to run snakemake in your current environment rather than inside a docker container.

nextstrain build --native . --cores 4 --use-conda --configfile ./my_profiles/getting_started/builds.yaml

Alternatively, if you would prefer to use a docker container, you could try

nextstrain build --docker . --cores 4 --configfile ./my_profiles/getting_started/builds.yaml

Best,
james