estimSnpAf: Allele frequencies

View source: R/quantgen.R

estimSnpAfR Documentation

Allele frequencies

Description

Estimate allele frequencies of bi-allelic SNPs. If previous sample sizes and counts per SNP are provided, it updates them.

Usage

estimSnpAf(
  X,
  allow.updating = FALSE,
  prev.nb.genos = NULL,
  prev.nb.refalls = NULL
)

Arguments

X

matrix of bi-allelic SNP genotypes encoded in allele doses in [0,2], with genotypes in rows and SNPs in columns; missing values should be encoded as NA

allow.updating

if TRUE, the sample sizes and counts per SNP will be kept to allow further updating

prev.nb.genos

vector of number of genotypes (sample sizes per SNP); the length and names should correspond to the columns of the X matrix

prev.nb.refalls

vector of number of reference alleles (counts per SNP); the length and names should correspond to the columns of the X matrix

Value

vector, with sample sizes and counts per SNP as attributes if updating is allowed

Author(s)

Timothee Flutre

See Also

estimSnpMaf


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.