topmatch: A function selecting the dams and sires with the fewest...

Description Usage Arguments Author(s) Source References Examples

View source: R/topmatch.R

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

1
2
3
4
5
6
7
8
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). #'

year

the year or cohort that is being considered, adults can be potential dam or sire in some years, but no in others

brood

an identifier of the brood to which the offspring and adults belong/are associated with

offspring

an identifier of the offspring

rank

the ranking among all possible combinations of offspring and potential dams and sires, rank 1 is fewest mismatches according to criterion chosen in the function argument 'ranking'

dam

an identifier of the potential dam

sire

an identifier of the potential sire

dam.type

description of the type of potential dam (social parent, extra-group parent, within-group subordinate)

sire.type

description of the type of potential sire (social parent, extra-group parent, within-group subordinate)

hothiphop.parents

the sum of the hiphop and hot.parents mismatch score

hiphop

the hiphop mismatch score of the offspring with the potential dam and potential sire, expressed as the number of loci giving mismatches

hot.parents

the hot score of the offspring with both the potential dam and sire, expressed as the number of loci giving mismatches

hot.dam

the hot score of the offspring with the potential dam, expressed as the number of loci giving mismatches

hot.sire

the hot mismatch score of the offspring with the potential sire , expressed as the number of loci giving mismatches

hothiphop.dam

the sum of the hot.dam and hiphop mismatch score

hothiphop.sire

the sum of the hot.sire and hiphop mismatch score

below.threshold

if the score chosen in argument 'ranking' is below the chose threshold value, then equals to 1, else 0

threshold

the chosen threshold value in argument 'threshold'

loci.dyad.dam

the number of loci at which both the offspring and dam were not NA

loci.dyad.sire

the number of loci at which both the offspring and sire were not NA

loci.triad

the number of loci at which the offspring, dam and sire were not NA

offspring.heterozygosity

the proportion of loci at which the offspring was heterozygous

social.mother.sampled

if the social.mother genotypic data is in the genotypes file then equal to 1, else 0

social.father.sampled

if the social.father genotypic data is in the genotypes file then equal to 1, else 0

social.mother

identity of the social mother of the offspring

social.father

identity of the social father of the offspring

condition

the value of the argument 'condition'

ranking

the value of the (first) value in the argument 'ranking'

ranking2

the value of the second value in the argument '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

1
2
3
results<-hothiphop(ind=individuals[1:22,], gen=genotypes)
best<-topmatch(x=results, ranking="hothiphop.parents")
head(best)

hiphop documentation built on Aug. 19, 2020, 5:07 p.m.