Learn R Programming

AllelicSeries (version 0.1.1.5)

Aggregator: 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)
)

Value

(n x L) Numeric matrix without weighting, (n x 1) numeric matrix with weighting.

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 weights.

Notes

  • Ensure the length of the weights vector matches the total number of annotation categories.

  • The weights essentially scales the minor allele count in the lth category by weights[l].