Learn R Programming

GenomicTools (version 0.2.9.7)

recodeData: Recode a Genotype Data Matrix.

Description

This function recodes a genotype data matrix in a format as expected from eqtl or mdr.

Usage

recodeData(X)

Arguments

X

Matrix with genotype information.

Value

A matrix with same dimension as the input, but in 0,1,2 encoding.

Details

This function recodes the values given in the data matrix X (typically AA, AB and BB) and substitutes it with 0,1 and 2. Missing values are encoded as 3.

See Also

eQTL , mdr

Examples

Run this code
# NOT RUN {
# genotData <- read.table("MDR_format_ready_BCR.txt",header=T)

# temp <- recodeData(genotData)

# }

Run the code above in your browser using DataLab