Mafft 'returned non-zero exit status 1' ERROR

Hey there Qiime2 Gurus:

I was running the following command when I got the resulting error:
qiime alignment mafft --i-sequences rep-seqs.qza --o-alignment mafft_aligned-rep-seqs.qza --p-n-threads 25 --verbose

inputfile = orig
1109268 x 151 - 90 d
nthread = 25
The number of sequences must be < 1000000
Please try the --parttree option for such large data.
Traceback (most recent call last):
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/site-packages/q2cli/”, line 274, in call
results = action(**arguments)
File “”, line 2, in mafft
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/”, line 232, in bound_callable
output_types, provenance)
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/”, line 367, in callable_executor
output_views = self._callable(**view_args)
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_alignment/”, line 61, in mafft
run_command(cmd, aligned_fp)
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_alignment/”, line 27, in run_command, stdout=output_f, check=True)
File “/scif/apps/miniconda3/envs/qiime2-2018.6/lib/python3.5/”, line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘mafft’, ‘–preservecase’, ‘–inputorder’, ‘–thread’, ‘25’, ‘/scratch/local/qiime2-archive-ai5yqr95/2de18955-5810-434d-b796-cec9fda0a13b/data/dna-sequences.fasta’]’ returned non-zero exit status 1

Plugin error from alignment:

Command ‘[‘mafft’, ‘–preservecase’, ‘–inputorder’, ‘–thread’, ‘25’, ‘/scratch/local/qiime2-archive-ai5yqr95/2de18955-5810-434d-b796-cec9fda0a13b/data/dna-sequences.fasta’]’ returned non-zero exit status 1

*According to this error, It’s suggesting for me to use the --parttree option for my large data-set; however under the qiime alignment mafft --help command, I don’t see a --parttree option.

I have also read this post: Alignment error message
which implies that 1) it could be a memory issue, but im allowing 50gb of memory, which the job used < 2gb before it threw up this error; and 2) this error is an issue w/ the mafft developers, but I didn’t see the --parttree output in the error with those posts.

Any suggestions?

Hey there @Purrsia_Felidae!

Correct, QIIME 2 doesn’t expose that parameter. To use that you will need to run mafft directly. Fortunately you already have mafft installed in your QIIME 2 environment!

I also opened an issue to track the addition of this feature, but I don’t have an ETA for you. You should be fine to use mafft directly though - let us know if you get stuck, we can lend a hand! :qiime2: :t_rex:

Thank you very much for your reply. I am wondering if MAFFT is even the correct alignment program to use for my data. I have a total of ~1.5 million sequences, and according to their website ( this aligner works optimally for much lower sequences.

Will Qiime2 perhaps incorporate an aligner that can handle larger data sets?

Also, I can use a different aligner; however, I am not sure what format Qiime2 would need to use the output of an external aligner so that I may continue into alpha and beta diversity analysis w/ my data. Perhaps I can use Qiime 1? I was thinking these commands:

to get the .tre file, then input back into Qiime2 as a tree and continue to diversity metrics.

1 Like

Hey there @Purrsia_Felidae!

Good question! I don’t know, but I would be interested in learning more.

Most certainly, although nothing is on our radar now. Maybe someone else has developed another plugin that we don’t know about yet?

I think that could work!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.