Plugin error from phylogeny: align-to-tree-mafft-fasttree

Dear all,
I ran the following code:

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

and encountered Plugin error from phylogeny:

Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/var/folders/kn/tqt5xfzd4x95jq9s21ymqb1r0000gn/T/qiime2-archive-jxhfwcse/c0185c20-f1a8-                        4b77-87a2-024afca7065b/data/dna-sequences.fasta']' returned non-zero exit status                         1.

Here is the log. It seems that the process was killed after making distance matrix. I would be most grateful for your help!

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 /var/folders/kn/tqt5xfzd4x95jq9s21ymqb1r0000gn/T/qiime2-archive-jxhfwcse
/c0185c20-f1a8-4b77-87a2-024afca7065b/data/dna-sequences.fasta

inputfile = orig
250374 x 1550 - 1250 d
nthread = 1
nthreadpair = 1
nthreadtb = 1
ppenalty_ex = 0
stacksize: 8192 kb->48901 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00

Making a distance matrix ..

0)^M 33101 / 250374 (thread    0)/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/bin/mafft: line 2751: 26986 Killed: 9               "$prefix/disttbfast" -q $np
ickup -E $cycledisttbfast -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg -W $tuplesize $termgapopt $outnum $addarg $a
dd2ndhalfarg -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 < infi
le > pre 2>> "$progressfile"
Traceback (most recent call last):
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/q2cli/commands.py", line 329, in 
__call__
    results = action(**arguments)
  File "<decorator-gen-228>", line 2, in align_to_tree_mafft_fasttree
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/qiime2/sdk/action.py", line 485, in _callable_executor_
    outputs = self._callable(scope.ctx, **view_args)
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/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-540>", line 2, in mafft
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 128, in mafft
    return _mafft(sequences_fp, None, n_threads, parttree, False)
 File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 100, in _mafft
    run_command(cmd, result_fp)
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 26, in run_command
    subprocess.run(cmd, stdout=output_f, check=True)
  File "/Users/a_mac/opt/miniconda3/envs/MetONTIIME_env/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/var/folders/kn/tqt5xfzd4x95jq9s21ymqb1r0000gn/T/qiime2-archive-jxhfwcse/c0185c20-f1a8-4b77-87a2-024afca7065b/data/dna-sequences.fasta']' returned non-zero exit status 1.

Hi @eri5n,

Welcome back to the :qiime2: forum! Thanks for providing all of those details. In addition, could you please provide us with the version of QIIME 2 you are running, and how it is installed (e.g. Virtualbox, conda, etc)?

Thanks! :lizard:

Hi, @lizgehret

The version of QIIME 2 is 2021.8.0 and it was installed in conda.

Thank you!

Hi @lizgehret,

I have tried to run in Docker, however encountered the same error.
I also tried the QIIME 2 version 2021.11, and the same error again.

Thanks in advance.

Plugin error from phylogeny:

Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-mgp4422i/c0185c20-f1a8-4b77-87a2-024afca7065b/data/dna-sequences.fasta']' returned non-zero exit status 1.

Here is the log:
Making a distance matrix ..
5401 / 250374 (thread 0)/opt/conda/envs/qiime2-2021.11/bin/mafft: line 2756: 794 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-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in align_to_tree_mafft_fasttree
File "/opt/conda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/opt/conda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 485, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/opt/conda/envs/qiime2-2021.11/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 "", line 2, in mafft
File "/opt/conda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/opt/conda/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/opt/conda/envs/qiime2-2021.11/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-2021.11/lib/python3.8/site-packages/q2_alignment/_mafft.py", line 100, in _mafft
run_command(cmd, result_fp)
File "/opt/conda/envs/qiime2-2021.11/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-2021.11/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-mgp4422i/c0185c20-f1a8-4b77-87a2-024afca7065b/data/dna-sequences.fasta']' returned non-zero exit status 1.

Hi @eri5n,

Thanks for following up with those details!

It looks like you're running into this error when running align-to-tree-mafft-fasttree:

This usually indicates that you've run out of available RAM (i.e. memory) on your machine. Depending on what resources you have available to you, you can allocate more memory on your machine (if you aren't currently using the maximum available RAM), you could try running this command on another machine with more memory available, or you could run this command on an AWS instance , which you could provision with plenty of RAM, then download the outputs and run them locally on your machine.

Hope this helps! Let us know if you run into any further issues.

Cheers :lizard:

1 Like

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