Learn R Programming

hsphase (version 3.0.0)

readGenotype: Read and Check the Genotype File

Description

Reads a genotype file and optionally checks it for common formatting/data issues.

Usage

readGenotype(genotypePath, separatorGenotype = " ", check = TRUE)

Value

A genotype matrix.

Arguments

genotypePath

character. Path to the genotype file (animals in rows and SNPs in columns). SNPs should be coded as 0, 1, 2 for AA, AB, BB. Use 9 for missing data. Please refer to the vignette for more information.

separatorGenotype

character. Field separator used in the genotype file.

check

logical. If TRUE, check the genotype file for possible errors.