allele.freq: Allele Frequency Computation from Genotype Data

Description Usage Arguments Value Examples

View source: R/allele.freq.R

Description

Computes allele frequencies from genotype data.

Usage

1
 allele.freq(geno)

Arguments

geno

matrix of alleles, such that each locus has a pair of adjacent columns of alleles, and the order of columns corresponds to the order of loci on a chromosome. If there are K loci, then ncol(geno) = 2*K. Rows represent the alleles for each subject. Each allele shoud be represented as numbers (A=1,C=2,G=3,T=4).

Value

array of allele frequencies of each SNP. The computed allele is targeted as an order of alleles, "A", "C", "G", and "T".

Examples

1
2
3

Example output

[1] 0.7187500 0.1250000 0.6666667 0.2812500 0.4270833 0.1145833 0.8854167
 [1] 0.97916667 0.98958333 0.71875000 0.12500000 0.66666667 0.28125000
 [7] 0.97916667 0.04166667 0.42708333 0.01041667 0.98958333 0.11458333
[13] 0.97916667 0.88541667 0.97916667 0.03125000

IFP documentation built on Nov. 26, 2020, 1:07 a.m.

Related to allele.freq in IFP...