Sample
Moonshine.Sample — Type
struct Sample <: AbstractVector{Sequence}Contain a sample of haplotypes and informations about them.
Implements the iteration interface and the array interface.
Fields
H::Vector{Sequence}: Vector of haplotypesμ::Float64: Unscaled (per-locus) mutation rateρ::Float64: Unscaled (per-locus) recombination rateNe::Float64: Effective population sizesequence_length::Float64: Sequence lengthpositions::Vector{Float64}: Marker's positionscoefs::Tuple{Float64, Float64}: Coefficients for positions' line
Constructors
Random constructor sample sequences via msprime using a binary mutation model.
Sample(H, μ, ρ, Ne, sequence_length, positions, coefs)
Sample(H, μ, ρ, Ne, sequence_length, positions, coefs)defined at /home/pfournier/Documents/Softwares/Moonshine.jl/src/Sample.jl:38.
Sample(H; μ, ρ, Ne, positions, sequence_length)defined at /home/pfournier/Documents/Softwares/Moonshine.jl/src/Sample.jl:54.
Sample(treesequence)defined at /home/pfournier/Documents/Softwares/Moonshine.jl/src/Sample.jl:69.
Sample(rng, n, μ, ρ, Ne, sequence_length)defined at /home/pfournier/Documents/Softwares/Moonshine.jl/src/Sample.jl:136.
Sample(mat, positions; μ, ρ, Ne)defined at /home/pfournier/Documents/Softwares/Moonshine.jl/src/Sample.jl:139.
where:
H: haplotypesμ(-1): mutation rateρ(-1): recombination rateNe(1): effective population sizepositions: position of markerssequence_length(maximum(positions)): sequence lengthn: number of sequencesrng: random number generatorts: Tree Sequencemat: matrix of haplotypes (haplotypes -> columns)
Moonshine.effective_pop_size — Function
effective_pop_size(sample, haploid=true)Effective population size. If haploid=true, it is multiplied by 2; the resulting value is the haploid effective population size (assuming the stored value is for diploids).
Moonshine.mut_rate — Function
mut_rate(sample, haploid=true)Mutation rate. If haploid=true, it is multiplied by 2; the resulting value is the haploid mutation rate (assuming the stored value is for diploids).
Moonshine.rec_rate — Function
rec_rate(sample, haploid=true)Recombination rate. If haploid=true, it is multiplied by 2; the resulting value is the haploid recombination rate (assuming the stored value is for diploids).