annotate_mutational_matrix {CIMICE} | R 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)

[Package CIMICE version 1.2.1 Index]