Error trying to run ncov-tutorial: nextalign2, sanitize_sequences.py

Ugh, hate asking such basic questions, but I just reainstalled/updated nexstrain (and all dependencies) and tried to run the ncov-tutorial with this command:

nextstrain build . --cores all --use-conda --configfile ncov-tutorial/example-data.yaml

But am getting errors. Below is what is in the log files. I tried to figure it out and search for this someone else having this issue to no avail. I’m running this on an 80 core linux ubuntu machine with gobs of memory.

(base) swyman@igi-biotite:~/projects/ncov/logs$ more align_reference_data.txt
/bin/bash: line 1: nextalign2: command not found
(base) swyman@igi-biotite:~/projects/ncov/logs$ more sanitize_sequences_reference_data.txt
Traceback (most recent call last):
  File "scripts/sanitize_sequences.py", line 130, in <module>
    write_sequences(sequence, output_handle)
  File "/home/swyman/miniconda3/envs/nextstrain/lib/python3.7/site-packages/augur/io/sequences.py", line 71, in write_sequences
    format
  File "/home/swyman/miniconda3/envs/nextstrain/lib/python3.7/site-packages/Bio/SeqIO/__init__.py", line 535, in write
    fp.write(format_function(record))
BrokenPipeError: [Errno 32] Broken pipe

Hi @stacia,

Sorry you are running into this! You are doing nothing wrong. Support for non-Docker runtimes (in your case, --use-conda) was overlooked when we released Nextclade v2, and this is a known issue. We hope to resolve it soon. In the meantime, you can use the Docker runtime:

nextstrain build . --cores all --docker --configfile ncov-tutorial/example-data.yaml

If you don’t have Docker installed yet, you can follow the instructions in our installation guide.

– Victor

Thanks! I can run docker with Singularity. But one more thing, when I tried running it without the --use-conda flag (exactly how it is in the tutorial), I get the same error (maybe defaulting to using conda since I don’t use docker?
Stacia

I’m not familiar with Singularity, but the Docker runtime should be usable as long as you can run docker stats without an error.

You might have the native runtime set as default. You can check using:

nextstrain version --verbose | grep "(default)"

If that’s the case, you would either need to use --docker explicitly or set the default to docker by making sure Docker is open then running nextstrain check-setup --set-default.

If you are unable to use Docker, you can try our patch fix for --use-conda:

cd ~/projects/ncov  # path taken from your output above
git fetch --all
git switch nextclade-rename
# nextstrain build ...

Hi @stacia! I’m sorry our Nextclade/Nextalign update broke your workflow. We’ve fixed the ncov workflow as of a few minutes ago, so you should be able to pull the latest version from GitHub and run with your usual --use-conda flag to get the latest versions of Nextclade and Nextalign (2.2.0). Would you let us know if the workflow still doesn’t work for you after pulling the latest version?

As a side note, you may also want to install Mamba and run your workflows with --conda-frontend mamba, to speed up your environment creation. Our latest installation docs include some background on Mamba and also instructions for installing it. Our team has mostly switched to Mamba for Conda environment creation and updates just because it is so much faster (and often is the only way to solve more complex environments in a reasonable amount of time).

Updated repository and it worked! Thanks for level 1 instant support.

Also for mamba tip!! I’ve been using mamba and am huge fan and delighted I can use that flag because conda is soooo slow and generally crappy. :wink:

1 Like