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

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

1 Like

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

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.

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.

1 Like

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.

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.

1 Like

Thank you for fixing it and for keeping me posted.

The “template not aligned” problem is solved now.

1 Like

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