genoscore_converter: Convert between genotype scores (separated alleles vs counts)

View source: R/genoscore_converter.R

genoscore_converterR Documentation

Convert between genotype scores (separated alleles vs counts)

Description

Assumes biallelic genotypes and can interchange between separated alleles ('0/0', '0/1', '1/1') or Alt allele counts (0, 1, 2).

Usage

genoscore_converter(dat)

Arguments

dat

Character/Integer: A vector of genotypes. If the class is 'character', then assumes separated alleles and converts into allele counts. The opposite is true, if class is 'integer', will convert into separated alleles.

Details

If dat is a vector of characters, then missing values should take the form of './.'. Otherwise, if dat is a vector of integers, missing values should take the form of NA.

Examples

library(genomalicious)
genoscore_converter(c('0/0', '0/1', '1/1'))
genoscore_converter(c(0, 1, 2))


j-a-thia/genomalicious documentation built on Oct. 19, 2024, 7:51 p.m.