binmat: binmat

Description Usage Arguments Value Examples

View source: R/make-bin-mat.R

Description

Enables creation of a binary matrix from a maf file with a predifined list of patients (rows are patients and columns are genes)

Usage

1
2
3
binmat(patients = NULL, maf, mut.type = "SOMATIC", SNP.only = F,
  include.silent = F, fusion = NULL, cna = NULL, cna.relax = F,
  spe.plat = F)

Arguments

patients

a character vector that let's the user specify the patients to be used to create the matrix. Default is NULL is which case all patients in the MAF file will be used.

maf

A MAF file.

mut.type

The mutation type to be used. Options are "SOMATIC", "GERMLINE" or "ALL". Note "ALL" will keep all mutations regardless of status (not recommended). Default is SOMATIC.

SNP.only

Boolean to rather the genetics events to be kept only to be SNPs (insertions and deletions will be removed). Default is FALSE.

include.silent

Boolean to keep or remove all silent mutations. TRUE keeps, FALSE removes. Default is FALSE.

fusion

An optional MAF file for fusions. If inputed the outcome will be added to the matrix with columns ending in ".fus". Default is NULL.

cna

An optional CNA files. If inputed the outcome will be added to the matrix with columns ending in ".del" and ".amp". Default is NULL. Note that this file must have patients as columns and genes as rows. binmat expects a matrix with values between -2 and 2. Please do not use any other format. Other functions in the package are available to deal with more detailed CNA data.

cna.relax

for cna data only enables to count both gains and shallow deletions as amplifications and deletions respectively.

spe.plat

boolean specifying if specific IMPACT platforms should be considered. When TRUE NAs will fill the cells for genes of patients that were not sequenced on that plaform. Default is TRUE.

Value

mut : a binary matrix of mutation data

no.mu.patients : a character vector of patients having no mutations found in the MAF file.

Examples

1
2
3
library(gnomeR)
mut.only <- binmat(maf = mut)
all.platforms <- binmat(patients = unique(mut$Tumor_Sample_Barcode)[1:100],maf = mut,fusion = fusion,cna = cna)

margarethannum/gnomeR documentation built on Feb. 26, 2020, 8:16 p.m.