I would like to create aligned-rep-seqs.qza from merged-rep-seqs.qza. But I couldn't it like that.
--i-sequences merged-rep-seqs.qza
--o-alignment aligned-rep-seqs.qza

Plugin error from alignment:
Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/var/folders/f6/744zv7hn72b8j94jxqfcs5rjrrwhlz/T/qiime2/toba1/data/afd9f936-bdc5-4811-9736-349a4b90933d/data/dna-sequences.fasta']' returned non-zero exit status 1.
Debug info has been saved to /var/folders/f6/744zv7hn72b8j94jxqfcs5rjrrwhlz/T/qiime2-q2cli-err-7g2g4tsi.log


Hello @Tacky, can you please rerun the command with the --verbose flag and post the results here. Thank you.

Thank you @Oddant1 !

(base) EB-PTH-J4YXWM37:~ toba1$ cd /Users/toba1/Desktop/Qiime2_test
(base) EB-PTH-J4YXWM37:Qiime2_test toba1$ conda activate qiime2-2023.2
(qiime2-2023.2) EB-PTH-J4YXWM37:Qiime2_test toba1$
(qiime2-2023.2) EB-PTH-J4YXWM37:Qiime2_test toba1$ time qiime alignment mafft \

--i-sequences merged-rep-seqs.qza
--o-alignment aligned-rep-seqs.qza
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/f6/744zv7hn72b8j94jxqfcs5rjrrwhlz/T/qiime2/toba1/data/afd9f936-bdc5-4811-9736-349a4b90933d/data/dna-sequences.fasta

inputfile = orig
231198 x 422 - 200 d
nthread = 1
nthreadpair = 1
nthreadtb = 1
ppenalty_ex = 0
stacksize: 8176 kb->45155 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00

Making a distance matrix ..
231101 / 231198 (thread 0)

/Users/miniconda3/envs/qiime2-2023.2/bin/mafft: line 2836: 10248 Killed: 9 "$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 "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/", line 468, in call
results = action(**arguments)
File "", line 2, in mafft
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/", line 274, in bound_callable
outputs = self.callable_executor(
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/", line 509, in callable_executor
output_views = self._callable(**view_args)
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_alignment/", line 128, in mafft
return _mafft(sequences_fp, None, n_threads, parttree, False)
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_alignment/", line 100, in _mafft
run_command(cmd, result_fp)
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2_alignment/", line 26, in run_command, stdout=output_f, check=True)
File "/Users/miniconda3/envs/qiime2-2023.2/lib/python3.8/", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/var/folders/f6/744zv7hn72b8j94jxqfcs5rjrrwhlz/T/qiime2/toba1/data/afd9f936-bdc5-4811-9736-349a4b90933d/data/dna-sequences.fasta']' returned non-zero exit status 1.

Plugin error from alignment:

Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/var/folders/f6/744zv7hn72b8j94jxqfcs5rjrrwhlz/T/qiime2/toba1/data/afd9f936-bdc5-4811-9736-349a4b90933d/data/dna-sequences.fasta']' returned non-zero exit status 1.

See above for debug info.

real 213m15.456s
user 208m52.590s
sys 2m36.883s


Hello @Tacky. The key part of that trace back is where it says

/Users/miniconda3/envs/qiime2-2023.2/bin/mafft: line 2836: 10248 Killed: 9

This means that your command didn't fail organically rather it was killed by your operating system. This most likely happened because you ran out of memory. If you are aligning a large number of sequences, you should pass the --p-parttree parameter. It is required if you aligning over 1000000 sequences.

If that does not solve the problem, you will need to get access to a computer with more RAM. If you have access to an institutional compute cluster you might be able to use that.

1 Like

Hello @Oddant1 .
--p-parttree parameter solved my issue. I got aligned-rep-seqs.qza !
Thank you so much.

Do I also need p-parttree parameter for making masked-aligned-rep-seqs.qza, unrooted-tree.qza and rooted-tree rooted-tree.qza ?

1 Like

@Tacky most likely yes.

@Oddant1 Thank you !

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