merlinLod | R Documentation |
This function is a wrapper for the parametric linkage functionality of the MERLIN software. For this to work, MERLIN must be installed and correctly pointed to in the PATH environment variable.
merlinLod(
x,
aff,
model,
map = NULL,
markers = NULL,
rho = 0,
liability = NULL,
maxOnly = NA,
options = "",
dir = tempdir(),
cleanup = TRUE,
verbose = FALSE,
...
)
x |
A |
aff |
A vector naming the affected pedigree members, or a numeric vector
of length |
model |
A |
map |
A data frame with columns according to MERLIN format for map files. |
markers |
A vector of marker names or indices referring to markers
attached to |
rho |
A numeric with values between 0 and 0.5: The recombination
value(s) for which the LOD score is computed. The value of Note: This parameter only works when |
liability |
NULL (default) or a vector of length |
maxOnly |
a logical indicating whether only the maximum LOD score should be returned. By default this is always done if the number of markers is 1. |
options |
A character with additional options to the MERLIN command. |
dir |
Path to a directory where the MERLIN input files should be created. |
cleanup |
A logical indicating if MERLIN files should be removed after use. Default: TRUE. |
verbose |
a logical: verbose output or not. |
... |
Further arguments passed on to |
By default the following MERLIN command is run (via a call to system()
)
after creating appropriate files in a temporary (or user specified) directory:
_merlin.freq --model _merlin.model --tabulate --markerNames --quiet
The resulting multipoint LOD scores are extracted from the output and returned in R as a linkres object.
If the number of markers is 1, or if maxOnly = TRUE
, a single
number is returned.
Otherwise a linkres
object similar to the output of lod()
, but with an
additional column CM
.
https://csg.sph.umich.edu/abecasis/merlin/
lod()
#---------------------------------
# Requires MERLIN to be installed
#---------------------------------
if(pedprobr::checkMerlin()) {
# Pedigree with a single marker
x = nuclearPed(3, sex = c(1,2,2)) |>
addMarker(geno = c("1/1", "1/2", "1/2", "1/2", "1/2"))
# Simple AD model
merlinLod(x, aff = 2:5, model = diseaseModel("AD"))
# With liability classes
mod = diseaseModel("AD", penetrances = cbind(f0 = 0, f1 = 1:0, f2 = 1:0))
merlinLod(x, aff = 2:4, mod, liability = c(1,1,1,1,2))
# X
merlinLod(x, aff = 3:5, model = diseaseModel("XR"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.