Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T08:05:39.047Z
Answers.Text: 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.
Answers.UserDisplayName: user1817
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T09:11:14.660Z
Answers.Text: @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).
Answers.UserDisplayName: terdon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-17T11:39:02.687Z
Answers.LastActivityDate: 2017-11-17T11:39:02.687Z
Answers.UserDisplayName: terdon
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-17T09:24:13.330Z
Answers.LastActivityDate: 2017-11-17T09:54:29.733Z
Answers.LastEditDate: 2017-11-17T09:54:29.733Z
Answers.UserDisplayName: holmrenser
Body: <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>
  
Tags: <phylogenetics>
Title: How to align genomic sequence with corresponding amino acid sequence
ThreadText: # 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:
  
  ATGCACGATACGACTGACGTACGT*ACGTACGTACGT*ACGTACGTACGGAGACGTAGACTC
  
  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`](https://www.ebi.ac.uk/Tools/psa/genewise/) and the [already mentioned](https://bioinformatics.stackexchange.com/a/2879/298) `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 output](https://www.ebi.ac.uk/Tools/services/web/toolresult.ebi?jobId=genewise-I20171117-113519-0691-25950205-pg)1 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](https://www.ebi.ac.uk/Tools/psa/genewise/).
  
  > **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**: @username_0 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).  
  
  ---
  
  