Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

agcounts

Calculate allele and genotype counts for X-chromosomal markers


Description

Function agcounts determines sample size, minor are major allele counts, allele counts in females, numbers of males and females and allele frequencies for a vector of genotypes counts of an X-chromosomal markers.

Usage

agcounts(x, verbose = FALSE)

Arguments

x

a vector of X-chromosomal genotype counts (A,B,AA,AB,BB)

verbose

print the counts if (verbose = TRUE)

Value

n

sample size

nA

number of A alleles

nB

number of B alleles

nf

number of females

nm

number of males

nAf

number of A alleles in females

nBf

number of B alleles in females

nt

total number of alleles

fAA

number of AA females

fAB

number of AB females

fBB

number of BB females

pA

overall A allele frequency

pB

overall B allele frequency

Author(s)

Jan Graffelman jan.graffelman@upc.edu

See Also

mac,link{maf}

Examples

rs5968922 <-  c(A=392, B=212, AA=275, AB=296, BB=80)
counts <- agcounts(rs5968922)

HardyWeinberg

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

v1.7.2
GPL (>= 2)
Authors
Jan Graffelman [aut, cre], Christopher Chang [ctb], Xavi Puig [ctb], Jan Wigginton [ctb], Leonardo Ortoleva [ctb], William R. Engels [ctb]
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.