fix_clonal_genotype | R Documentation |
Fix the absence of the clonal genotype in the data (if needed)
fix_clonal_genotype(samples, freqs, labels, matching_samples)
samples |
input dataset (mutational matrix) as matrix |
freqs |
genotype frequencies (in the rows' order) |
labels |
list of gene names (in the columns' order) |
matching_samples |
list of sample names matching each genotype |
a named list containing the fixed "samples", "freqs" and "labels"
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) if( is.null(compactedDataset$row_names) ){ compactedDataset$row_names <- rownames(compactedDataset$matrix) } matching_samples <- compactedDataset$row_names # matching_samples matching_samples # fix Colonal genotype absence, if needed fix <- fix_clonal_genotype(samples, freqs, labels, matching_samples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.