haplotypeToGenotype: Call Genotypes from Haplotype Data

Description Usage Arguments Value

Description

haplotypeToGenotype transforms PLINK haplotype data into genotype data of the form -1, 0, 1 and 2 representing missing genotypes, homozygous reference, heterozygous and homozygous alternative respectively. Haploid isolates are coded as diploid although will not have heterozygous genotypes.

Usage

1
haplotypeToGenotype(haplotypes, moi)

Arguments

haplotypes

An integer matrix of haplotype data in PLINK format. A allele is denoted 1, B allele is denoted 2 and missing data is denoted 0

moi

An integer vector of multiplicity of infection (MOI) estimates for each isoalte. Isolate MOI estimates should be ordered such that value n of moi corresponds to column n of haplotypes.

Value

A matrix with genotype calls where columns correspond to isolates and rows correspond to SNPs


bahlolab/isoRelate documentation built on May 11, 2019, 5:25 p.m.