maf2matrix: maf2matrix

Description Usage Arguments Value Examples

View source: R/maf2matrix.R

Description

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

Usage

1
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

1
2
3
4
5
#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 Nov. 13, 2020, 5:06 p.m.