Estimate allele frequencies at each each locus
loci_alt_freq.Rd
Allele frequencies can be estimates as minimum allele frequencies (MAF) with
loci_maf()
or the frequency of the alternate allele (with loci_alt_freq()
).
The latter are in line with the genotypes matrix (e.g. as extracted by
show_loci()
). Most users will be in interested in the MAF, but the
raw frequencies might be useful when computing aggregated statistics.
Usage
loci_alt_freq(.x, ...)
# S3 method for class 'tbl_df'
loci_alt_freq(.x, ...)
# S3 method for class 'vctrs_bigSNP'
loci_alt_freq(.x, ...)
# S3 method for class 'grouped_df'
loci_alt_freq(.x, n_cores = bigstatsr::nb_cores(), ...)
loci_maf(.x, ...)
# S3 method for class 'tbl_df'
loci_maf(.x, ...)
# S3 method for class 'vctrs_bigSNP'
loci_maf(.x, ...)
# S3 method for class 'grouped_df'
loci_maf(.x, n_cores = bigstatsr::nb_cores(), ...)
Arguments
- .x
a vector of class
vctrs_bigSNP
(usually thegenotypes
column of agen_tibble
object), or agen_tibble
.- ...
other arguments passed to specific methods, currently unused.
- n_cores
number of cores to be used, it defaults to
bigstatsr::nb_cores()