Closed thoree closed 5 years ago
Yes, but you need to create the mutation model as a separate object first:
library(pedtools)
# Create the mutation model object
mutmat = matrix(c(0.99, 0.1, 0.01, 0.9), ncol = 2, dimnames = list(1:2, 1:2))
mutmod = pedmut::mutationModel(model = "custom", matrix = mutmat)
# Now this can be included as a locus annotation
locus = list(name = "M", alleles = 1:2, mutmod = mutmod)
x = setMarkers(nuclearPed(1), locus = list(locus))
# Inspect:
mutmod(x, marker = 1)
#> Unisex mutation matrix:
#> 1 2
#> 1 0.99 0.01
#> 2 0.10 0.90
#>
#> Model: custom
#> Rate: NA
#>
#> Lumpable: Always
Created on 2019-08-01 by the reprex package (v0.3.0)
Fine - thanks!
Is it possible to also set the
custom
model. I unsuccessfully tried:Created on 2019-07-31 by the reprex package (v0.3.0)