Learn R Programming

tidypopgen (version 0.4.3)

indiv_inbreeding: Individual inbreeding coefficient

Description

This function calculates the inbreeding coefficient for each individual based on the beta estimate from Weir and Goudet (2017).

Usage

indiv_inbreeding(.x, method = c("WG17"), allele_sharing_mat = NULL, ...)

# S3 method for tbl_df indiv_inbreeding(.x, method = c("WG17"), allele_sharing_mat = NULL, ...)

# S3 method for vctrs_bigSNP indiv_inbreeding(.x, method = c("WG17"), allele_sharing_mat = NULL, ...)

# S3 method for grouped_df indiv_inbreeding(.x, method = c("WG17"), allele_sharing_mat = NULL, ...)

Value

a numeric vector of inbreeding coefficients.

Arguments

.x

a vector of class vctrs_bigSNP (usually the genotype column of a gen_tibble object), or a gen_tibble.

method

currently only "WG17" (for Weir and Goudet 2017).

allele_sharing_mat

optional and only relevant for "WG17", the matrix of Allele Sharing returned by pairwise_allele_sharing() with as_matrix=TRUE. As a number of statistics can be derived from the Allele Sharing matrix, it is sometimes more efficient to pre-compute this matrix. It is not possible to use this with grouped tibbles.

...

currently unused.

References

Weir, BS and Goudet J (2017) A Unified Characterization of Population Structure and Relatedness. Genetics (2017) 206:2085

Examples

Run this code
example_gt <- load_example_gt("gen_tbl")

example_gt %>% indiv_inbreeding(method = "WG17")

Run the code above in your browser using DataLab