View source: R/binom-scaling.R
bed_counts | R Documentation |
Counts the number of 0s, 1s, 2s and NAs by variants in the bed file.
bed_counts(
obj.bed,
ind.row = rows_along(obj.bed),
ind.col = cols_along(obj.bed),
byrow = FALSE,
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. |
byrow |
Whether to count by individual rather than by variant?
Default is |
ncores |
Number of cores used. Default doesn't use parallelism.
You may use |
A matrix of with 4 rows and length(ind.col)
columns.
bedfile <- system.file("extdata", "example-missing.bed", package = "bigsnpr")
obj.bed <- bed(bedfile)
bed_counts(obj.bed, ind.col = 1:5)
bed_counts(obj.bed, ind.row = 1:5, byrow = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.