count.allele: Count allele frequencies

Description Usage Arguments Value Author(s) Examples

Description

Count major and minor allele frequencies.

Usage

1

Arguments

x

a vector of single SNP information (minor allele count for genotype).

...

not used.

Value

a vector with major and minor allele frequency.

Author(s)

Beibei Jiang beibei_jiang@psych.mpg.de and Benno Pütz puetz@psych.mpg.de

Examples

1
2
3
4
maf <- 0.1
x <- sample(0:2, 1000, replace = TRUE, prob = c((1-maf)^2, 2*(1-maf)*maf, maf^2))
table(x)
count.allele(x)

Example output

x
  0   1   2 
800 187  13 
[1] 0.8935 0.1065

SimPhe documentation built on May 1, 2019, 9:10 p.m.