Description Usage Arguments Value Author(s) See Also Examples
Make a matrix of plots that display a metric calculated in levels of a given
phenotype,
and stored in columns of the info
slot of a VCF
object.
1 2 |
vcf |
|
metric |
Metric to plot on the Y axis.
All columns in the |
phenotype |
Column in the |
... |
Additional arguments, passed to the |
title |
Title for the graph, passed to the |
gg
object returned by the ggpairs method.
Kevin Rue-Albrecht
ggpairs
,
addPhenoLevelFrequencies,ExpandedVCF-method
,
and VCF
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 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(phenoFile, 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)
vcf <- addFrequencies(vcf, "super_pop")
# Example usage ----
pairsInfo(vcf, "MAF", "super_pop")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.