read_file: Preliminary processing of data

View source: R/read_file.R

read_fileR Documentation

Preliminary processing of data

Description

Normalize the data before BLMM analysis

Usage

read_file(gene_file, y_file, kin.mat = F)

Arguments

gene_file

File of bed to be imported

kin.mat

whether to compute the kinship covariance matrix

y

phenotype file (need to include NA)

Details

Write the genetic file as a matrix. Generate a family indicator matrix. Compute the kinship covariance matrix Phenotypic data needs to contain missing values

Examples

datafile = system.file("extdata",package = "BLMM")
data <- read_file(gene_file = paste(datafile,"snp.bed",sep="/"),y_file = paste(datafile,"y.txt",sep="/"),kin.mat=T)
y = data$y
gene = data$genematrix
# Extract gene intervals from BED files
genotype0 <- list(as.matrix(gene[,1:200]), as.matrix(gene[,300:450]))
dummy.fam = data$dummy.fam
kin.mat = data$kin.mat


yhai943/FBLMM documentation built on March 19, 2022, 8:21 a.m.