snpgdsIndivBeta | 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, useMatrix=FALSE, verbose=TRUE)
snpgdsIndivBetaRel(beta, beta_rel, 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 |
useMatrix |
if |
beta |
the object returned from |
beta_rel |
the beta-based matrix is generated relative to
|
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 |
inbreeding |
a logical value; |
beta |
beta estimates |
avg_val |
the average of M_B among all loci, it could be used to calculate each M_ij |
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
Weir BS, Goudet J. A Unified Characterization of Population Structure and Relatedness. Genetics. 2017 Aug;206(4):2085-2103. doi: 10.1534/genetics.116.198424.
snpgdsGRM
, snpgdsIndInb
,
snpgdsFst
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())
b <- snpgdsIndivBeta(genofile, inbreeding=FALSE)
b$beta[1:10, 1:10]
z <- snpgdsIndivBetaRel(b, min(b$beta))
# close the file
snpgdsClose(genofile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.