Learn R Programming

pedtools (version 2.8.0)

harmoniseMarkers: Harmonise markers across components in a ped list

Description

This function ensures that all components of a ped list have the same markers, in the same order. Missing markers are added with empty genotypes. Note that unnamed markers cannot be harmonised and will be removed by this function.

Usage

harmoniseMarkers(x)

Value

A copy of x where all components have the same markers attached, and in the same order. Unnamed markers are removed.

Arguments

x

A list of ped objects. An error is raised if any component contains an unnamed marker.

Examples

Run this code
x = list(
  singleton(1) |> addMarker(),  # unnamed marker will be removed
  singleton(2) |> addMarker(name = "M1"),
  singleton(3) |> addMarker(geno = "3/3", alleles = 1:3, name = "M2")
)
harmoniseMarkers(x)

Run the code above in your browser using DataLab