tabulate_allele_frequency_matrix: Allele frequencies for all SNPs for each level of each...

View source: R/utility_functions.R

tabulate_allele_frequency_matrixR Documentation

Allele frequencies for all SNPs for each level of each requested facet.

Description

Fetch allele frequencies for all SNPs for each level of all the requested facets. Major and minor allele frequencies will be interleaved, with the major allele first for each locus.

Usage

tabulate_allele_frequency_matrix(x, facets = NULL)

Arguments

x

snpRdata object

facets

character, default NULL. The facets for which to calculate allele frequencies. See Facets_in_snpR for details.

Value

A named, nested list containing allele frequency matrices for each facet level for all requested facets, merged into the provided snpRdata object.

Author(s)

William Hemstrom

Examples

# base level
d <- tabulate_allele_frequency_matrix(stickSNPs)
get.snpR.stats(d, stats = "allele_frequency_matrix")

# facet
d <- tabulate_allele_frequency_matrix(stickSNPs, "pop")
get.snpR.stats(d, "pop", stats = "allele_frequency_matrix")


hemstrow/snpR documentation built on July 5, 2025, 4:38 a.m.