<p>The classic tools for this are <a href="https://www.ebi.ac.uk/Tools/psa/genewise/" rel="nofollow noreferrer"><code>genewise</code></a> and the <a href="https://bioinformatics.stackexchange.com/a/2879/298">already mentioned</a> <code>exonerate</code>. Both are capable fo aligning protein sequences to genomic DNA (or cDNA) while modelling splice sites to give you a gene model.</p>

<p>For example, this is <a href="https://www.ebi.ac.uk/Tools/services/web/toolresult.ebi?jobId=genewise-I20171117-113519-0691-25950205-pg" rel="nofollow noreferrer">the output</a><sup>1</sup> of <code>genewise</code> on your sequences:</p>

<pre><code>EMBOSS_001         1 MHDTTDVRTYVR----RRRL                              
                     MHDTTDVRTYVR    RRRL                              
                     MHDTTDVRTYVRTYVRRRRL                              
EMBOSS_001         1 acgaaggcatgcatgcacac                              
                     taaccatgcatgcatggggt                              
                     gctgtcatgcatgcagatac                              
</code></pre>

<p>The output also includes a GFF of your sequence:</p>

<pre><code>EMBOSS_001  GeneWise    match   1   60  22.88   +   .   EMBOSS_001-genewise-prediction-1
EMBOSS_001  GeneWise    cds 1   60  0.00    +   0   EMBOSS_001-genewise-prediction-1    
</code></pre>

<p>Back when I was using these tools daily to align proteins to genomes, I found that exonerate was <em>much</em> faster but sometimes slightly less accurate. This was a few years ago now though, so that might have changed. I would always suggest trying exonerate first and only going for genewise if it fails.</p>

<hr>

<p><sup>1</sup><sub>This link will only be valid for a short while, but I just used the sequences from the OP as input for the <a href="https://www.ebi.ac.uk/Tools/psa/genewise/" rel="nofollow noreferrer">GeneWise webserver</a>.</sub></p>

CC BY-SA 3.0
2017-11-20T08:05:39.047Z
Thanks, The GeneWise seems to work as well, but the Resulting GFF is quite useless. It would be great if it would give an annotation for the intron, but that is unfortunately not the case.
user1817
CC BY-SA 3.0
2017-11-20T09:11:14.660Z
@user1817 what do you mean? Of course it annotates the intron. It won't in your example since that's too small to be a real intron, but try it on a real sequence and the GFF will include the introns. I just ran p54 against its gene, for example, and the [introns are there](https://www.ebi.ac.uk/Tools/services/web/toolresult.ebi?jobId=genewise-I20171120-090359-0901-91875331-pg).
terdon
CC BY-SA 3.0
2017-11-17T11:39:02.687Z
2017-11-17T11:39:02.687Z
terdon
<p>Have a look at <a href="https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate" rel="nofollow noreferrer">exonerate</a>'s protein2genome!
From the <a href="https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate-user-guide" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p><strong>Aligning a protein to genomic sequence:</strong></p>
  
  <p>Similarly, it is possible to align a protein sequence to the genome, (similar to GeneWise, but with
  heuristics).</p>
  
  <p><code>exonerate --model protein2genome query.fasta target.fasta</code> </p>
  
  <p>This model will allow introns in the alignment, but also allow frameshifts, and
  exon phase changes when a codon is split by an intron.</p>
</blockquote>

CC BY-SA 3.0
2017-11-17T09:24:13.330Z
2017-11-17T09:54:29.733Z
2017-11-17T09:54:29.733Z
holmrenser
<p>Does anyone know of a program that can align a genomic sequence with introns with the corresponding amino acid sequence?</p>
<p>I have both the genomic sequence and the correct amino acid sequence but no information on the genemodel in e.g. gff or genbank format.</p>
<p>This is not what one would call a 'normal' alignment, but I would like it to look like this:</p>
<h3>Hypothetical example:</h3>
<p>nucleotide sequence with intron in italic:</p>
<p>ATGCACGATACGACTGACGTACGT<em>ACGTACGTACGT</em>ACGTACGTACGGAGACGTAGACTC</p>
<p>corresponding amino acid sequence:</p>
<p>MHDTTDVRTYVRRRRL</p>
<p>The intron does not encode for amino acid which should thus result in a gap in the 'alignment'.
Desired 'alignment':</p>
<pre><code>ATGCACGATACGACTGACGTACGTACGTACGTACGTACGTACGTACGGAGACGTAGACTC
  M  H  D  T  T  D  V  R              T  Y  V  R  R  R  R L
</code></pre>

<phylogenetics>
How to align genomic sequence with corresponding amino acid sequence
# How to align genomic sequence with corresponding amino acid sequence

(Asked by: username_0 on 2017-11-17)

Does anyone know of a program that can align a genomic sequence with introns with the corresponding amino acid sequence?
I have both the genomic sequence and the correct amino acid sequence but no information on the genemodel in e.g. gff or genbank format.
This is not what one would call a 'normal' alignment, but I would like it to look like this:
Hypothetical example:
nucleotide sequence with intron in italic:
ATGCACGATACGACTGACGTACGTACGTACGTACGTACGTACGTACGGAGACGTAGACTC
corresponding amino acid sequence:
MHDTTDVRTYVRRRRL
The intron does not encode for amino acid which should thus result in a gap in the 'alignment'.
Desired 'alignment':
ATGCACGATACGACTGACGTACGTACGTACGTACGTACGTACGTACGGAGACGTAGACTC
  M  H  D  T  T  D  V  R              T  Y  V  R  R  R  R L

**Tags:** phylogenetics

---

## 2 answers

### Answer by username_2 on 2017-11-17. Score: 3 | Accepted answer

Have a look at [exonerate](https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate)'s protein2genome!
From the [documentation](https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate-user-guide):

> **Aligning a protein to genomic sequence:**
>
> Similarly, it is possible to align a protein sequence to the genome, (similar to GeneWise, but with
> heuristics).
>
> `exonerate --model protein2genome query.fasta target.fasta`
>
> This model will allow introns in the alignment, but also allow frameshifts, and
> exon phase changes when a codon is split by an intron.


---

### Answer by username_1 on 2017-11-17. Score: 3

The classic tools for this are genewise and the already mentioned exonerate. Both are capable fo aligning protein sequences to genomic DNA (or cDNA) while modelling splice sites to give you a gene model.
For example, this is the output1 of genewise on your sequences:
EMBOSS_001         1 MHDTTDVRTYVR----RRRL                              
                     MHDTTDVRTYVR    RRRL                              
                     MHDTTDVRTYVRTYVRRRRL                              
EMBOSS_001         1 acgaaggcatgcatgcacac                              
                     taaccatgcatgcatggggt                              
                     gctgtcatgcatgcagatac                              

The output also includes a GFF of your sequence:
EMBOSS_001  GeneWise    match   1   60  22.88   +   .   EMBOSS_001-genewise-prediction-1
EMBOSS_001  GeneWise    cds 1   60  0.00    +   0   EMBOSS_001-genewise-prediction-1    

Back when I was using these tools daily to align proteins to genomes, I found that exonerate was much faster but sometimes slightly less accurate. This was a few years ago now though, so that might have changed. I would always suggest trying exonerate first and only going for genewise if it fails.

1This link will only be valid for a short while, but I just used the sequences from the OP as input for the GeneWise webserver.

> **Comments:**
> **username_0**: Thanks, The GeneWise seems to work as well, but the Resulting GFF is quite useless. It would be great if it would give an annotation for the intron, but that is unfortunately not the case.  
> **username_1**: @user1817 what do you mean? Of course it annotates the intron. It won't in your example since that's too small to be a real intron, but try it on a real sequence and the GFF will include the introns. I just ran p54 against its gene, for example, and the [introns are there](https://www.ebi.ac.uk/Tools/services/web/toolresult.ebi?jobId=genewise-I20171120-090359-0901-91875331-pg).  

---

