Learn R Programming

plinkFile (version 0.2.1)

readFAM: Read FAM file

Description

Read sample meta-data form the fam file of a PLINK1 BED fileset.

Usage

readFAM(fam)

Value

data frame of individuals, loaded from FAM.

Arguments

fam

prefix or name of a PLINK file.

Details

There are six columns in a bim file

  • fid: family ID;

  • iid: individual ID, default row name used by [readBED];

  • mom: maternal ID;

  • dad: paternal ID;

  • sex: individual sex.

  • phe: phenotype, not often used;

The PLINK1 bim file has no header line, this is changed in PLINK2.

The columns "sex" and "phe" are mostly the legency of early GWAS, nowerdays it is common to provide sex, among other covariates, and multiple phenotypes in a separate file.

Examples

Run this code
pfx <- file.path(system.file("extdata", package="plinkFile"), "m20")
fam <- readFAM(pfx)
fam

Run the code above in your browser using DataLab