Sample
Moonshine.Sample
— Typestruct 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/runner/work/Moonshine.jl/Moonshine.jl/src/Sample.jl:33
.
Sample(H; μ, ρ, Ne, sequence_length, positions)
defined at /home/runner/work/Moonshine.jl/Moonshine.jl/src/Sample.jl:49
.
Sample(ts)
defined at /home/runner/work/Moonshine.jl/Moonshine.jl/src/Sample.jl:64
.
Sample(rng, n, μ, ρ, Ne, sequence_length)
defined at /home/runner/work/Moonshine.jl/Moonshine.jl/src/Sample.jl:102
.
where:
n
: number of sequencesrng
: random number generatorts
: Tree Sequence
Moonshine.mask!
— Functionmask!(h, sample, idx; wipe = true)
Construct a mask for a range of markers.
If wipe = true
, h
is wiped beforehand.
See also wipe!
.
Methods
mask!(h, sample, idx; wipe)
defined at /home/runner/work/Moonshine.jl/Moonshine.jl/src/Sample.jl:251
.
–Internal–
Moonshine.mut_rate
— Functionmut_rate(sample, scaled = true)
(Scaled) mutation rate.
Moonshine.rec_rate
— Functionrec_rate(sample, scaled = true)
(Scaled) recombination rate.