Difference between revisions of "830 - Haplotyper::ImputeGenotypes()"
From Genome Analysis Wiki
Jump to navigationJump to searchLine 20: | Line 20: | ||
Transpose(from, to, thetas[i]); | Transpose(from, to, thetas[i]); | ||
− | + | RetrieveMemoryBlock(i); | |
− | |||
− | |||
− | + | ImputeGenotypes(leftMatrices[i], to, i); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ConditionOnData(to, i, genotypes[states / 2][i]); | ConditionOnData(to, i, genotypes[states / 2][i]); | ||
Latest revision as of 14:19, 2 October 2013
void Haplotyper::ImputeGenotypes()
{
RewindMemoryPool();
// Process the last position
RetrieveMemoryBlock(markers - 1);
ImputeGenotypes(leftMatrices[markers - 1], markers - 1);
SetupPrior(rightMatrices[0]);
ConditionOnData(rightMatrices[0], 0, current_genotypes[0]);
float *temp;
float *from = rightMatrices[0];
float *to = rightMatrices[1];
for (int i = markers - 2; i >= 0; i--)
{
// Move things along
Transpose(from, to, thetas[i]);
RetrieveMemoryBlock(i);
ImputeGenotypes(leftMatrices[i], to, i);
ConditionOnData(to, i, genotypes[states / 2][i]);
temp = from;
from = to;
to = temp;
}
}