Learn R Programming

pedtools (version 2.10.0)

sameGenotype: Find markers for which two individuals have the same genotype

Description

Identifies markers for which two individuals have the same (non-missing) genotype. The comparison is done after sorting the genotypes internally.

Usage

sameGenotype(x, ids = typedMembers(x), count = FALSE)

Value

A logical vector with one entry per marker (NA if either genotype is missing). If count = TRUE, the number of TRUE entries.

Arguments

x

A ped object or a list of such. An error is raised if x has no marker data.

ids

A vector of two individual ID labels.

count

A logical. If TRUE, return the number of markers with shared genotype.

See Also

isHomozygous(), sortGenotypes()

Examples

Run this code
x = nuclearPed() |>
  addMarker(name = "m1", geno = c(NA, "1/1", "1/2")) |>
  addMarker(name = "m2", geno = c(NA, "1/2", "2/1"))

sameGenotype(x, 2:3)
sameGenotype(x, 2:3, count = TRUE)

Run the code above in your browser using DataLab