# plugin error for phylogeny

**URL:** <https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433>\
**Category:** User Support\
**Created:** [April 10, 2020, 1:20pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433 "2020-04-10T13:20:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liz-Oreo](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@Liz-Oreo](https://forum.qiime2.org/u/Liz-Oreo)\
**Post date:** [April 10, 2020, 1:20pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/1 "2020-04-10T13:20:37Z")

</div>

Hi, I run same command on different file did not give error but now showing error: Is there any issue with input file?

```auto
(qiime2-2019.7) qiime2@qiime2core2019-7:~/qiime2lz/try$ qiime phylogeny align-to-tree-mafft-fasttree \
> --i-sequences rep-seqs.qza \
> --o-alignment aligned-rep-seqs.qza \
> --o-masked-alignment masked-aligned-rep-seqs.qza \
> --o-tree unrooted-tree.qza \
> --o-rooted-tree rooted-tree.qza
Plugin error from phylogeny:

  Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-70zirn8b/731149e6-20e7-4f53-b4a3-da2ec0f98954/data/dna-sequences.fasta']' returned non-zero exit status 1.

Debug info has been saved to /tmp/qiime2-q2cli-err-yq8jfhtc.log

inputfile = orig
79676 x 460 - 370 d
nthread = 1
stacksize: 8192 kb->15561 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00

Making a distance matrix ..
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00/home/qiime2/miniconda/envs/qiime2-2019.7/bin/mafft: line 2440: 9591 Killed "$prefix/disttbfast" -q $npickup -E $cycledisttbfast -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg -W $tuplesize $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreadstb $memopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -f "-"$gop -Q $spfactor -h $aof $param_fft $algopt $treealg $scoreoutarg < infile > pre 2>> "$progressfile"
Traceback (most recent call last):
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in __call__
    results = action(**arguments)
  File "</home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-226>", line 2, in align_to_tree_mafft_fasttree
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
    output_types, provenance)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 477, in _callable_executor_
    outputs = self._callable(scope.ctx, **view_args)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_phylogeny/_align_to_tree_mafft_fasttree.py", line 18, in align_to_tree_mafft_fasttree
    aligned_seq, = mafft(sequences=sequences, n_threads=n_threads)
  File "</home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-481>", line 2, in mafft
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
    output_types, provenance)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 383, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_alignment/_mafft.py", line 85, in mafft
    run_command(cmd, aligned_fp)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_alignment/_mafft.py", line 27, in run_command
    subprocess.run(cmd, stdout=output_f, check=True)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-70zirn8b/731149e6-20e7-4f53-b4a3-da2ec0f98954/data/dna-sequences.fasta']' returned non-zero exit status 1.

```

Thanks,

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 10, 2020, 1:24pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/2 "2020-04-10T13:24:59Z")

</div>

Hello Liz,

Welcome to the forums! :qiime2:

(I removed your other post, as posting in a new thread is perfect because it makes tracking this question easier for us. Also you got the code formatted in this post, which is very nice!)

It looks like the Qiime plugin is working... but mafft itself is having an issue. Can you rerun this command and add the `--verbose` flag to get more detail about the error?

Colin

---

<div class="post-metadata">

**Author:** ![Liz-Oreo](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@Liz-Oreo](https://forum.qiime2.org/u/Liz-Oreo)\
**Post date:** [April 11, 2020, 5:44am UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/3 "2020-04-11T05:44:25Z")

</div>

Hi colin,

I ran the command again and got this. Don't know where the problem is. Something wrong with my input file? I ran this command with another input file and it worked fine.

Thank you for your help.

Liz

```auto
(qiime2-2019.7) qiime2@qiime2core2019-7:~/qiime2lz/try$ qiime phylogeny align-to-tree-mafft-fasttree \
> --i-sequences rep-seqs.qza \
> --o-alignment aligned-rep-seqs.qza \
> --o-masked-alignment masked-aligned-rep-seqs.qza \
> --o-tree unrooted-tree.qza \
> --o-rooted-tree rooted-tree.qza\
> --verbose
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-archive-4hkndmw0/731149e6-20e7-4f53-b4a3-da2ec0f98954/data/dna-sequences.fasta

inputfile = orig
79676 x 460 - 370 d
nthread = 1
stacksize: 8192 kb->15561 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00

Making a distance matrix ..
/home/qiime2/miniconda/envs/qiime2-2019.7/bin/mafft: line 2440: 3859 Killed "$prefix/disttbfast" -q $npickup -E $cycledisttbfast -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg -W $tuplesize $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreadstb $memopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -f "-"$gop -Q $spfactor -h $aof $param_fft $algopt $treealg $scoreoutarg < infile > pre 2>> "$progressfile"
Traceback (most recent call last):
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in __call__
    results = action(**arguments)
  File "</home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-226>", line 2, in align_to_tree_mafft_fasttree
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
    output_types, provenance)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 477, in _callable_executor_
    outputs = self._callable(scope.ctx, **view_args)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_phylogeny/_align_to_tree_mafft_fasttree.py", line 18, in align_to_tree_mafft_fasttree
    aligned_seq, = mafft(sequences=sequences, n_threads=n_threads)
  File "</home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-481>", line 2, in mafft
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
    output_types, provenance)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 383, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_alignment/_mafft.py", line 85, in mafft
    run_command(cmd, aligned_fp)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_alignment/_mafft.py", line 27, in run_command
    subprocess.run(cmd, stdout=output_f, check=True)
  File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-4hkndmw0/731149e6-20e7-4f53-b4a3-da2ec0f98954/data/dna-sequences.fasta']' returned non-zero exit status 1.

Plugin error from phylogeny:

  Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-4hkndmw0/731149e6-20e7-4f53-b4a3-da2ec0f98954/data/dna-sequences.fasta']' returned non-zero exit status 1.

See above for debug info.

```

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 11, 2020, 1:32pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/4 "2020-04-11T13:32:10Z")

</div>

Good morning Liz,

I think I found the error:

> [@Liz-Oreo](#):
>
> mafft: line 2440: 9591 Killed

It was in the middle of the line with all the `\00\00\00\00\00\00\00\00\00\0` in it.

This error has been [reported](https://forum.qiime2.org/t/align-to-tree-mafft-fasttree-error/6557) [before](https://forum.qiime2.org/t/alignment-error-message/2383), and it looks like mafft gets killed once it runs out of memory.

How many reads are you trying to align with mafft? How much memory do you have?

Colin

---

<div class="post-metadata">

**Author:** ![Liz-Oreo](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@Liz-Oreo](https://forum.qiime2.org/u/Liz-Oreo)\
**Post date:** [April 11, 2020, 3:34pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/5 "2020-04-11T15:34:40Z")

</div>

Morning Colin,

I run qiime2 on the virtual machine, and the size of the rep-seqs.qza is about 38M.The memory size I set is 4096M. Is that enough?

I ran the same command with a smaller input file about 30k,and it worked well.If the memory is not enough,should I reset it?And how much should I set?

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/0/04fd3e4e1d26103cb7eac91543ac8cce09d76d08.png)  
 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/0/04fd3e4e1d26103cb7eac91543ac8cce09d76d08.png)

Thanks again,  
Liz

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [April 11, 2020, 6:13pm UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/6 "2020-04-11T18:13:14Z")

</div>

Hello Liz,

Thanks for telling me more!

> [@Liz-Oreo](#):
>
> rep-seqs.qza is about 38M

That sounds like a lot of features! How many total seqs / features are in that file?

How much memory do you have on the host machine? Is there any chance you can increase that beyond 4 GB?

How did you make that rep-seqs file? Are these ASVs from dada2 or OTUs from vsearch?

Colin

---

<div class="post-metadata">

**Author:** ![Liz-Oreo](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@Liz-Oreo](https://forum.qiime2.org/u/Liz-Oreo)\
**Post date:** [April 14, 2020, 12:57am UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/7 "2020-04-14T00:57:22Z")

</div>

Hi Colin,

I got my rep-seqs file from vsearch. I reset the memory of the virtual machine to 6G,and changed another method to cluster OTUs to get a much smaller input file.Now it works well.

Thank you for your kind help.

Liz

---

<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:** [May 15, 2020, 6:59am UTC](https://forum.qiime2.org/t/plugin-error-for-phylogeny/14433/8 "2020-05-15T06:59:51Z")

</div>

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