Learn R Programming

nprcgenekeepr (version 3.0.0)

.markerTransmissionProbability: Probability a parent transmits the reference allele

Description

Internal helper for markerParentageLikelihood (issue #147 Slice 1, D2). For reference allele refAllele, the value is the fraction of the parent's two alleles equal to refAllele: a parent homozygous for refAllele transmits it with probability 1; a heterozygous parent, 0.5; a parent homozygous for any other allele, 0. At a multiallelic locus all non-reference alleles are lumped together.

Usage

.markerTransmissionProbability(genoStr, refAllele)

Value

A numeric scalar in {0, 0.5, 1}.

Arguments

genoStr

a single genotype string ("lo/hi" format, as in one cell of a buildMarkerGenotypeMatrix result).

refAllele

the reference allele at this locus.