-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimulate.h
24 lines (20 loc) · 1.04 KB
/
simulate.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
#include <random>
#include "trajec.h"
namespace TrajectoryLikelihood {
struct SimulationConfig {
int initSeqLen;
int maxGapLen;
int trials;
int verbose;
SimulationConfig() : initSeqLen(1000), maxGapLen(100), trials(100), verbose(0) { }
SimulationConfig (int i, int g, int t, int v) : initSeqLen(i), maxGapLen(g), trials(t), verbose(v) { }
};
struct SimulationCounts {
vector<vector<long long> > count;
long long overflowCount;
SimulationCounts (int len) : count (len + 1, vector<long long> (len + 1, 0)), overflowCount(0) { }
};
SimulationCounts chopZoneSimulatedCounts (const IndelParams& params, double time, const SimulationConfig& config, mt19937& rnd); // result is indexed [nDeleted][nInserted]
vector<vector<double> > chopZoneSimulatedProbabilities (const IndelParams& params, double time, const SimulationConfig& config, mt19937& rnd, bool reportCountsInstead = false);
void simulateIndels (vector<int>& seq, const IndelParams& params, double time, mt19937& rnd, int verbose, int insertedValue = 0);
}