load_geno: Loading the genotype data.

Description Usage Arguments Value

Description

The function automatically loads the genotype data matrix assuming each row is an individual and each column is the genotype of a biallelic SNP. If standard PLINK .raw file was provided, the function returns only the genotype matrix by removing the first 6 columns.

Usage

1
load_geno(source_data, PLINK = TRUE, chr = NULL)

Arguments

source_data

the name of the file which the genotype data are to be read from. Each row of the matrix appears as one line of the file. Could be an absolute path to the file or the name of the file assuming in the present directory getwd().

PLINK

a logic indicating whether the supplied file is of the .raw format from PLINK, if not, the first six columns will not be removed and all columns will be read in.

chr

an integer indicating which chromosome is read in, this option is used in combination with source_data, to perform analysis by each chromosome. In this case, the file name should follow: source_data_i.raw. For example, Geno_Matrix_1.raw or Geno_Matrix_23.raw if all 23 files are available.

Value

a data matrix of genotypes.


GMELab/GraBLD documentation built on May 4, 2019, 3:20 p.m.