Transfer marker data
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 = "father", mo = "mother", children = "boy") m = marker(x, father = 1:2, mother = 1, boy = 1:2) x = setMarkers(x, m) y = list(singleton("father"), nuclearPed(mo = "mother", children = "boy")) # By default all common individuals are transferred transferMarkers(x, y) # Transfer data for the boy only transferMarkers(x, y, ids = "boy") # Transfer without erasing marker attributes or others genotypes # Note that `erase = FALSE` requires markers to be named z = nuclearPed(children = "boy") z = setMarkers(z, marker(z, '1' = c(2,2), alleles = 1:2, afreq = c(.1, .9))) name(x, 1) = name(z, 1) = 'M1' z2 = transferMarkers(x, z, ids = "boy", erase = FALSE) z2 # Frequencies are not transferred afreq(z2, 1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.