Filtering for SNPs fixed on opposite alleles

The goal is to find SNPs where the populations contain mostly opposite alleles. We will define mostly as 90% of the alleles, or a minor allele frequency of less the 10%. Either allele can be fixed in an population, and it is possible that there is no SNP call at all in one population, making it a likely reference match. The .01 is added to the denominators to prevent division by zero. In the history panel we see column 22 is the A allele count in the light population, 23 is the B allele. Column 26 is the A allele count in the dark population, 27 is the B allele (blue boxes). To do this we will use the filter tool with a fairly long expression that is shown and further described below.

Choose the "SNP table with sums" dataset to filter. Copy and paste the filter expression below into the condition box (red arrow). Click the execute button (green arrow).

Filter description:

(light <10% A allele*) and (dark <10% B allele) or
(light <10% B allele) and (dark <10% A allele) or
(light no alleles, assumed ref) and (dark <10% A allele) or
(dark no alleles, assumed ref) and (light <10% A allele) 
Filter expression:
(c22/(c22+c23+.01) < .1 and c27/(c26+c27+.01) < .1) or 
(c23/(c22+c23+.01) < .1 and c26/(c26+c27+.01) < .1) or 
(c22==-1 and c23==-1 and c26/(c26+c27+.01) < .1) or 
(c26==-1 and c27==-1 and c22/(c22+c23+.01) < .1)

[screen shot]