prepare_labels {CIMICE} | R Documentation

## Prepare node labels based on genotypes

### Description

Prepare node labels so that each node is labelled with a comma separated list of the alterated genes representing its associated genotype.

### Usage

    prepare_labels(samples, genes)

### Arguments

`samples` | input dataset (mutational matrix) as matrix
`genes` | list of gene names (in the columns' order)

### Details

Note that after this procedure the user is expected also to run fix_clonal_genotype to also add the clonal genortype to the mutational matrix if it is not present.

### Value

the computed edge list

### Examples

    require(dplyr)

    # compact
    compactedDataset <- compact_dataset(example_dataset())
    samples <- compactedDataset$matrix

    # save genes' names
    genes <- colnames(compactedDataset$matrix)

    # keep the information on frequencies for further analysis
    freqs <- compactedDataset$counts/sum(compactedDataset$counts)

    # prepare node labels listing the mutated genes for each node
    labels <- prepare_labels(samples, genes)

[Package CIMICE version 1.2.1 Index]