isHet: Checks genotype scores for heterozygosity

Description Usage Arguments Examples

Description

Takes a vector of genotype scores (each made up of a two character string) and a character class to match against, and returns a logical value depending on whether the two characters match (FALSE) or not (TRUE).

Usage

1
isHet(score, characterClass = "[[:alnum:]]", nonMatch = "false")

Arguments

score

A vector of genotype scores, each of which needs to be a two character string. Numeric values are converted to strings

characterClass

A regex character class to match against. If characters in score do not exist in the character class, an error will be returned

nonMatch

c("false", "error") a string defining whether to return false or throw an error if scores do not match characterClass.

Examples

1
2
3
isHet("AA")
isHet(c("AA", "AB", "BB"))
isHet("GT", "[AB]")

alexwhan/genomap documentation built on May 10, 2019, 8:58 a.m.