Skip to contents

Summarise locus-wise data types

Usage

locus_type_summary(y)

Arguments

y

A list of lists for two episodes; see compute_posterior() for more details.

Value

A vector of strings summarising the data at each locus.

Details

A function to summarise the data at each locus as one of four types:

  • All match (all genotypes have the same allele).

  • All diff. (all genotypes have a different allele).

  • Intra-match (some intra-episode genotypes have the same allele)

  • Inter-match (some inter-episode genotypes have the same allele).

    The number of apparent genotypes is the sum of the per-episode MOIs. When the total number of apparent genotypes exceeds 3, "Intra-match" excludes any "Inter-match" (i.e., it is equivalent to Inter-matches only), whereas an "Inter-match does not exclude an "Intra-match

Examples

# example code
y <- list(
  list(m1 = c("A", "B"), m2 = c("A"), m3 = c("C")),
  list(m1 = c("B"), m2 = c("B", "C"), m3 = c("A", "B", "C", "D"))
)

locus_type_summary(y)
#> Warning: Intra-match excludes Inter-match; Inter-match does not exclude Intra-match
#> [1] "Inter-match" "Intra-match" "Inter-match"