Learn R Programming

skater (version 0.1.2)

read_plink2_king: Read PLINK KING table

Description

Reads in the output from plink2 --make-king-table (documentation). Input file must have six columns, tab delimited:

  1. id1 (member 1)

  2. id2 (member 2)

  3. nsnps

  4. hethet: proportion of sites where both are heterozygous

  5. k: Kinship Coefficient

Usage

read_plink2_king(file)

Value

A tibble containing the 6 columns from the plink2 --make-king-table output.

Arguments

file

Input file path

References

https://www.cog-genomics.org/plink/2.0/distance#make_king

Examples

Run this code
plink2kingFile <- system.file("extdata", "plink2-king-table.tsv", package="skater", mustWork=TRUE)
plink2king <- read_plink2_king(plink2kingFile)
plink2king
plink2king %>% dplyr::filter(k>0.01)

Run the code above in your browser using DataLab