annotate_mutational_matrix: Add samples and genes names to a mutational matrix

View source: R/input.R

annotate_mutational_matrixR Documentation

Add samples and genes names to a mutational matrix

Description

Given M mutational matrix, add samples as row names, and genes as column names. If there are repetitions in row names, these are solved by adding a sequential identifier to the names.

Usage

annotate_mutational_matrix(M, samples, genes)

Arguments

M

mutational matrix

samples

list of sample names

genes

list of gene names

Value

N with the set row and column names

Examples

require(Matrix)
genes <- c("A", "B", "C")
samples <- c("S1", "S2", "S2")
M <- Matrix(c(0,0,1,0,0,1,0,1,1), ncol=3, sparse=TRUE, byrow = TRUE)

annotate_mutational_matrix(M, samples, genes)


redsnic/CIMICE documentation built on March 30, 2022, 2:46 a.m.