MyNixOS website logo
Description

Probability Computations on Pedigrees.

An implementation of the Elston-Stewart algorithm for calculating pedigree likelihoods given genetic marker data (Elston and Stewart (1971) <doi:10.1159/000152448>). The standard algorithm is extended to allow inbred founders. 'pedprobr' is part of the 'ped suite', a collection of packages for pedigree analysis in R. In particular, 'pedprobr' depends on 'pedtools' for pedigree manipulations and 'pedmut' for mutation modelling. For more information, see 'Pedigree Analysis in R' (Vigeland, 2021, ISBN:9780128244302).

pedprobr

CRANstatus

Introduction

The main content of pedprobr is an implementation of the Elston-Stewart algorithm for pedigree likelihoods given marker genotypes. It is part of the pedsuite, a collection of packages for pedigree analysis in R.

The pedprobr package does much of the hard work in several other pedsuite packages:

  • forrel : relatedness analysis and forensic pedigree analysis
  • dvir : disaster victim identification
  • paramlink2 : parametric linkage analysis
  • pedbuildr : pedigree reconstruction

The workhorse of pedprobr is the likelihood() function, supporting a variety of situations:

  • autosomal and X-linked markers
  • a single marker or two linked markers
  • complex inbred pedigrees
  • pedigrees with inbred founders
  • mutation models

Installation

To get the current official version of pedprobr, install from CRAN as follows:

install.packages("pedprobr")

Alternatively, you can obtain the latest development version from GitHub:

# install.packages("devtools") # install devtools if needed
devtools::install_github("magnusdv/pedprobr")

Getting started

library(pedprobr)
#> Loading required package: pedtools

To set up a simple example, we first use pedtools utilities to create a pedigree where two brothers are genotyped with a single SNP marker. The marker has alleles a and b, with frequencies 0.2 and 0.8 respectively, and both brothers are heterozygous a/b.

# Pedigree with SNP marker
x = nuclearPed(nch = 2) |> 
  addMarker(geno = c(NA, NA, "a/b", "a/b"), afreq = c(a = 0.2, b = 0.8))

# Plot with genotypes
plot(x, marker = 1)

The pedigree likelihood, i.e., the probability of the genotypes given the pedigree, is obtained as follows:

likelihood(x, marker = 1)
#> [1] 0.1856

Genotype probability distributions

Besides likelihood(), other important functions in pedprobr are:

  • oneMarkerDistribution() : the joint genotype distribution at a single marker, for any subset of pedigree members
  • twoMarkerDistribution() : the joint genotype distribution at two linked markers, for a single person

In both cases, the distributions are computed conditionally on any known genotypes at the markers in question.

To illustrate oneMarkerDistribution() we continue our example from above, and consider the following question: What is the joint genotype distribution of the parents, conditional on the genotypes of the children?

The answer is found as follows:

oneMarkerDistribution(x, ids = 1:2, partialmarker = 1, verbose = F)
#>            a/a        a/b       b/b
#> a/a 0.00000000 0.01724138 0.1379310
#> a/b 0.01724138 0.13793103 0.2758621
#> b/b 0.13793103 0.27586207 0.0000000

The output confirms the intuitive result that the parents cannot both be homozygous for the same allele. The most likely combination is that one parent is heterozygous a/b, while the other is homozygous b/b.

Metadata

Version

0.9.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows