vepInPhenoLevel-methods | R Documentation |
Returns VEP predictions for variants observed (uniquey) in samples associated with a given phenotype level.
## S4 method for signature 'ExpandedVCF'
vepInPhenoLevel(
vcf, phenoCol, level, vepCol, unique = FALSE)
vcf |
|
phenoCol |
Name of a column in |
level |
Phenotype level; only variants observed in at least one sample will be considered. |
vepCol |
VEP prediction fields; |
unique |
If |
A GRanges
including all VEP predictions associated with a variant
seen in at least one sample (heterozygote or alternate homozygote)
associated with the phenotype level.
The GRanges
contains at least one column for the VEP prediction
value.
Additional columns containing another VEP prediction field may be added
using the facet
argument.
If available, "Feature"
is a recommended value for this argument,
as VEP typically produce one prediction per variant per feature.
A warning
message is issued if genotypes are not fully defined in the
TVTBparam
.
Kevin Rue-Albrecht
VCF
,
GRanges
,
and DataFrame
.
# Example data ----
# VCF file
vcfFile <- system.file("extdata", "moderate.vcf", package = "TVTB")
# Phenotype file
phenoFile <- system.file("extdata", "moderate_pheno.txt", package = "TVTB")
phenotypes <- S4Vectors::DataFrame(
read.table(file = phenoFile, header = TRUE, row.names = 1))
# TVTB parameters
tparam <- TVTBparam(Genotypes("0|0", c("0|1", "1|0"), "1|1"))
# Pre-process variants
vcf <- VariantAnnotation::readVcf(
vcfFile, param = tparam, colData = phenotypes)
vcf <- VariantAnnotation::expand(vcf, row.names = TRUE)
# Example usage ----
vepInPhenoLevel(vcf, "super_pop", "AFR", c("CADD_PHRED", "Feature", "IMPACT"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.