topmatch {hiphop} | R Documentation |
A function selecting the dams and sires with the fewest genetic mismatches to an offspring
Description
This function summarizes per offspring the top combinations of dam and sire that have the least genetic mismatches according to the hot (Huisman 2017) and/or hiphop (Cockburn et al. in revision) test criteria. In addition to the top matched combinations the summary always also list the social parent, if not among the top X. The user can choose whether one wants to look for the most likely dam and sire with and without assuming that the social mother (or father) is the genetic parent. Furthermore, one can choose on which test score to rank individuals. For more information and worked examples, see the vignette and Cockburn et al. (in revision).
Usage
topmatch(
x,
ranking,
condition = "none",
thres = 99999,
top = 3,
unique = "pair"
)
Arguments
x |
The file with hot and hiphop scores that is generated by the 'hothiphop()' function. |
ranking |
This sets the mismatch criterion in which dams and sires are ranked, possibilities include ranking="hothiphop.parents", "hiphop", "hot.parents", hot.dam", "hot.sire", "hothiphop.dam", "hothiphop.sire". In some situations it can be useful to supply two ranking criteria, for example to avoid ties (e.g. ranking=c("hot.dam", "hiphop)) |
condition |
Whether or not one wants to condition on either the social mother (condition="mother") or social father (condition="father"). The default is condition="none" in which case all possible dams and sires are considered as genetic parents. |
thres |
Sets a threshold value for the number of mismatches, if parents have less mismatches then the variable below.threshold in the output will have a value of 1. If 0>=thres<1, the number of mismatches will be re-expressed as a proportion of all loci sampled (not NA). If -1>thres<0 the mismatch scores are expressed as the number of mismatched divided by the number of loci at which the offspring is heterozygote (for the HIPHOP test) or divided by number of loci at which the offspring is homozygote (for the HOT test). This standardization may be sometimes useful for the recalculating the HIPHOP score to account for the fact that some offspring can be scored at more loci than others for this test. By default thres is set to a large integer (99999). |
top |
Sets the number of top matches that is shown in the output #' @return a dataframe with for each offspring the top X (default top 3, giving 3 rows for each offspring) dam and sire combinations and their mismatch scores according to the HOT and HIPHOP test, the number of loci this was based on, and some additional relevant information about the social parents and potential dam and sires. In addition to the top X offspring-dam-sire with the fewest mismatches, the scores of the social parents are also always listed (if they were not already in the top X ranking). #'
|
unique |
When using the ranking criteria hot.dam or hot.sire the best ranked dam or sire will occupy the entire top 3 and this does not allow comparing among dams. By setting unique to "dam" (or "sire") the output shows the top 3 with the best record for each unique dam (or sire). |
Author(s)
Martijn van de Pol, martijn@myscience.eu
Source
Cockburn et al. (2020) HIPHOP: improved paternity assignment among close relatives using a simple exclusion method for biallelic markers. Molecular Ecology Resources, in revision.
References
Cockburn et al. (2020) HIPHOP: improved paternity assignment among close relatives using a simple exclusion method for biallelic markers. Molecular Ecology Resources, in revision.
Huisman, J. (2017). Pedigree reconstruction from SNP data: parentage assignment, sibship clustering and beyond. Molecular ecology resources, 17(5), 1009-1024.
Examples
results<-hothiphop(ind=individuals[1:22,], gen=genotypes)
best<-topmatch(x=results, ranking="hothiphop.parents")
head(best)