plugin error for phylogeny

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

(qiime2-2019.7) [email protected]:~/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,

1 Like

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

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

(qiime2-2019.7) qiime2[email protected]:~/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.
1 Like

Good morning Liz,

I think I found the error:

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 before, 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

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
image

Thanks again,
Liz

Hello Liz,

Thanks for telling me more!

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

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

1 Like

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