View source: R/binom-scaling.R
bed_scaleBinom | R Documentation |
Binomial(2, p) scaling where p
is estimated.
bed_scaleBinom(
obj.bed,
ind.row = rows_along(obj.bed),
ind.col = cols_along(obj.bed),
ncores = 1
)
obj.bed |
Object of type bed, which is the mapping of some bed file.
Use |
ind.row |
An optional vector of the row indices (individuals) that
are used. If not specified, all rows are used. |
ind.col |
An optional vector of the column indices (SNPs) that are used.
If not specified, all columns are used. |
ncores |
Number of cores used. Default doesn't use parallelism.
You may use |
You will probably not use this function as is but as parameter
fun.scaling
of other functions (e.g. bed_autoSVD
and bed_randomSVD
).
A data frame with $center
and $scale
.
This scaling is widely used for SNP arrays. Patterson N, Price AL, Reich D (2006). Population Structure and Eigenanalysis. PLoS Genet 2(12): e190. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pgen.0020190")}.
bedfile <- system.file("extdata", "example-missing.bed", package = "bigsnpr")
obj.bed <- bed(bedfile)
str(bed_scaleBinom(obj.bed))
str(bed_randomSVD(obj.bed, bed_scaleBinom))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.