ukbtools (version 0.11.1)

ukb_gen_rel_count: Relatedness count

Description

Creates a summary count table of the number of individuals and pairs at each degree of relatedness that occurs in the UKB sample, and an optional plot.

Usage

ukb_gen_rel_count(data, plot = FALSE)

Arguments

data

A dataframe of the genetic relatedness data including KING kinship coefficient, and proportion of alleles IBS = 0. See Details.

plot

Logical indicating whether to plot relatedness figure. Default = FALSE.

Value

If plot = FALSE (default), a count of individuals and pairs at each level of relatedness. If plot = TRUE, reproduces the scatterplot of genetic relatedness against proportion of SNPs shared IBS=0 (each point representing a pair of related UKB individuals) from the genotyping and quality control documentation.

Details

Use UKB supplied program `ukbgene` to retrieve genetic relatedness data file ukbA_rel_sP.txt. See UKB Resource 664. The count and plot include individuals with IBS0 >= 0.

See Also

ukb_gen_related_with_data, ukb_gen_samples_to_remove

Examples

Run this code
# NOT RUN {
# Use UKB supplied program `ukbgene` to retrieve genetic relatedness file ukbA_rel_sP.txt.
See \href{http://biobank.ctsu.ox.ac.uk/crystal/refer.cgi?id=664}{UKB Resource 664}.
With the whitespace delimited file read into R as e.g. ukb_relatedness,
generate a dataframe of counts or a plot as follows:

ukb_gen_rel_count(ukb_relatedness)
ukb_gen_rel_count(ukb_relatedness, plot = TRUE)
# }

Run the code above in your browser using DataCamp Workspace