hapmap_encoding: Change the encoding of a hapmap file

Description Usage Arguments Details Value

View source: R/hapmap_encoding.R

Description

Changes the encoding of a TASSEL hapmap to a rrBLUP hapmap and vice-versa

Usage

1
hapmap_encoding(hapmap, encoding = "rrBLUP")

Arguments

hapmap

A TASSEL-encoded or rrBLUP-encoded hapmap file read in to R as a data.frame. See Details for information on file format.

encoding

The desired output encoding. Either "rrBLUP" or "TASSEL". See Details for information on file format

Details

The TASSEL format is as such: The first row is column names. The first 4 columns are marker name, alleles, chromosome, and position, respectively. The next 7 column are additional information for TASSEL. The remaining columns are samples. Genotypes are encoded in diploid format (i.e. AA, AC, CC) with "NN" denoting missing data.

The rrBLUP format is as such: The first row is column names. The first 4 columns are marker name, alleles, chromosome, and position, respectively. The next 7 column are additional information for TASSEL. The remaining columns are samples. Genotypes are encoded in 1, 0, -1 format where 1 is homozygous for the first allele, 0 is heterozygous, and -1 is homozygous for the second allele. Missing data is denoted with NA.

Value

A data.frame of a hapmap encoded in the designated format.


neyhartj/gws documentation built on Nov. 9, 2017, 8:35 p.m.