snpgdsIndivBeta {SNPRelate}R Documentation

Individual inbreeding and relatedness estimation (beta estimator)

Description

Calculate individual inbreeding and relatedness estimation (beta estimator) using SNP genotype data.

Usage

snpgdsIndivBeta(gdsobj, sample.id=NULL, snp.id=NULL, autosome.only=TRUE,
    remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, method=c("weighted"),
    inbreeding=TRUE, num.thread=1L, with.id=TRUE, verbose=TRUE)

Arguments

gdsobj

an object of class SNPGDSFileClass, a SNP GDS file

sample.id

a vector of sample id specifying selected samples; if NULL, all samples are used

snp.id

a vector of snp id specifying selected SNPs; if NULL, all SNPs are used

autosome.only

if TRUE, use autosomal SNPs only; if it is a numeric or character value, keep SNPs according to the specified chromosome

remove.monosnp

if TRUE, remove monomorphic SNPs

maf

to use the SNPs with ">= maf" only; if NaN, no MAF threshold

missing.rate

to use the SNPs with "<= missing.rate" only; if NaN, no missing threshold

method

"weighted" estimator

inbreeding

TRUE, the diagonal is a vector of inbreeding coefficients; otherwise, individual variance estimates

num.thread

the number of (CPU) cores used; if NA, detect the number of cores automatically

with.id

if TRUE, the returned value with sample.id and sample.id

verbose

if TRUE, show information

Value

Return a list if with.id = TRUE:

sample.id

the sample ids used in the analysis

snp.id

the SNP ids used in the analysis

beta

the genetic relationship matrix; different methods might have different meanings and interpretation for estimates

If with.id = FALSE, this function returns the genetic relationship matrix without sample and SNP IDs.

Author(s)

Xiuwen Zheng

References

Weir BS, Zheng X. SNPs and SNVs in Forensic Science. Forensic Science International: Genetics Supplement Series. 2015. doi:10.1016/j.fsigss.2015.09.106

See Also

snpgdsGRM, snpgdsIndInb, snpgdsFst

Examples

library(SNPRelate)
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())

beta <- snpgdsIndivBeta(genofile, with.id=FALSE)
beta[1:10, 1:10]


# close the file
snpgdsClose(genofile)

[Package SNPRelate version 1.10.2 Index]