CalcFreqVariant: A function to count occurences of genotypes in a variant...

Description Usage Arguments Value See Also Examples

Description

A function to count occurences of genotypes in a variant vector.

Usage

1
2
3
CalcFreqVariant(variant, genotypic = TRUE, allelic = FALSE,
  absolute = TRUE, percentage = FALSE, totals = TRUE,
  min.freq.gt = NULL, min.freq.al = NULL)

Arguments

variant

The genotype matrix to analyse

genotypic

If TRUE (default), include frequencies of genotypes in the result

allelic

If TRUE, include frequencies of alles in the result, default set to FALSE

absolute

If TRUE (default), occurences will be shown instead of relative frequencies

percentage

If TRUE and absolute is FALSE, show the relative frequencies in percentage

totals

If TRUE (default), returned vector will include totals.

min.freq.gt

Optional. Minimal value of relative frequency for each genotype in a variant. If variant does not fulfill this condition, return NULL. Default is NULL (disabled).

min.freq.al

Optional. Minimal value of relative frequency for each allele in a variant. If variant does not fulfill this condition, return NULL. Default is NULL (disabled).

Value

A vector of frequencies. Each Item is a calculated frequency for this variant. Item names depend on provided parameters. Typical item names would be "count_gt_HomoREF" (absolute frequency of homo REF genotype) or "freq_al_ALT" (relative frequency of ALT alleles). Item names ending with "MissVal" concern samples with missing values for this variant. Item names ending with "Total" concern all samples for this variant, including the ones with missing data.

See Also

CalcFreqGt which bind this function

Examples

1
2
3
4
5
6
7
## Not run: 
CalcFreqVariant(variant)
CalcFreqVariant(variant, genotypic = FALSE, allelic = TRUE)
CalcFreqVariant(variant, absolute = FALSE, percentage = TRUE)
CalcFreqVariant(variant, totals= FALSE, min.freq.al = 0.15)

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.