Learn R Programming

⚠️There's a newer version (2.8.1) of this package.Take me there.

pedtools

Introduction

The goal of pedtools is to provide a lightweight, but comprehensive tool set for creating, manipulating and visualizing pedigrees with or without marker data. Common pedigree structures are quickly produced with tailor-made functions, while a range of utilities enable modifications like adding or removing individuals, extracting subsets, loop breaking, and merging pedigrees. The plotting functionality is imported from the kinship2 package.

pedtools is a continuation of the paramlink package, which is no longer actively developed.

Installation

To get pedtools, install from CRAN as follows:

install.packages("pedtools")

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

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

Example

We create a pedigree with a consanguineous mating between half siblings. The child has genotype A/B at a SNP marker.

library(pedtools)

x = halfSibPed(sex1 = 1, sex2 = 2)
x = addChildren(x, father = 4, mother = 5, nch = 1)

m = marker(x, "6" = c("A", "B"))
plot(x, m, skip.empty.genotypes = TRUE)

For details about what pedtools can do, and many other examples, the vignette is the recommended place to start.

Copy Link

Version

Install

install.packages('pedtools')

Monthly Downloads

707

Version

0.9.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Magnus Vigeland

Last Published

March 21st, 2020

Functions in pedtools (0.9.3)

marker

Marker objects
inbreedingLoops

Pedigree loops
ped_internal

Internal ordering of pedigree members
locusAttributes

Get or set locus attributes
is.ped

Is an object a ped object?
ped_complex

Complex pedigree structures
marker_select

Select or remove attached markers
freqDatabase

Allele frequency database
is.marker

Test if something is a marker
mendelianCheck

Check for Mendelian errors
randomPed

Random pedigree
relabel

Get or modify pedigree labels
readPed

Read a pedigree from file
plot.ped

Plot pedigrees with genotypes
getSex

Get or modify pedigree genders
ped_subgroups

Pedigree subgroups
getMap

Tabulate marker positions
validatePed

Pedigree errors
ped_modify

Add/remove pedigree members
transferMarkers

Transfer marker data
marker_attach

Attach markers to pedigrees
plotPedList

Plot a collection of pedigrees.
sortGenotypes

Sort the alleles in each genotype
ped

Pedigree construction
print.nucleus

S3 methods
writePed

Write a pedigree to file
ped_basic

Create simple pedigrees
print.ped

Printing pedigrees
marker_prop

Marker properties
nMarkers

The number of markers attached to a pedigree
mergePed

Merge two pedigrees
marker_getset

Get/set marker attributes
ped_utils

Pedigree utilities
pedtools

pedtools: Tools for working with pedigrees in R
getAlleles

Allele matrix manipulation
getComponent

Pedigree component
deprecated

Deprecated functions
as.data.frame.ped

Convert ped to data.frame
as.ped

Conversions to ped objects
as.matrix.ped

Convert ped to matrix
connectedComponents

Connected pedigree components
famid

Family identifier
founderInbreeding

Inbreeding coefficients of founders