Description Usage Arguments Details Value Warning Author(s) See Also Examples
Adds dataset-wide genotypes counts
(reference homozygote, heterozygote, and alternate homozygote)
and allele frequencies (alternate and minor)
as INFO fields in an ExpandedVCF object.
Counts and frequencies may be calculated across all samples.
Multiple genotypes can be counted toward a single
frequency (e.g. combined c("0/0", "0|0") for
homozygote reference genotypes).
1 2 | ## S4 method for signature 'ExpandedVCF'
addOverallFrequencies(vcf, force = FALSE)
|
vcf |
|
force |
If If |
Genotypes and frequencies are calculated across all the
samples in the ExpandedVCF object, and stored in INFO fields
named according to settings stored in the TVTBparam object (see below).
The param object controls the key of INFO fields as
follows:
names(ref(param))Count of reference homozygote genotypes.
names(het(param))Count of heterozygote genotypes.
names(alt(param))Count of alternate homozygote genotypes.
aaf(param)Alternate allele frequency.
maf(param)Minor allele frequency
ExpandedVCF object including additional
INFO fields for genotype counts and allele frequencies.
See Details.
A warning message is issued if genotypes are not fully defined in the
TVTBparam.
Kevin Rue-Albrecht
addFrequencies,ExpandedVCF,list-method,
addPhenoLevelFrequencies,ExpandedVCF-method,
and VCF.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Example data ----
# VCF file
vcfFile <- system.file("extdata", "moderate.vcf", package = "TVTB")
# TVTB parameters
tparam <- TVTBparam(Genotypes("0|0", c("0|1", "1|0"), "1|1"))
# Pre-process variants
vcf <- VariantAnnotation::readVcf(vcfFile, param = tparam)
vcf <- VariantAnnotation::expand(vcf, row.names = TRUE)
# Example usage ----
vcf <- addOverallFrequencies(vcf, tparam)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.