Converts pedigree data frame to kinship2 pedigree object
A data frame describing a pedigree is converted to a
kinship2 pedigree object to be used by say FamiliasPosterior.
Typically the input is created using paramlink.
ConvertPed(ped, persons = NULL)
ped |
A data frame with columns ID, FID (father id), MID (mother id),sex (1=male, 2=female), AFF (not used) possible followed by marker data, two columns for each marker |
persons |
A character vector indicating names of persons in the case ordered as |
ped |
An object of class pedigree |
datamatrix |
A data frame. One line for each person, one column for each allele. |
Thore Egeland <Thore.Egeland@gmail.com>
persons <- c("AF","mother", "daughter")
ped1=swapSex(nuclearPed(1),3)
locus1=marker(ped1,1,c(1,1),2,c(2,2),3,c(1,2))
ped1=addMarker(ped1,locus1)
# A plot function such as the following can now be used:
# plot(ped1,marker=1,id.labels=persons,title="ped1")
ped1=as.data.frame(ped1)
ConvertPed(ped1,persons)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.