maftools_cluster_samples | R Documentation |
Identify and visualise clusters of cancer samples based on somatic mutation data (gene-level differences visualised, not variant-level)
Approach involves:
Selecting a geneset of interest (by default uses genes mutated in the most samples).
Calculating 1-jaccard distance between samples based on which genes of the genesets are mutated.
Running heirarchical clustering algorithm using pheatmap.
Visualise resulting heatmap with user-selected annotations.
maftools_cluster_samples(
maf,
custom_genelist_to_cluster_by = NULL,
number_of_genes = 50,
genes_to_annotate = NULL,
annotate_most_altered_genes = TRUE,
topn_genes = 5,
metadata_columns = NULL,
include_silent_mutations = FALSE,
show_rownames = FALSE,
show_colnames = FALSE,
annotation_legend = TRUE,
fontsize = 10
)
maf |
maf object from maftools package (maf) |
custom_genelist_to_cluster_by |
names of genes to base clustering on. If unsure what genes to use. By default, the top 50 genes ranked by how manys samples they are mutated in will be used (character vector) |
number_of_genes |
number of genes to cluster based on. Chooses genes which are mutated in the most samples (only matters if not supplying custom_genelist_to_cluster_by) (integer) |
genes_to_annotate |
a custom list of genes to plot as a pseudo oncoplot (string) |
annotate_most_altered_genes |
automatically annotate with mutational status of genes mutated in the most samples (this is always based on coding/splice site mutation) (bool) |
topn_genes |
if annotate_most_altered_genes is true, how many genes to automatically visualise (integer) |
metadata_columns |
name of metadata columns to annotate heatmap based on (character) |
include_silent_mutations |
consider a gene mutated even if the only mutations present are silent (bool) |
show_rownames |
show sample names on rows (bool) |
show_colnames |
show sample names on columns (bool) |
annotation_legend |
show annotation legend (flag) |
fontsize |
font size (number) |
pheatmap object
maf <- maftools::tcgaLoad("GBM", source = "Firehose")
maftools_cluster_samples(maf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.