Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

marker_select

Select or remove attached markers


Description

Functions for manipulating markers attached to ped objects.

Usage

selectMarkers(x, markers = NULL, chroms = NULL, fromPos = NULL, toPos = NULL)

getMarkers(x, markers = NULL, chroms = NULL, fromPos = NULL, toPos = NULL)

removeMarkers(x, markers = NULL, chroms = NULL, fromPos = NULL, toPos = NULL)

whichMarkers(x, markers = NULL, chroms = NULL, fromPos = NULL, toPos = NULL)

Arguments

x

A ped object, or a list of such

markers

Either a character vector (with marker names), a numeric vector (with marker indices), a logical (of length nMarkers(x)), or NULL.

chroms

A vector of chromosome names, or NULL

fromPos

A single number or NULL

toPos

A single number or NULL

Details

If markers consists of negative integers, it will be converted to its complement within 1:nMarkers(x).

Value

The return values of these functions are:

  • selectMarkers(): an object identical to x, but where only the indicated markers are kept

  • removeMarkers(): an object identical to x, but where the indicated markers are removed

  • getMarkers(): a list of marker objects. Note: If x is a list of pedigrees, the marker objects attached to the first component will be returned.

  • whichMarkers(): an integer vector with indices of the indicated markers. If x is a list of pedigrees an error is raised unless whichMarkers() gives the same result for all components.

See Also


pedtools

Creating and Working with Pedigrees and Marker Data

v0.9.7
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.