Compute shared polymorphism

This recipe is meant to compare two alignments in order to estimate the number of shared / fixed synonymous polymorphism.

Get the alignments
We assume here that the data for the two populations to compare are in two SiteContainers names sites1 and sites2. These containers need not be PolymorphismSiteContainers, but have to contain codon sequences and the exact same number of sites.

Restrict to synonymous polymorphism
[This step can be omitted, depending on your needs]

There we need to loop over all sites in the containers. This can efficiently be done via a function:

Compare the two containers
There you go!