Problem with Setup

I am using WSL (Ubuntu) to run nextstrain. When I was running the last command
nextstrain build . --cores 4 --use-conda *
** --configfile ./my_profiles/getting_started/builds.yaml
*
and
snakemake --profile my_profiles/getting_started -p

And I am getting the following error.

Error in rule align:
jobid: 11
output: results/aligned_example-data.fasta.xz, results/insertions_example-data.tsv, results/translations/seqs_example-data.gene.ORF1a.fasta.xz, results/translations/seqs_example-data.gene.ORF1b.fasta.xz, results/translations/seqs_example-data.gene.S.fasta.xz, results/translations/seqs_example-data.gene.ORF3a.fasta.xz, results/translations/seqs_example-data.gene.E.fasta.xz, results/translations/seqs_example-data.gene.M.fasta.xz, results/translations/seqs_example-data.gene.ORF6.fasta.xz, results/translations/seqs_example-data.gene.ORF7a.fasta.xz, results/translations/seqs_example-data.gene.ORF7b.fasta.xz, results/translations/seqs_example-data.gene.ORF8.fasta.xz, results/translations/seqs_example-data.gene.N.fasta.xz, results/translations/seqs_example-data.gene.ORF9b.fasta.xz
log: logs/align_example-data.txt (check log file(s) for error message)
shell:

    python3 scripts/sanitize_sequences.py             --sequences data/example_sequences.fasta.gz             --strip-prefixes hCoV-19/ SARS-CoV-2/             --output /dev/stdout 2> logs/sanitize_sequences_example-data.txt             | nextalign             --jobs=1             --reference defaults/reference_seq.fasta             --genemap defaults/annotation.gff             --genes ORF1a,ORF1b,S,ORF3a,E,M,ORF6,ORF7a,ORF7b,ORF8,N,ORF9b             --sequences /dev/stdin             --output-dir results/translations             --output-basename seqs_example-data             --output-fasta results/aligned_example-data.fasta             --output-insertions results/insertions_example-data.tsv > logs/align_example-data.txt 2>&1;
    xz -2 results/aligned_example-data.fasta;
    xz -2 results/translations/seqs_example-data*.fasta

    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Logfile logs/align_example-data.txt:
[ WARN] Nextalign: Warning: in sequence “USA/UT-01231/2020”: When processing gene “ORF7b”: Unable to align: no seed matches. Note that this gene will not be included in the results of the sequence.

What should I do?

Hi @rajannepal - is that the only content in logs/align_example-data.txt? That message alone shouldn’t cause the command to fail.

P.S. If you are running nextstrain build using a docker container, please avoid using --use-conda

Hi @james , I am using WSL (Ubuntu). As you mentioned I have found another error

Job 11:
Aligning sequences to defaults/reference_seq.fasta
- gaps relative to reference are considered real

    python3 scripts/sanitize_sequences.py             --sequences data/example_sequences.fasta.gz             --strip-prefixes hCoV-19/ SARS-CoV-2/             --output /dev/stdout 2> logs/sanitize_sequences_example-data.txt             | nextalign             --jobs=1             --reference defaults/reference_seq.fasta             --genemap defaults/annotation.gff             --genes ORF1a,ORF1b,S,ORF3a,E,M,ORF6,ORF7a,ORF7b,ORF8,N,ORF9b             --sequences /dev/stdin             --output-dir results/translations             --output-basename seqs_example-data             --output-fasta results/aligned_example-data.fasta             --output-insertions results/insertions_example-data.tsv > logs/align_example-data.txt 2>&1;
    xz -2 results/aligned_example-data.fasta;
    xz -2 results/translations/seqs_example-data*.fasta

xz: results/aligned_example-data.fasta.xz: Cannot set the file permissions: Operation not permitted

This error message:

combined with the workflow path from your screenshot:

/mnt/r/ncov/…

suggests to me that xz thinks its on a POSIX filesystem (e.g. Linux, macOS) but is actually on some other filesystem which doesn’t support POSIX file permissions. Probably a Windows drive path mounted into WSL at /mnt/r?

Can you try the workaround of using a non-Windows path in WSL? (I’m not personally familiar enough with WSL to be more specific here…) Trying that out will at least let us verify the cause of the issue, even if it’s not an ideal solution.

@trs I already tried in POSIX file system and it works. And it does not work on r because of the windows file system.

1 Like

Got it. Thanks for following up, @rajannepal048! I’m glad it’s working for you now.