View source: R/marker_transfer.R
transferMarkers | R Documentation |
Transfer marker data between pedigrees. Any markers attached to the target are overwritten.
transferMarkers(
from,
to,
ids = NULL,
idsFrom = ids,
idsTo = ids,
erase = TRUE,
matchNames = TRUE,
checkSex = FALSE
)
from |
A |
to |
A |
ids |
A vector of ID labels. This should be used only if the individuals
have the same name in both pedigrees; otherwise use |
idsFrom, idsTo |
Vectors of equal length, denoting source individuals (in
the |
erase |
A logical. If |
matchNames |
A logical, only relevant if |
checkSex |
A logical. If TRUE, it is checked that |
By default, genotypes are transferred between all individuals present in both pedigrees.
A ped
object (or a list of such) similar to to
, but where all
individuals also present in from
have marker genotypes copied over. Any
previous marker data is erased.
x = nuclearPed(fa = "A", mo = "B", child = "C")
x = addMarker(x, A = "1/2", B = "1/1", C = "1/2", name = "M1")
y = list(singleton("A"), nuclearPed(fa = "D", mo = "B", child = "C"))
# By default all common individuals are transferred
transferMarkers(x, y)
# Transfer data for the boy only
transferMarkers(x, y, ids = "C")
# Transfer without first erasing the target markers
z = nuclearPed(fa = "A", mo = "B", child = "C")
z = addMarker(z, A = "1/1", alleles = 1:2, name = "M1")
transferMarkers(x, z, ids = "C", erase = FALSE)
transferMarkers(x, z, ids = "C", erase = TRUE) # note the difference
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.