TVTBParam-class: TVTBparam class objects

TVTBparam-classR Documentation

TVTBparam class objects

Description

The TVTBparam class stores recurrent parameters of the TVTB package in a convenient format.

Usage

TVTBparam(
        genos, ranges = GRangesList(),
        aaf = "AAF", maf = "MAF", vep = "CSQ", bp = SerialParam(),
        svp = ScanVcfParam(which = reduce(unlist(ranges))))

Arguments

genos

A Genotypes object that declares the three sets of homozygote reference, heterozygote, and homozygote alternate genotypes, as well as the individual key suffix used to store data for each set of genotypes in the info slot of a VCF object. See also Details section.

ranges

A GRangesList of genomic regions. See svp argument. In the future, may be used to facet statistics and figures.

aaf

INFO key suffix used to store the alternate allele frequency (AAF).

maf

INFO key suffix used to store the minor allele frequency (MAF).

vep

INFO key suffix used to extract the VEP predictions. See svp argument.

bp

A BiocParallelParam object.

svp

A ScanVcfParam object. If none is supplied, the ScanVcfParam slot which is automatically set to reduce(unlist(ranges)).

Details

For each suffix stored in the TVTBparam object, TVTB may store data in the VCF object under the INFO keys defined as follows:

suffix

Statistics across all samples in the ExpandedVCF (e.g. "MAF").

phenotype_level_suffix

Statistics across samples associated with a given level of a given phenotype (e.g. "gender_male_MAF").

Users are recommended to avoid using those INFO keys for other purposes.

Value

A TVTBparam object that contains recurrent parameters.

Accessor methods

In the following code snippets x is a TVTBparam object.

genos(x), genos(x) <- value

Gets or sets the Genotypes object stored in the genos slot.

ranges(x), ranges(x) <- value

List of genomic ranges to group variants during analyses and plots.

ref(x), ref(x) <- value

Gets or sets the character vector that declares homozygote reference genotypes.

het(x), het(x) <- value

Gets or sets the character vector that declares heterozygote genotypes.

alt(x), alt(x) <- value

Gets or sets the character vector that declares homozygote alternate genotypes.

carrier(x)

Gets a character vectors of concatenated heterozygote and homozygote alternate genotypes. See also het and alt accessors.

aaf(x), aaf(x) <- value

Gets or sets the INFO key suffix used to store the alternate allele frequency (AAF).

maf(x), maf(x) <- value

Gets or sets the INFO key suffix used to store the minor allele frequency (MAF).

vep(x), maf(x) <- value

Gets or sets the INFO key suffix used to extract the VEP predictions.

bp(x), bp(x) <- value

Gets or sets the BiocParallel parameters.

suffix(x)

Gets a named character vector that declares individual suffixes used to store the data for each set of genotypes in the INFO field of the VCF object. Names of this vector are ref, het, alt, aaf, and maf.

svp(x), svp(x) <- value

Gets or sets the ScanVcfParam parameters.

Author(s)

Kevin Rue-Albrecht

See Also

Genotypes, VCF, ExpandedVCF, addCountGenos-methods vepInPhenoLevel-methods, variantsInSamples-methods, and BiocParallelParam.

Examples

# Constructors ----

grl <- GenomicRanges::GRangesList(GenomicRanges::GRanges(
    "15", IRanges::IRanges(48413170, 48434757, names = "SLC24A5")
    ))

tparam <- TVTBparam(Genotypes("0|0", c("0|1", "1|0"), "1|1"), ranges = grl)


# Accessors ----

## The Genotypes object stored in the genos slot of the TVTBparam object
## return by the genos() accessor.
genos(tparam)

## Genomic ranges stored in the TVTBparam object returned by the ranges()
## accessor.
ranges(tparam)

## Individual genotypes can be extracted with ref(), het(), alt() accessors.
ref(tparam)
het(tparam)
alt(tparam)

## Their individual INFO key suffixes can be extracted with suffix() applied to
## the above accessors.
suffix(tparam)
suffix(tparam)["ref"]
suffix(tparam)["het"]
suffix(tparam)["alt"]
suffix(tparam)["aaf"]
suffix(tparam)["maf"]

## Heterozygote, and alternate heterozygote genotypes are
## returned by the carrier() accessor.
carrier(tparam)

## INFO key suffix of alternate/minor allele frequency returned by the aaf()
## and maf() accessors.
aaf(tparam)
maf(tparam)

## INFO key suffix of the VEP predictions returned by the vep() accessor.
vep(tparam)

## BiocParallel parameters
bp(tparam)

## ScanVcfParam parameters
svp(tparam)

kevinrue/TVTB documentation built on July 9, 2024, 11:42 p.m.