Aggregator {AllelicSeries} | R Documentation |
Aggregator
Description
Aggregates genotypes within annotation categories.
Usage
Aggregator(
anno,
geno,
drop_empty = TRUE,
indicator = FALSE,
method = "none",
min_mac = 0,
weights = c(1, 2, 3)
)
Arguments
anno |
(snps x 1) annotation vector with integer values in 1 through the number of annotation categories L. |
geno |
(n x snps) genotype matrix. |
drop_empty |
Drop empty columns? Default: TRUE. |
indicator |
Convert raw counts to indicators? Default: FALSE. |
method |
Method for aggregating across categories: ("none", "max", "sum"). Default: "none". |
min_mac |
Minimum minor allele count for inclusion. Default: 0. |
weights |
(L x 1) vector of annotation category weights. Note that the
number of annotation categories L is inferred from the length of |
Value
(n x L) Numeric matrix without weighting, (n x 1) numeric matrix with weighting.
Notes
Ensure the length of the
weights
vector matches the total number of annotation categories.The
weights
essentially scales the minor allele count in thel
th category byweights[l]
.