magnusdv / forrel

Forensic pedigree analysis and relatedness inference
GNU General Public License v2.0
11 stars 0 forks source link

inbreeding and simulation #4

Closed thoree closed 6 years ago

thoree commented 6 years ago

Something simillar (https://github.com/magnusdv/pedprobr/issues/1) for the wish-list: simulation with inbred founders

library(pedtools)
library(forrel)
x = singleton(1)
m = marker(x, alleles= 1:5)
founder_inbreeding(x,1) = 1
markerSim(x, N=1 , partialmarker = m, seed = 17)
#> Unconditional simulation of 1 autosomal marker.
#> Individuals: 1
#> Allele frequencies:
#>    1   2   3   4   5
#>  0.2 0.2 0.2 0.2 0.2
#> Mutation model: No 
#> 
#> Simulation finished.
#> Number of calls to the likelihood function: 0.
#> Total time used: 0.05 seconds.
#>  id fid mid sex <1>
#>   1   *   *   1 2/1

Created on 2018-08-15 by the reprex package (v0.2.0).

magnusdv commented 6 years ago

Implemented for autosomal markers in e7f2f83.