BGData-class: An S4 Class to Represent Phenotype and Genotype Data.

Description Details Slots Examples

Description

This class is inspired by the phenotype/genotype file format .raw and its binary companion (also known as .bed) of PLINK. It is used by several functions of this package such as GWAS() for performing a Genome Wide Association Study or getG() for calculating a genomic relationship matrix.

Details

There are several ways to create an instance of this class:

A .ped file can be recoded to a .raw file in PLINK using plink --file myfile --recodeA, or converted to a BED file using plink --file myfile --make-bed. Conversely, a BED file can be transformed back to a .ped file using plink --bfile myfile --recode or to a .raw file using plink --bfile myfile --recodeA without losing information.

Slots

geno

A geno object that contains genotypes. geno is a class union of several matrix-like types, many of them suitable for very large datasets. Currently supported are LinkedMatrix::LinkedMatrix, BEDMatrix::BEDMatrix, bigmemory::big.matrix, ff_matrix, and matrix.

pheno

A data.frame that contains phenotypes.

map

A data.frame that contains a genetic map.

Examples

1
2
3
4
5
6
7
8
X <- matrix(data = rnorm(100), nrow = 10, ncol = 10)
Y <- data.frame(y = runif(10))
MAP <- data.frame(means = colMeans(X), freqNA = colMeans(is.na(X)))
DATA <- BGData(geno = X, pheno = Y, map = MAP)

dim(DATA@geno)
head(DATA@pheno)
head(DATA@map)

QuantGen/BGData documentation built on Nov. 16, 2018, 7:22 p.m.