Simulation
Types
PanGraph.Simulation.Params — Typestruct Params
N :: Int
L :: Int
σ :: Int
rate :: Rates
endStore 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.
PanGraph.Simulation.Rates — Typestruct Rates
snp :: Float64
hgt :: Float64
del :: Float64
inv :: Float64
endStore the rates of evolution of mutation snp, recombination hgt, deletion del, and inversion inv.
PanGraph.Simulation.Sequence — TypeSequence = 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
Functions
PanGraph.Simulation.delete! — Methoddelete!(s::Sequence, from::Int, to::Int)Delete the interval from:to from sequence s.
PanGraph.Simulation.insert! — Methodinsert!(acceptor::Sequence, donor::Sequence, at::Int)Insert sequence donor into acceptor at locus at.
PanGraph.Simulation.invert! — Methodinvert!(s::Sequence, from::Int, to::Int)Replace the interval from:to of sequence s with its reverse complement.
PanGraph.Simulation.model — Methodmodel(param::Params)Return an evolution function based upon parameters param.
PanGraph.Simulation.mutate! — Methodmutate!(s::Sequence, at::Int)Apply a random mutation to sequence s at locus at.
PanGraph.Simulation.nucleotide — Methodnucleotide(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.
PanGraph.Simulation.pancontig! — Methodpancontig!(s::Sequence, ancestor::Dict{Int,Array{Interval}})Return the ancestral tiling imprinted upon Sequence s. Modifies ancestor in place.
PanGraph.Simulation.pancontigs — Methodpancontigs(s::Sequence)Return the ancestral tiling imprinted upon a set of Sequences isolates.
PanGraph.Simulation.run — Methodrun(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.