annotate_MAF: Annotate MAF

Description Usage Arguments Value Examples

View source: R/annotate_MAF.R

Description

Annotate VRanges object with population minor allele frequency from gnomAD

Usage

1
annotate_MAF(sample, MAF_database, genome)

Arguments

sample

VRanges object of the varscan pileup2cns output

MAF_database

GScores object with MAFs for each position

genome

Genome of input object, accepts either hg19 or hg38

Value

This function returns the VRanges object with the additional metadata column MAF.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Sample with hg19 reference, annotated with gnomAD exome hs37d5
variants <- load_as_VRanges(sample_name = "pt123",
    sample_path = "./patient_123_pileup2cns", genome = "hg19", metadata = TRUE)
library(MafDb.gnomADex.r2.1.hs37d5)
variants <- annotate_MAF(sample = variants,
    MAF_database = MafDb.gnomADex.r2.1.hs37d5, genome = "hg19")

## End(Not run)
## Not run: 
# Sample with hg38 reference, annotated with gnomAD genome GRCh38
variants <- load_as_VRanges(sample_name = "pt321",
    sample_path = "./patient_321_pileup2cns", genome = "hg38", metadata = TRUE)
library(MafDb.gnomAD.r2.0.1.GRCh38)
variants <- annotate_MAF(sample = variants,
    MAF_database = MafDb.gnomAD.r2.0.1.GRCh38, genome = "hg38")

## End(Not run)

andygxzeng/ECSI documentation built on Feb. 6, 2021, 8:53 a.m.