Learn R Programming

maftools (version 0.99.30)

annovarToMaf: Converts annovar annotations into MAF.

Description

Converts variant annotations from Annovar into a basic MAF.

Usage

annovarToMaf(annovar, Center = NULL, refBuild = "hg19", tsbCol = NULL,
  table = "refGene", basename = NULL, header = FALSE, sep = "\t",
  MAFobj = FALSE)

Arguments

annovar

input annovar annotation file.

Center

Center field in MAF file will be filled with this value. Default NA.

refBuild

NCBI_Build field in MAF file will be filled with this value. Default hg19.

tsbCol

column name containing Tumor_Sample_Barcode or sample names in input file.

table

reference table used for gene-based annotations. Can be 'ensGene' or 'refGene'. Default 'refGene'

basename

If provided writes resulting MAF file to an output file.

header

was annovar run on a file contiaining variants with an header line. Default FALSE.

sep

field seperator for input file. Default tab seperated.

MAFobj

If TRUE, returns results as an MAF object.

Value

MAF table.

Details

Annovar is one of the most widely used Variant Annotation tools in Genomics. Annovar output is generally in a tabular format with various annotation columns. This function converts such annovar output files into MAF. This function requires that annovar was run with gene based annotation as a first operation, before including any filter or region based annotations.

e.g, table_annovar.pl example/ex1.avinput humandb/ -buildver hg19 -out myanno -remove -protocol (refGene),cytoBand,dbnsfp30a -operation (g),r,f -nastring NA

This function mainly uses gene based annotations for processing, rest of the annotation columns from input file will be attached to the end of the resulting MAF.

References

Wang, K., Li, M. & Hakonarson, H. ANNOVAR: functional annotation of genetic variants from high-throughput sequencing data. Nucleic Acids Res 38, e164 (2010).

Examples

Run this code
# NOT RUN {
var.annovar <- system.file("extdata", "variants.hg19_multianno.txt", package = "maftools")
var.annovar.maf <- annovarToMaf(annovar = var.annovar, Center = 'CSI-NUS', refBuild = 'hg19',
tsbCol = 'Tumor_Sample_Barcode', table = 'ensGene', header = TRUE)
# }

Run the code above in your browser using DataLab