predict_IBD | R Documentation |
IBD prediction algorithm, performs a distance-informed weighted average using a genetic map. Weights are calculated as a proportion of the non-recombination probability between two markers, which are estimated using mapping functions (Kosambi's, Haldane's or Morgan's). Low-informative IBD probabilities are ignored, by default probabilities between 0.3 and 0.7 are considered low-informative.
predict_IBD(
IBD,
map,
interval = 10,
method = "kosambi",
non_inf = c(0.3, 0.7),
pred_points = NULL
)
## S3 method for class 'list'
predict_IBD(
IBD,
map,
interval = 10,
method = "kosambi",
non_inf = c(0.3, 0.7),
pred_points = NULL
)
## S3 method for class 'matrix'
predict_IBD(
IBD,
map,
interval = 10,
method = "kosambi",
non_inf = c(0.3, 0.7),
pred_points = NULL
)
## S3 method for class 'numeric'
predict_IBD(
IBD,
map,
interval = 10,
method = "kosambi",
non_inf = c(0.3, 0.7),
pred_points = NULL
)
IBD |
observed IBD. Can be given as a vector containing the observed IBDs of one individual, a single matrix (markers x individual) or a list of matrices. Matrices must contain rownames and columnames. |
map |
data.frame containing "marker" and "position" columns at least. |
interval |
numeric indicating the interval size to be used in prediction. |
method |
string indicating the mapping function used to calculate weights. Either "kosambi", "haldane" or "morgan". Kosambi takes into account chiasma interference, Haldane is the most common mapping function and Morgan assumes a linear relationship between distance and recombination (is inaccurate for large distances). |
non_inf |
numeric vector of two digits, containing the lower and upper bound for probabilities to be considered non-informative. These probabilities will be ignored during prediction. By default 0.3 and 0.7. Symmetric and stringent thresholds are recommended. |
pred_points |
numeric, number of points to use for IBD prediction. If NULL, all points in map$position are used, otherwise n equally spaced points are used. Greatly improves efficiency if the number of markers is very large. |
the output will have the same format as the input given. That is, an input IBD vector will return an IBD vector, a matrix will return a matrix and a list of matrices will return a list of matrices.
list
: Function for a list of matrices
matrix
: Function for a single matrix
numeric
: Function for a numeric vector
data("genotype")
geno <- geno[,-1:-2] #we take out parental genotypes
data("homologue")
data(map)
IBD <- calc_IBD(geno,hom[,1:2],hom[,3:4], ploidy = 2)
#One homologue of one individual
pred <- predict_IBD(IBD[[1]][,1], map)
#One homologue for all individuals
pred <- predict_IBD(IBD[[1]], map)
#Or all homologues
pred <- predict_IBD(IBD, map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.