Answers.Body: <p>There are tons of methods that do something similar to this. Is it necessary that it be <em>alignment</em> rather than a heuristic such as k-mer hashing?</p>
  <p>If k-mer hashing is ok, then I would suggest <a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0997-x" rel="nofollow noreferrer">mash</a> or <a href="https://sourmash.readthedocs.io/" rel="nofollow noreferrer">sourmash</a>. There are additionally newer <a href="https://academic.oup.com/nargab/article/3/1/lqab001/6125549" rel="nofollow noreferrer">fancy techniques</a>.</p>
  <p>For just an old-school program that computes pairwise identities, <a href="https://evolution.genetics.washington.edu/phylip.html" rel="nofollow noreferrer">PHYLIP</a> has programs DNADIST and PROTDIST that exactly compute identities. <a href="https://www.biostars.org/p/301422/" rel="nofollow noreferrer">Similar questions on biostars</a> suggest that PHYLIP's utilities are recommended even relatively recently elsewhere. But it looks like <a href="https://www.ebi.ac.uk/Tools/msa/clustalo/" rel="nofollow noreferrer">Clustal Omega</a> also computes identities for free.</p>
  <p>For microbial genomes a common statistic is <a href="https://www.sciencedirect.com/science/article/abs/pii/S0580951714000087" rel="nofollow noreferrer">average nucleotide identity</a> (ANI), which may be what you are looking for. There are a variety of tools to do this, here is <a href="https://www.nature.com/articles/s41467-018-07641-9" rel="nofollow noreferrer">one</a>, and <a href="http://enve-omics.ce.gatech.edu/ani/" rel="nofollow noreferrer">here is a webserver</a> that will do it for you.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-23T08:31:59.077Z
Answers.LastActivityDate: 2021-08-23T08:31:59.077Z
Answers.UserDisplayName: Maximilian Press
Body: <ul>
  <li>Given a multi-fasta multiple sequence alignment file, is there a quick way/tool to calculate average pairwise sequence identity?</li>
  <li>Even better, given a whole genome alignment file (<code>.maf</code> or even <code>.hal</code>) is there a quick way/tool to calculate average pairwise sequence identity across the individual local multiple sequence alignments?</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-16T18:43:25.517Z
Comments.Text: Thanks for reminding me, and apologies for not accepting earlier. I found what I was looking for in [maftools](https://github.com/dentearl/mafTools/tree/master/mafCoverage), but agree the answer below was also useful.
Comments.UserDisplayName: Throckmorton
Tags: <phylogenetics>
Title: Alignment statistics
ThreadText: # Alignment statistics
  
  (Asked by: username_0 on 2021-08-18)
  
  * Given a multi-fasta multiple sequence alignment file, is there a quick way/tool to calculate average pairwise sequence identity?
  * Even better, given a whole genome alignment file (`.maf` or even `.hal`) is there a quick way/tool to calculate average pairwise sequence identity across the individual local multiple sequence alignments?
  
  **Tags:** phylogenetics
  
  > **Comments:**
  > **username_0**: Thanks for reminding me, and apologies for not accepting earlier. I found what I was looking for in [maftools](https://github.com/dentearl/mafTools/tree/master/mafCoverage), but agree the answer below was also useful.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-23. Score: 2 | Accepted answer
  
  There are tons of methods that do something similar to this. Is it necessary that it be *alignment* rather than a heuristic such as k-mer hashing?
  
  If k-mer hashing is ok, then I would suggest [mash](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0997-x) or [sourmash](https://sourmash.readthedocs.io/). There are additionally newer [fancy techniques](https://academic.oup.com/nargab/article/3/1/lqab001/6125549).
  
  For just an old-school program that computes pairwise identities, [PHYLIP](https://evolution.genetics.washington.edu/phylip.html) has programs DNADIST and PROTDIST that exactly compute identities. [Similar questions on biostars](https://www.biostars.org/p/301422/) suggest that PHYLIP's utilities are recommended even relatively recently elsewhere. But it looks like [Clustal Omega](https://www.ebi.ac.uk/Tools/msa/clustalo/) also computes identities for free.
  
  For microbial genomes a common statistic is [average nucleotide identity](https://www.sciencedirect.com/science/article/abs/pii/S0580951714000087) (ANI), which may be what you are looking for. There are a variety of tools to do this, here is [one](https://www.nature.com/articles/s41467-018-07641-9), and [here is a webserver](http://enve-omics.ce.gatech.edu/ani/) that will do it for you.
  
  
  ---
  
  