readPGx: Read in PGx Data from VCF File

View source: R/read-pgx.R

readPGxR Documentation

Read in PGx Data from VCF File

Description

This function is a wrapper around readVcf that reads only the PGx locations into a PGx object. The user must provide an indexed VCF file. The path to the indexed VCF file gets passed to TabixFile which is then used as the file argument to readVcf.

Usage

readPGx(file, gene, genome = "GRCh38")

Arguments

file

A phased and normalized VCF file. This file must be indexed (.tbi)

gene

The PGx gene to subset from VCF file. See pgxGenes for available genes.

genome

The genome build. Currently only GRCh38 is supported.

Details

The PGx locations used to subset the input VCF file are derived from PharmVar v5.1.14 VCF files available at https://www.pharmvar.org/download. The "create-allele-defintions.R" file included in the data-raw directory of this package describes the steps used to reproduce the construction of the GRanges object used in this function. These GRanges objects are accessible via the pgxReferenceRanges function. Likewise, haplotype definitions for each gene were derived from PharmVar v5.1.14 haplotypes.tsv files. The haplotype definitons for all genes are accessible via pgxHaplotypeRanges.

Value

Object of class PGx


coriell-research/pgx documentation built on June 4, 2022, 11:08 a.m.