View source: R/convertPedigree.R
ped2add | R Documentation |
Take a pedigree and turn it into an additive genetics relatedness matrix
ped2add(
ped,
max.gen = 25,
sparse = FALSE,
verbose = FALSE,
gc = FALSE,
flatten.diag = FALSE,
standardize.colnames = TRUE,
transpose_method = "tcrossprod",
adjacency_method = "direct",
saveable = FALSE,
resume = FALSE,
save_rate = 5,
save_rate_gen = save_rate,
save_rate_parlist = 1000 * save_rate,
save_path = "checkpoint/",
...
)
ped |
a pedigree dataset. Needs ID, momID, and dadID columns |
max.gen |
the maximum number of generations to compute (e.g., only up to 4th degree relatives). The default is 25. However it can be set to infinity. 'Inf' uses as many generations as there are in the data. |
sparse |
logical. If TRUE, use and return sparse matrices from Matrix package |
verbose |
logical. If TRUE, print progress through stages of algorithm |
gc |
logical. If TRUE, do frequent garbage collection via |
flatten.diag |
logical. If TRUE, overwrite the diagonal of the final relatedness matrix with ones |
standardize.colnames |
logical. If TRUE, standardize the column names of the pedigree dataset |
transpose_method |
character. The method to use for computing the transpose. Options are "tcrossprod", "crossprod", or "star" |
adjacency_method |
character. The method to use for computing the adjacency matrix. Options are "loop" or "indexed" |
saveable |
logical. If TRUE, save the intermediate results to disk |
resume |
logical. If TRUE, resume from a checkpoint |
save_rate |
numeric. The rate at which to save the intermediate results |
save_rate_gen |
numeric. The rate at which to save the intermediate results by generation. If NULL, defaults to save_rate |
save_rate_parlist |
numeric. The rate at which to save the intermediate results by parent list. If NULL, defaults to save_rate*1000 |
save_path |
character. The path to save the checkpoint files |
... |
additional arguments to be passed to |
The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.