# Plugin error from phylogeny: Command '\['mafft', '--preservecase', '--inputorder', '--thread', '1' returned non-zero exit status 1.

**URL:** <https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147>\
**Category:** Technical Support\
**Created:** [July 21, 2023, 4:50am UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147 "2023-07-21T04:50:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Pais](https://forum.qiime2.org/user_avatar/forum.qiime2.org/andrew_pais/32/16294_2.png) [@Andrew\_Pais](https://forum.qiime2.org/u/Andrew_Pais)\
**Post date:** [July 21, 2023, 4:50am UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/1 "2023-07-21T04:50:23Z")

</div>

Hello,

I am experiencing the following error (below) when running the following command (below). I tried this command on multiple cloud instances with high specs, and I have tried running the artifact on the latest version of QIIME 2 after initially trying this on version QIIME2\_2019.10. I even tried filtering the representative sequences from a filtered table to make the input less complex. Although I see other posts with similar questions, I am unable to tell if my error output is indicative of the other ones who have received similar error. Your thoughts and advice are much appreciated.

**command**  
\*qiime phylogeny align-to-tree-mafft-fasttree \*

- --i-sequences /home/user/work/filtered-single-end-demux\_feature\_data.qza \*
- --output-dir Fungitree\*

**error:**  
_Plugin error from phylogeny:_

- Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2/user/data/5f74deaa-5ca6-48a2-9515-7664612a78dc/data/dna-sequences.fasta']' returned non-zero exit status 1.\*

**error log:**  
_Running external command line application. This may print messages to stdout and/or stderr._  
_The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist._

_Command: mafft --preservecase --inputorder --thread 1 /tmp/qiime2/user/data/5f74deaa-5ca6-48a2-9515-7664612a78dc/data/dna-sequences.fasta_

_/opt/conda/envs/qiime2-2023.5/bin/mafft: line 2836: 10514 Killed "$prefix/disttbfast" -q $npickup -E $cycledisttbfast -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg -W $tuplesize $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreads-$numthreadstb $memopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -g $gexp -f "-"$gop -Q $spfactor -h $aof $param\_fft $algopt $treealg $scoreoutarg $anchoropt -x $maxanchorseparation $oneiterationopt \< infile \> pre 2\>\> "$progressfile"_  
_Traceback (most recent call last):_

- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 473, in **call** \*
- results = action(\*_arguments)_
- File "", line 2, in align\_to\_tree\_mafft\_fasttree\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound\_callable\*
- outputs = self._callable\_executor_(\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 590, in _callable\_executor_\*
- outputs = self.\_callable(scope.ctx, \*_view\_args)_
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_phylogeny/\_align\_to\_tree\_mafft\_fasttree.py", line 19, in align\_to\_tree\_mafft\_fasttree\*
- aligned\_seq, = mafft(sequences=sequences, n\_threads=n\_threads,\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/context.py", line 140, in deferred\_action\*
- return action\_obj.\_bind(\*
- File "", line 2, in mafft\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound\_callable\*
- outputs = self._callable\_executor_(\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 509, in _callable\_executor_\*
- output\_views = self.\_callable(\*_view\_args)_
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 128, in mafft\*
- return \_mafft(sequences\_fp, None, n\_threads, parttree, False)\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 100, in \_mafft\*
- run\_command(cmd, result\_fp)\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 26, in run\_command\*
- subprocess.run(cmd, stdout=output\_f, check=True)\*
- File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/subprocess.py", line 516, in run\*
- raise CalledProcessError(retcode, process.args,\*  
_subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2/user/data/5f74deaa-5ca6-48a2-9515-7664612a78dc/data/dna-sequences.fasta']' returned non-zero exit status 1._

---

<div class="post-metadata">

**Author:** ![colinvwood](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinvwood/32/17303_2.png) [@colinvwood](https://forum.qiime2.org/u/colinvwood)\
**Post date:** [July 21, 2023, 6:09pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/2 "2023-07-21T18:09:52Z")

</div>

Hello @Andrew_Pais,

Can you run this command with the `--verbose` flag as well, and post the output here?

---

<div class="post-metadata">

**Author:** ![Andrew\_Pais](https://forum.qiime2.org/user_avatar/forum.qiime2.org/andrew_pais/32/16294_2.png) [@Andrew\_Pais](https://forum.qiime2.org/u/Andrew_Pais)\
**Post date:** [July 22, 2023, 5:17am UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/3 "2023-07-22T05:17:40Z")

</div>

Thank you for helping to clarify the problem @colinvwood. I reran the command in a similar environment on the same files as before, but this time with the --verbose flag. Here is the output:

inputfile = orig  
991453 x 65 - 32 d  
nthread = 1  
nthreadpair = 1  
nthreadtb = 1  
ppenalty\_ex = 0  
stacksize: 8192 kb-\>193643 kb  
generating a scoring matrix for nucleotide (dist=200) ... done  
Gap Penalty = -1.53, +0.00, +0.00

Making a distance matrix ..  
/opt/conda/envs/qiime2-2023.5/bin/mafft: line 2836: 10360 Killed "$prefix/disttbfast" -q $npickup -E $cycledisttbfast -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg -W $tuplesize $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreads-$numthreadstb $memopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -g $gexp -f "-"$gop -Q $spfactor -h $aof $param\_fft $algopt $treealg $scoreoutarg $anchoropt -x $maxanchorseparation $oneiterationopt \< infile \> pre 2\>\> "$progressfile"  
Traceback (most recent call last):  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 473, in **call**  
results = action(\*\*arguments)  
File "", line 2, in align\_to\_tree\_mafft\_fasttree  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound\_callable  
outputs = self._callable\_executor_(  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 590, in _callable\_executor_  
outputs = self.\_callable(scope.ctx, \*\*view\_args)  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_phylogeny/\_align\_to\_tree\_mafft\_fasttree.py", line 19, in align\_to\_tree\_mafft\_fasttree  
aligned\_seq, = mafft(sequences=sequences, n\_threads=n\_threads,  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/context.py", line 140, in deferred\_action  
return action\_obj.\_bind(  
File "", line 2, in mafft  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 274, in bound\_callable  
outputs = self._callable\_executor_(  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/action.py", line 509, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 128, in mafft  
return \_mafft(sequences\_fp, None, n\_threads, parttree, False)  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 100, in \_mafft  
run\_command(cmd, result\_fp)  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/site-packages/q2\_alignment/\_mafft.py", line 26, in run\_command  
subprocess.run(cmd, stdout=output\_f, check=True)  
File "/opt/conda/envs/qiime2-2023.5/lib/python3.8/subprocess.py", line 516, in run  
raise CalledProcessError(retcode, process.args,  
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2/user/data/5f74deaa-5ca6-48a2-9515-7664612a78dc/data/dna-sequences.fasta']' returned non-zero exit status 1.

Plugin error from phylogeny:

Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2/user/data/5f74deaa-5ca6-48a2-9515-7664612a78dc/data/dna-sequences.fasta']' returned non-zero exit status 1.

See above for debug info.

---

<div class="post-metadata">

**Author:** ![colinvwood](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinvwood/32/17303_2.png) [@colinvwood](https://forum.qiime2.org/u/colinvwood)\
**Post date:** [July 24, 2023, 4:56pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/5 "2023-07-24T16:56:05Z")

</div>

Hello @Andrew_Pais,

This seems like in could be a memory issue, as a [post](https://forum.qiime2.org/t/error-qiime-2-alignment-mafft/15183) with a similar error message suggests. Do you know how much memory is available to this process when it runs?

---

<div class="post-metadata">

**Author:** ![Andrew\_Pais](https://forum.qiime2.org/user_avatar/forum.qiime2.org/andrew_pais/32/16294_2.png) [@Andrew\_Pais](https://forum.qiime2.org/u/Andrew_Pais)\
**Post date:** [August 1, 2023, 1:21pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/6 "2023-08-01T13:21:15Z")

</div>

Thank you for sharing that post. After trying the --p-partree option with a more powerful cloud instance, I was finally able to get an output from the command I previously shared.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [September 1, 2023, 7:21pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-command-mafft-preservecase-inputorder-thread-1-returned-non-zero-exit-status-1/27147/7 "2023-09-01T19:21:33Z")

</div>

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