Simulation

Types

PanGraph.Simulation.ParamsType
struct Params
	N    :: Int
	L    :: Int
	σ    :: Int
	rate :: Rates
end

Store all parameters of a single recombinative Wright-Fisher model. N is the population size. L is the expected genome size of all descendants. σ is the variance of genome size of all descendants. rate is the various rate of evolutionary processes.

source
PanGraph.Simulation.RatesType
struct Rates
	snp :: Float64
	hgt :: Float64
	del :: Float64
	inv :: Float64
end

Store the rates of evolution of mutation snp, recombination hgt, deletion del, and inversion inv.

source
PanGraph.Simulation.SequenceType
Sequence = Array{UInt64,1}

A bitpacked array of sequence state. Each UInt64 bits are interpreted as

30 bytes(ancestor) | 30 bytes (location) | 3 bytes (mutation) | 1 byte strand

source

Functions

PanGraph.Simulation.nucleotideMethod
nucleotide(sequence::Array{Sequence}, ancestor::Array{Array{UInt8,1},1})

Generate the set of extant sequences from the ancestral mosiacs sequence and the original sequences ancestor.

source
PanGraph.Simulation.pancontig!Method
pancontig!(s::Sequence, ancestor::Dict{Int,Array{Interval}})

Return the ancestral tiling imprinted upon Sequence s. Modifies ancestor in place.

source
PanGraph.Simulation.runMethod
run(evolve!::Function, time::Int, initial::Array{Array{UInt8,1},1}; graph=false)

The high level API of the module. Evolves a set of initial sequences initial for time generations using the one-step evolution function evolve! If graph is true, the function will return the pangraph associated to the ancestral tiling.

source