Learn R Programming

SMDIC (version 0.1.6)

maf2matrix: 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)

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.

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).

Examples

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

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

Run the code above in your browser using DataLab