sim_inf_chrom {junctions} | R Documentation |
Individual based simulation of the accumulation of junctions for a chromosome with an infinite number of recombination sites.
sim_inf_chrom(pop_size, initial_heterozygosity, total_runtime, morgan, markers, seed)
pop_size |
Population Size |
initial_heterozygosity |
Initial frequency of heterozygosity (e.g. in Hardy-Weinberg this equates to 2pq) |
total_runtime |
Maximum time after which the simulation is to be stopped |
morgan |
Size of the chromosome in Morgan |
markers |
The number of genetic markers superimposed on the chromosome. If markers is set to -1, no markers are superimposed (faster simulation) |
seed |
Seed of the pseudo-random number generator |
avgJunctions |
vector of the average number of junctions at time = [0, total_runtime] |
detectedJunctions |
vector of the detected number of junctions at time = [0, total_runtime] |
Thijs Janzen
N = 100 #population size H_0 = 0.5 #initial heterozygosity maxT = 1000 #run time C = 1 #number of recombinations per meiosis numMarkers = 100 seed = 42 v <- sim_inf_chrom(N, H_0, maxT, C, numMarkers, seed) plot(v$avgJunctions, type = "l", xlab = "Generations", ylab = "Number of Junctions", main = "Example Infinite Chromosome") lines(v$detectedJunctions, col = "blue") legend("bottomright", c("Real number","Number detected"), lty = 1, col = c("black", "blue"))