text: user191: Sometimes it useful to perform a nucleotide protein coding gene sequence alignment based on codons, not on individual nucleotides. For example for further codon model analysis it is important to have full codons.
  A widely used approach here is to perform a protein sequence alignment first and then impose this alignment to the nucleotide sequences using PAL2NAL, CodonAlign or something similar.
  This is how transAlign or GUIDANCE (in codon mode) work.
  The problem here is that you are discarding part of the information which could be potentially used for the sequence alignment. E.g. if you have slowly evolving low-complexity region adjacent to a quickly evolving one, the amino acid induced alignment could be wrong, while incorporating nucleotide sequence potentially allows to make the alignment more accurate.
  I'm aware of two programs which can do true codon alignment. First, PRANK has a dedicated codon model, but it is rather slow and using it is overkill for certain problems. Second, Sequence Manipulation Suite can perform codon alignments, but only for a pair of sequences; also it's javascript based, therefore it is hard to run it for a large number of sequences.
  Can you recommend any software for multiple codon sequence alignment? Preferably available for offline use.
  
  user8772: Virulign does this for virus sequences, the publication is available here and github address here
  
  user9259: Try MACSE v2 (https://academic.oup.com/mbe/article/35/10/2582/5079334) will align multiple protein-coding nucleotide sequences based on their amino acid translation while allowing for the occurrence of frameshifts
  
  user73: I don't know of any transcript-to-transcript aligners that are able to do this, but LAST can align transcript queries to protein reference sequences using a specified frameshift cost. Here's the specific documentation for that option:
  
  -F COST   
  Align DNA queries to protein reference sequences, using the specified
    frameshift cost. A value of 15 seems to be reasonable. (As a special
    case, -F0 means DNA-versus-protein alignment without frameshifts,
    which is faster.) The output looks like this:
  a score=108 s prot 2  40 + 649
  FLLQAVKLQDP-STPHQIVPSP-VSDLIATHTLCPRMKYQDD s dna  8 117 + 999
  FFLQ-IKLWDP\STPH*IVSSP/PSDLISAHTLCPRMKSQDN
  
  The \ indicates a forward shift by one nucleotide, and the / indicates
    a reverse shift by one nucleotide. The * indicates a stop codon. The
    same alignment in tabular format looks like this:
  108 prot 2 40 + 649 dna 8 117 + 999 4,1:0,6,0:1,10,0:-1,19
  
  The "-1" indicates the reverse frameshift.
  
  I sent an email to the LAST mailing list about adding a frameshift penalty for transcript-to-transcript matching; I've been pleasantly surprised with the requested features that Martin Frith has added to LAST in the past. Unfortunately, in this case the problem is too difficult to sort out due to all the possible combinations that could happen, so it's unlikely to be implemented in LAST in the forseeable future (unless someone else writes that code).
  
original_text: 191: <p>Sometimes it useful to perform a nucleotide protein coding gene sequence alignment based on codons, not on individual nucleotides. For example for further codon model analysis it is important to have full codons.</p>
  
  <p>A widely used approach here is to perform a protein sequence alignment first and then impose this alignment to the nucleotide sequences using <a href="http://www.bork.embl.de/pal2nal/" rel="noreferrer">PAL2NAL</a>, <a href="http://wbiomed.curtin.edu.au/bioinf/CodonAlign.php" rel="noreferrer">CodonAlign</a> or something similar.</p>
  
  <p>This is how <a href="https://dx.doi.org/10.1186/1471-2105-6-156" rel="noreferrer">transAlign</a> or <a href="http://guidance.tau.ac.il/ver2/" rel="noreferrer">GUIDANCE</a> (in codon mode) work.</p>
  
  <p>The problem here is that you are discarding part of the information which could be potentially used for the sequence alignment. E.g. if you have slowly evolving low-complexity region adjacent to a quickly evolving one, the amino acid induced alignment could be wrong, while incorporating nucleotide sequence potentially allows to make the alignment more accurate.</p>
  
  <p>I'm aware of two programs which can do true codon alignment. First, <a href="http://wasabiapp.org/software/prank/" rel="noreferrer">PRANK</a> has a dedicated codon model, but it is rather slow and using it is overkill for certain problems. Second, <a href="http://www.bioinformatics.org/sms2/pairwise_align_codons.html" rel="noreferrer">Sequence Manipulation Suite</a> can perform codon alignments, but only for a pair of sequences; also it's javascript based, therefore it is hard to run it for a large number of sequences.</p>
  
  <p>Can you recommend any software for multiple codon sequence alignment? Preferably available for offline use.</p>
   8772: <p>Virulign does this for virus sequences, the publication is available <a href="https://www.ncbi.nlm.nih.gov/pubmed/30295730" rel="nofollow noreferrer">here</a> and github address <a href="https://github.com/rega-cev/virulign" rel="nofollow noreferrer">here</a></p>
   9259: <p>Try MACSE v2 (<a href="https://academic.oup.com/mbe/article/35/10/2582/5079334" rel="nofollow noreferrer">https://academic.oup.com/mbe/article/35/10/2582/5079334</a>) will align multiple protein-coding nucleotide sequences based on their amino acid translation while allowing for the occurrence of frameshifts</p>
   73: <p>I don't know of any transcript-to-transcript aligners that are able to do this, but <a href="http://last.cbrc.jp/doc/lastal.html" rel="nofollow noreferrer">LAST</a> can align transcript queries to protein reference sequences using a specified frameshift cost. Here's the specific documentation for that option:</p>
  
  <blockquote>
    <p>-F COST   </p>
    
    <p>Align DNA queries to protein reference sequences, using the specified
    frameshift cost. A value of 15 seems to be reasonable. (As a special
    case, -F0 means DNA-versus-protein alignment without frameshifts,
    which is faster.) The output looks like this:</p>
  
  <pre><code>a score=108 s prot 2  40 + 649
  FLLQAVKLQDP-STPHQIVPSP-VSDLIATHTLCPRMKYQDD s dna  8 117 + 999
  FFLQ-IKLWDP\STPH*IVSSP/PSDLISAHTLCPRMKSQDN
  </code></pre>
    
    <p>The \ indicates a forward shift by one nucleotide, and the / indicates
    a reverse shift by one nucleotide. The * indicates a stop codon. The
    same alignment in tabular format looks like this:</p>
  
  <pre><code>108 prot 2 40 + 649 dna 8 117 + 999 4,1:0,6,0:1,10,0:-1,19
  </code></pre>
    
    <p>The "-1" indicates the reverse frameshift.</p>
  </blockquote>
  
  <p>I sent an email to the <a href="https://groups.google.com/forum/#!forum/last-align" rel="nofollow noreferrer">LAST mailing list</a> about adding a frameshift penalty for transcript-to-transcript matching; I've been pleasantly surprised with the requested features that Martin Frith has added to LAST in the past. Unfortunately, in this case the problem is too difficult to sort out due to all the possible combinations that could happen, so it's unlikely to be implemented in LAST in the forseeable future (unless someone else writes that code).</p>
  