-
Notifications
You must be signed in to change notification settings - Fork 67
/
Mutator.h
39 lines (30 loc) · 900 Bytes
/
Mutator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <map>
#include "stdafx.h"
#include "Genome.h"
#include "Mutation.h"
namespace sim {
class Mutator; // TODO: Hide.
class DiploidMutator
{
public:
DiploidMutator();
~DiploidMutator();
//
// Create a synthetic genome from a reference genome.
//
const DiploidGenome *mutate(const Genome &genome, Sex sex) const;
//
// Register a mutation in 0-based chromosome coordinates.
// WARNING: 'pos' must be an offset from the start of the chromosome, not the genome.
//
void addMutation(const std::string &chrom, Pos pos, unsigned numReplaced,
const std::string &replacement, Sex sex);
//
// Chromosome coordinate conversion: mutated to unmutated.
//
Pos getTranslation(Sex sex, const std::string &chrom, Pos pos) const;
private:
Mutator *mutators; // Mom and dad, in that order.
};
}