mothur

Align.seqs() [ERROR]: template is not aligned, aborting


#1

The command:
align.seqs(fasta=stability.trim.contigs.good.unique.fasta, reference=silva.v3-4.fasta)
The error:
[ERROR]: template is not aligned, aborting.

Before that, I used these commands to get the reference file:
pcr.seqs(fasta=silva.nr_v132.align, start=6388, end=26000, keepdots=F, oligos=primers.oligos, pdiffs=2, rdiffs=2)
rename.file(input=silva.nr_v132.pcr.align, new=silva.v3-4.fasta)

I don’t get this error if I don’t provide the oligos file in pcr.seqs(). But then I can’t filter the SILVA reference for the primers used in my research!

I could align the reference file (silva.v3-4.fasta) before using align.seqs(), for example with MUSCLE. Then align.seqs() will work. But not if the reference file is too big!
And indeed, the file is too big, even if I give MUSCLE the parameters “-maxiters 1 -diags1 -sv”.

How do I fix this problem and get align.seqs to work?
Thank you in advance.

mothur v.1.40.5
Windows 10
I am using the full-length SILVA 132 reference.

My oligos file is pretty simple:

primer CCTACGGGNGGCWGCAG GACTACHVGGGTATCTAATCC S-D-Bact


#2

A couple of things to try…

  1. Can you update your version of mothur to 1.41.1?
  2. Try making your oligos file look like this instead…
forward CCTACGGGNGGCWGCAG
reverse GACTACHVGGGTATCTAATCC
  1. It’s generally a bad idea/dangerous to put hyphens (’-’) in file and group names when using mothur since we use hyphens for a specific purpose in several commands

#3

i have tried these 3 steps, and it didn’t help.
Updated Mothur to v.1.41.1. Made the oligos file look like you said. Avoided hyphens in the oligos file and in file names.

Just in case, I have tested it both on the full-length SILVA, as well as the SILVA-based bacterial reference used in the MiSeq SOP. Both gave the same “template not aligned” error in the end.


#4

Thanks for reporting this issue. Mothur was not adjusting the alignment properly after the pcr.seqs trimming. This caused a few sequences to have different lengths, resulting in the align.seqs command failure. I will fix the issue and the change will be part of our next release. As a workaround, you can set the keepdots parameter to true.


#5

I set keepdots to true, and it worked.
At least, I don’t get this error anymore and align.seqs() actually starts aligning.

Thank you for your help. I will be looking forward to the next release.


#6

I released version 1.41.2 which includes the fix. You can download it here, https://github.com/mothur/mothur/releases/tag/v1.41.2.