Learn R Programming

forrel (version 1.1.0)

missingPersonEP: Exclusion power for missing person cases

Description

This is a wrapper of exclusionPower() for the special case of a reference family with a single missing member. Some reference members should already be genotyped. The function computes the power to exclude an unrelated individual, i.e. the probability of observing (in a truly unrelated individual) a genotype incompatible with the reference.

Usage

missingPersonEP(
  reference,
  missing,
  markers = NULL,
  disableMutations = NA,
  verbose = TRUE
)

Arguments

reference

A ped object with attached markers.

missing

The ID label of the missing pedigree member.

markers

A vector indicating the names or indices of markers attached to the source pedigree. If NULL (default), then all markers attached to the source pedigree are used. If alleles or afreq is non-NULL, then this parameter is ignored.

disableMutations

This parameter determines how mutation models are treated. Possible values are as follows:

  • NA (the default): Mutations are disabled only for those markers whose known genotypes are consistent with reference. This is determined by temporarily removing all mutation models and checking which markers have nonzero likelihood.

  • TRUE: Mutations are disabled for all markers. This will result in an error if any markers are inconsistent with reference.

  • FALSE: No action is done to disable mutations.

  • A vector containing the names or indices of those markers for which mutations should be disabled.

verbose

A logical.

Value

The EPresult object returned by exclusionPower().

Examples

Run this code
# NOT RUN {
# Four siblings; the fourth is missing
x = nuclearPed(4)

# Remaining sibs typed with 4 triallelic markers
x = markerSim(x, N = 4, ids = 3:5, alleles = 1:3, seed = 577, verbose = FALSE)

# Add marker with inconsistency in reference genotypes
# (this should be ignored by `missingPersonEP()`)
badMarker = marker(x, `3` = 1, `4` = 2, `5` = 3)
x = addMarkers(x, badMarker)

# Compute exclusion power statistics
# missingPersonEP(x, missing = 6)

# With marker names:
name(x, 1:5) = paste0("M", 1:5)
# missingPersonEP(x, missing = 6)

# }

Run the code above in your browser using DataLab