Xz: command not found

Hi Nextstrain Team,

I am trying to run the ncov pipeline with my own reference and custom data which was downloaded from GISAID in the Augur format. I have previously run this workflow before when there were different yamls for the different types of builds. Here, I am using the default parameters.yaml and have adjusted it accordingly.

However, I cannot seem to get past this error:

[Mon Aug  4 16:48:34 2025]
Job 11: 
        Aligning sequences to defaults/reference_seq.fasta
            - gaps relative to reference are considered real
        
Reason: Missing output files: results/aligned_custom_data.fasta.xz
Shell command: 
        python3 scripts/sanitize_sequences.py \
            --sequences data/ba3_sequences.fasta \
            --strip-prefixes hCoV-19/ SARS-CoV-2/ \
            --output /dev/stdout 2> logs/sanitize_sequences_custom_data.txt \
            | nextclade run \
            --jobs=8 \
            --input-ref defaults/reference_seq.fasta \
            --input-annotation defaults/annotation.gff \
            --output-fasta results/aligned_custom_data.fasta > logs/align_custom_data.txt 2>&1;
        xz -2 -T 8 results/aligned_custom_data.fasta;
        
/Users/nikitasitharam/.nextstrain/runtimes/conda/env/bin/bash: line 11: xz: command not found
RuleException:
CalledProcessError in file "/Users/nikitasitharam/ncov/workflow/snakemake_rules/main_workflow.smk", line 90:
Command 'set -euo pipefail;  
        python3 scripts/sanitize_sequences.py \
            --sequences data/ba3_sequences.fasta \
            --strip-prefixes hCoV-19/ SARS-CoV-2/ \
            --output /dev/stdout 2> logs/sanitize_sequences_custom_data.txt \
            | nextclade run \
            --jobs=8 \
            --input-ref defaults/reference_seq.fasta \
            --input-annotation defaults/annotation.gff \
            --output-fasta results/aligned_custom_data.fasta > logs/align_custom_data.txt 2>&1;
        xz -2 -T 8 results/aligned_custom_data.fasta;' returned non-zero exit status 127.

These are the versions I am using in this conda env - augur 31.3.0 and nextstrain.cli 8.5.3. I have also just recently updated the runtime.

xz is also installed in this environment -
xz (XZ Utils) 5.8.
liblzma 5.8.1

I am not sure why the main_workflow.smk is not picking this up.

Kind regards,
Nikita

Hi @NikitaSitharam,

To help us better understand your setup, could you provide the following information?

  1. The command used to start the workflow
  2. The output of nextstrain version --verbose

– Victor

Hi @victorlin,

The command:

nextstrain build .

Output from nextstrain version --verbose:

nextstrain.cli 8.5.3

Python

/Users/nikitasitharam/.nextstrain/cli-standalone/nextstrain

3.10.9 (main, Dec 21 2022, 05:06:54) [Clang 14.0.3 ]

Runners

docker

unknown

conda (default)

env: node: No such file or directory

nextstrain-base 20250729T235918Z (0, nextstrain)

augur 31.3.0

singularity

docker://nextstrain/base (not present)

ambient

augur 31.3.0

aws-batch

unknown

Thank you for the information. I am not able to reproduce the issue on my mac, though there may be some environment differences.

Nextstrain CLI version 8.5.3 is old – can you upgrade to the latest version? There should be instructions in the output of nextstrain check-setup. I don’t think that will fix the issue, but it doesn’t hurt to try anyways. If there is still an error, can you paste the output of nextstrain version --verbose? The newer Nextstrain CLI version gives slightly more information.

Hi @victorlin,

I have managed to update to the newer Nextstrain CLI.

Please find the output of nextstrain version --verbose as it is still giving the same error:

Nextstrain CLI 10.2.1.post1 (standalone)

Python

/Users/nikitasitharam/.nextstrain/cli-standalone/nextstrain

3.10.9 (main, Dec 21 2022, 05:06:54) [Clang 14.0.3 ]

Runtimes

docker

unknown

conda (default)

nextstrain-base 20250729T235918Z (0, https://conda.anaconda.org/nextstrain/osx-64 )  augur 31.3.0

env: node: No such file or directory

singularity

docker://nextstrain/base (not present)

ambient

augur 31.3.0

aws-batch

unknown

Pathogens

(none)

Thank you, that is useful. I set up the same conda runtime version but still cannot reproduce the issue. Can you paste the output of the following command?


nextstrain shell --conda . -c 'which xz'

As a potential workaround, the Docker runtime should not have this issue. You can use it by following the steps under the Docker tab in our installation guide.