# custom reference alignment for functional genes

**URL:** <https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176>\
**Category:** Theory behind mothur\
**Created:** [January 14, 2013, 8:59am UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176 "2013-01-14T08:59:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirk](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Kirk](https://forum.mothur.org/u/Kirk)\
**Post date:** [January 14, 2013, 8:59am UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/1 "2013-01-14T08:59:30Z")

</div>

Dear,

I was wondering if the reference alignment should have a specific format? I’ve alway been using 16S sequences, but now I started with funcional genes.  
I’ve compiled a reference alignment using MEGA, but when I try to use it, I get an error message

[ERROR]: template is not aligned, aborting.

Does it need some additional formatting, although I can’t immediately see what could be wrong?

e.g.

```nohighlight
>YP_001167793.1_Rhodobacter_sphaeroides_ATCC17025
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ATGTTTACCCGCCGCGCCGCC------------------------------------------------------------------------------------------------------------------------------------------------------------------CTCGTGGGAGCCGCCGCGCTCGCGTCAGCG---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------CCGCTCGTCATCCGGACGGCAGGCGCCGAGGAAGCTCCGGCCCAGCTTGCCAGTGCAGCCCCCGTCGATCTCAGCAACCTGCCCCGC---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------GTGAAGCACACG------CTCGTGCCTCCGCCCTTCGCGCATGCCCACGAGCAGGTGGCCGCCAGC------------------------------------------------------------------------------GGC---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------CCCGTCATC------AAC---GAATTCGAGATGCGGATCATCGAGAAGGAA---GTGCAGCTCGAC---GAA---GATGCCTACCTGCAGGCGATGACCTTCGAC------------------------GGCTCGATCCCC---------GGCCCGCTGATGATCGTGCATGAGGGCGACTATGTCGAACTCACCCTGATCAACCCGCCCGAGAACACC---------------------------------------------------------------------------------------------ATGCCCCACAACATCGACTTCCACGCCGCCACCGGCGCGCTG------------GGAGGCGGCGGGCTCACGCTC---------ATCAATCCGGGCGAAAAGGTCGTCCTGCGGTTCAAGGCCACGCGCGCGGGCGCCTTCGTCTATCACTGCGCCCCCGGCGGCCCGATG---ATCCCCTGGCACGTCGTC---GGCGAGTGGGACAACGACCTGATGGAACAGGTCGTGGCGCCGGTCGGCCTCACCGGCTGA-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

```

thanks

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [January 14, 2013, 2:53pm UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/2 "2013-01-14T14:53:44Z")

</div>

Mothur gives that warning when the sequences are not all the same length. Can you run summary.seqs on your template and post the results?

---

<div class="post-metadata">

**Author:** ![Kirk](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Kirk](https://forum.mothur.org/u/Kirk)\
**Post date:** [January 14, 2013, 3:12pm UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/3 "2013-01-14T15:12:23Z")

</div>

Hi,

I’ve realigned the references and now it works.

Thanks

---

<div class="post-metadata">

**Author:** ![Ghazal](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@Ghazal](https://forum.mothur.org/u/Ghazal)\
**Post date:** [February 3, 2015, 10:48am UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/4 "2015-02-03T10:48:25Z")

</div>

Hello  
with special thanks to you for your great software, I have exactly the same problem.  
I am using “gold” as my reference and whatever I did, the mothur gives me the error:

[ERROR]: template is not aligned, aborting.

I have used this reference before a lot and this is the first time I encounter this error.

This is the summary of my template:

mothur \> summary.seqs(fasta=gold.fasta)

Using 1 processors.

Start End NBases Ambigs Polymer NumSeqs  
Minimum: 1 1205 1205 0 4 1  
2.5%-tile: 1 1335 1335 0 5 260  
25%-tile: 1 1445 1445 0 5 2591  
Median: 1 1476 1476 0 5 5182  
75%-tile: 1 1507 1507 2 6 7772  
97.5%-tile: 1 1550 1550 20 7 10103  
Maximum: 1 1655 1655 30 16 10362  
Mean: 1 1469.86 1469.86 2.26809 5.55761

# of Seqs: 10362

would you please help me?

Thanks  
Ghazal

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 3, 2015, 1:40pm UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/5 "2015-02-03T13:40:29Z")

</div>

Where are you getting the gold.fasta file from? The silva-formatted version is available here: [http://www.mothur.org/w/images/f/f1/Silva.gold.bacteria.zip](http://www.mothur.org/w/images/f/f1/Silva.gold.bacteria.zip)

---

<div class="post-metadata">

**Author:** ![Ghazal](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@Ghazal](https://forum.mothur.org/u/Ghazal)\
**Post date:** [February 6, 2015, 10:23am UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/6 "2015-02-06T10:23:20Z")

</div>

Actually I am replicating another study and have to use gold.fasta as they have used it before.  
Anyway, thanks a lot for your reply.

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 6, 2015, 12:53pm UTC](https://forum.mothur.org/t/custom-reference-alignment-for-functional-genes/1176/7 "2015-02-06T12:53:24Z")

</div>

I suspect our version of the gold is the same as theirs.

Pat
