Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.bed.matrix

Creation of a bed.matrix


Description

Creates a bed.matrix using a numeric matrix and two data frame for ped / snps slots

Usage

as.bed.matrix(x, fam, bim)

Arguments

x

A numeric matrix

fam

(Optionnal) A data frame (the contents of a .fam file)

bim

(Optionnal) A data frame (the contents of a .bim file)

Details

The data frame fam should have columns named "famid", "id", "father", "mother", "sex" and "pheno". The data frame bim should have columns named "chr", "id", "dist", "pos", "A1" and "A2".

Value

A bed.matrix condensing all three arguments.

Author(s)

Hervé Perdry and Claire Dandine-Roulland

See Also

Examples

data(AGT)
x <- as.bed.matrix(AGT.gen, AGT.fam, AGT.bim)
x

gaston

Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models

v1.5.7
GPL-3
Authors
Hervé Perdry [cre, aut, cph], Claire Dandine-Roulland [aut, cph], Deepak Bandyopadhyay [cph] (C++ gzstream class), Lutz Kettner [cph] (C++ gzstream class)
Initial release
2020-09-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.