From Genome Analysis Wiki
Jump to navigationJump to search
163 bytes removed
, 15:56, 13 September 2013
Line 9: |
Line 9: |
| // | | // |
| // haplotypes[i][j] includes haplotypes for each individual | | // haplotypes[i][j] includes haplotypes for each individual |
− | // i ranges from 0 .. 2 * individuals | + | // i ranges from 0 .. 2 * individuals - 1 |
| // coded as 0 or 1, no missing data | | // coded as 0 or 1, no missing data |
| | | |
Line 19: |
Line 19: |
| if (genotypes[i][j] != GENOTYPE_MISSING) | | if (genotypes[i][j] != GENOTYPE_MISSING) |
| alleles += 2, mac += genotypes[i][j] - 1; | | alleles += 2, mac += genotypes[i][j] - 1; |
− |
| |
− | for (int i = individuals; i < individuals; i++)
| |
− | {
| |
− | mac += haplotypes[i * 2][j] == 1;
| |
− | mac += haplotypes[i * 2 + 1][j] == 1;
| |
− | }
| |
| | | |
| if (alleles == 0) | | if (alleles == 0) |