Learn R Programming

AllelicSeries (version 0.1.1.5)

CollapseGeno: Collapse Variants

Description

Collapse variants with minor allele counts below the min_mac threshold into an aggregated variant, separately within each variant category. Note that the ordering of the variants will change, and that collapsing does not guarantee that the resulting aggregate variant will itself have a MAC greater than or equal to min_mac.

Usage

CollapseGeno(anno, geno, min_mac = 11)

Value

List containing the collapsed genotypes geno and corresponding annotations anno, plus a data.frame vars specifying which variants were collapsed within each annotation category.

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.

min_mac

Minimum minor allele count (MAC) for retention as an individual variant. Variants with a MAC strictly less than the minimum MAC will be collapsed into an aggregated variant, separately within each annotation category.