snpgdsIndivBeta {SNPRelate} | R Documentation |
Calculate individual inbreeding and relatedness estimation (beta estimator) using SNP genotype data.
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)
gdsobj |
an object of class |
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 |
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 |
|
num.thread |
the number of (CPU) cores used; if |
with.id |
if |
verbose |
if |
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.
Xiuwen Zheng
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
snpgdsGRM
, snpgdsIndInb
,
snpgdsFst
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)