maf2matrix: maf2matrix

View source: R/maf2matrix.R

maf2matrixR Documentation

maf2matrix

Description

Function 'maf2matrix' use mutation annotation file (MAF) format data to build a binary mutations matrix.

Usage

maf2matrix(maffile, percent = 0.01, nonsynonymous = TRUE)

Arguments

maffile

The name of mutation annotation file (MAF) format data. It must be an absolute path or the name relatived to the current working directory.

percent

A threshold value(one percent as the default value). The genes with a given mutation frequency equal or greater than the threshold value are retained for the following analysis.

nonsynonymous

Logical, tell if extract the non-silent somatic mutations (nonsense mutation, missense mutation, frame-shif indels, splice site, nonstop mutation, translation start site, inframe indels).

Value

A binary mutations matrix, in which 1 represents any mutation occurs in a particular gene in a particular sample, otherwise the element is 0.

Examples

#get path of the mutation annotation file.
maf = system.file('extdata', 'example.maf.gz', package = 'SMDIC')

# perform function `maf2matrix`.
mutmatrix.example<-maf2matrix(maf)

SMDIC documentation built on Aug. 29, 2023, 5:11 p.m.