# plugin error from phylogeny - no such file or directory: mafft

**URL:** https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349
**Category:** Technical Support
**Tags:** phylogeny, mafft
**Created:** [May 5, 2023, 12:28pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349 "2023-05-05T12:28:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fdebus](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/f/bb73d2/32.png) [@fdebus](https://forum.qiime2.org/u/fdebus)
#### Post date: [May 5, 2023, 12:28pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/1 "2023-05-05T12:28:07Z")

</div>

Hello!

I'm new to the use of Qiime2 and am trying to get the hang of if by following the Moving Pictures Tutorial. This forum has been a great help, so I first wanted to thank all of you already!

The problem I face is at the step where the phylogenetic tree is supposed to be created using the `phylogeny` plugin. Everything before works fine.  
The following code is provided by the Moving Pictures Tutorial:

```auto
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

```

The error message I get is the following:

```auto
Plugin error from phylogeny:
  [Errno 2] No such file or directory: 'mafft'
Debug info has been saved to /tmp/qiime2-q2cli-err-ejlhs69e.log

```

If I run it with the `--verbose` flag, the error message is:

```auto
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/vsc10755/data/beef5cfe-eceb-4076-9708-8be6f6bf8876/data/dna-sequences.fasta

Traceback (most recent call last):
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/q2cli/commands.py", line 352, in __call__
    results = action(**arguments)
  File "<decorator-gen-228>", line 2, in align_to_tree_mafft_fasttree
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/qiime2/sdk/action.py", line 234, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/qiime2/sdk/action.py", line 475, in _callable_executor_
    outputs = self._callable(scope.ctx, **view_args)
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/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 "<decorator-gen-565>", line 2, in mafft
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/qiime2/sdk/action.py", line 234, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/qiime2/sdk/action.py", line 381, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 128, in mafft
    return _mafft(sequences_fp, None, n_threads, parttree, False)
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 100, in _mafft
    run_command(cmd, result_fp)
  File "/apps/brussel/CO7/skylake/software/QIIME2/2022.11-foss-2020b/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 26, in run_command
    subprocess.run(cmd, stdout=output_f, check=True)
  File "/apps/brussel/CO7/skylake/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/apps/brussel/CO7/skylake/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/apps/brussel/CO7/skylake/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mafft'

Plugin error from phylogeny:

  [Errno 2] No such file or directory: 'mafft'

See above for debug info.

```

I've looked for a solution for the problem I'm encountering on the forum, but weirdly enough I don't seem to find cases similar enough to help me.

I'm running the v2022.11 version of qiime installed on the university's server (I don't know how it is installed ...).

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [May 5, 2023, 1:39pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/2 "2023-05-05T13:39:01Z")

</div>

HI @fdebus,

I am not noticing anything in the error log that'd help me ascertain what the issue is...

> [@fdebus](#):
>
> I'm running the v2022.11 version of qiime installed on the university's server (I don't know how it is installed ...).

It'd probably be a good idea to contact the IT staff maintaining the University HPC. Perhaps hey might have modified the base QIIME 2 install? This is just a guess, but I wonder why the environment / path is named `2022.11-foss-2020b`.

-Mike

---

<div class="post-metadata">

### Author: ![fdebus](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/f/bb73d2/32.png) [@fdebus](https://forum.qiime2.org/u/fdebus)
#### Post date: [May 5, 2023, 2:05pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/3 "2023-05-05T14:05:55Z")

</div>

Hi Mike,

Thank you for your time and answer!  
I'll contact them.

---

<div class="post-metadata">

### Author: ![fdebus](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/f/bb73d2/32.png) [@fdebus](https://forum.qiime2.org/u/fdebus)
#### Post date: [May 10, 2023, 12:49pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/4 "2023-05-10T12:49:52Z")

</div>

It was indeed a problem in the implementation by the IT staff. They have resolved the issue.

Thank you again for your help!

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [May 10, 2023, 1:22pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/5 "2023-05-10T13:22:11Z")

</div>

I'm glad you were able to resolve this, and you for letting us know! 🎇

---

<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: [June 10, 2023, 7:22pm UTC](https://forum.qiime2.org/t/plugin-error-from-phylogeny-no-such-file-or-directory-mafft/26349/6 "2023-06-10T19:22:26Z")

</div>

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