setMutationModel {pedprobr}R Documentation

Set a mutation model

Description

NB: This function has been replaced by pedtools::setMutmod(). This function attaches mutation models to a pedigree with marker data, calling pedmut::mutationModel() for creating the models.

Usage

setMutationModel(x, model, markers = NULL, ...)

Arguments

x

A ped object or a list of such.

model

A model name implemented by pedmut::mutationModel() (see Details), or NULL.

markers

A vector of names or indices referring to markers attached to x. (Default: All markers.)

...

Arguments forwarded to pedmut::mutationModel(), e.g., rate.

Details

Currently, the following models are handled:

Value

An object similar to x.

Examples

### Example requires the pedmut package ###
if (requireNamespace("pedmut", quietly = TRUE)){

# A pedigree with data from a single marker
x = nuclearPed(1) |>
  addMarker(geno = c("a/a", NA, "b/b")) # mutation!

# Set `equal` model
y = setMutationModel(x, marker = 1, model = "equal", rate = 0.01)

# Inspect model
mutmod(y, 1)

# Likelihood
likelihood(y, 1)

# Remove mutation model
z = setMutationModel(y, model = NULL)
stopifnot(identical(z, x))
}


[Package pedprobr version 0.9.4 Index]