fix_clonal_genotype {CIMICE}R Documentation

Manage Clonal genotype in data

Description

Fix the absence of the clonal genotype in the data (if needed)

Usage

fix_clonal_genotype(samples, freqs, labels)

Arguments

samples

input dataset (mutational matrix) as matrix

freqs

genotype frequencies (in the rows' order)

labels

list of gene names (in the columns' order)

Value

a named list containing the fixed "samples", "freqs" and "labels"

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)

# fix Colonal genotype absence, if needed
fix <- fix_clonal_genotype(samples, freqs, labels)

samples <- fix[["samples"]]
freqs <- fix[["freqs"]]
labels <- fix[["labels"]]

list("samples" = samples, "freqs" = freqs,
    "labels" = labels, "genes" = genes)


[Package CIMICE version 1.2.0 Index]