alle_freqs: counts alleles from a geno_counts matrix

Description Usage Arguments Value Examples

Description

counts alleles from a geno_counts matrix

Usage

1
alle_freqs(x, proportion = T, smidge = 0.5)

Arguments

x

the geno counts matrix

proportion

if false it returns the counts. if true the proportions (summing to one)

smidge

small amount to add to count of each allele (could be useful if there are zero counts on some alleles)

Value

A matrix with 2 rows (corresponding to alleles 0 and 1) and L columns.

Examples

1
2
3
4
snp_genos <- get_snp_genos(fs_dev_test_data$plain_snp_data)
snp_indics <- genos_to_indicators(g = snp_genos$mat)
geno_counts <- count_genos(snp_indics)
afreqs <- alle_freqs(geno_counts)

eriqande/fullsniplings documentation built on May 16, 2019, 8:45 a.m.