ind_to_fam: Convert an Eigenstrat IND tibble into a Plink FAM tibble

Description Usage Arguments Value See Also Examples

View source: R/ind_to_fam.R

Description

This function takes an existing IND tibble and creates a FAM tibble with the same information and dummy values for missing data. In particular, the output FAM tibble will contain these columns with these contents (IND only contain id, sex, and label, so there is no loss of information):

Usage

1

Arguments

ind

The input Eigenstrat IND tibble to convert.

Value

A Plink FAM tibble.

See Also

sex_to_int()

Eigenstrat IND format reference: https://github.com/DReichLab/EIG/tree/master/CONVERTF

Plink FAM format reference: https://www.cog-genomics.org/plink/1.9/formats#fam

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create a sample IND tibble
library(tibble)
ind <- tibble(
  id = 1:3,
  sex = c('U', 'M', 'F'),
  label = c(1, 1, 2)
)
# convert to FAM
fam <- ind_to_fam(ind)
# inspect:
fam

genio documentation built on June 11, 2021, 5:12 p.m.