mts_plotCRISPRGeneCluster: Visualise CRISPR and expression data (SynLeGG methods).

View source: R/mts_plotCRISPRGeneCluster.R

mts_plotCRISPRGeneClusterR Documentation

Visualise CRISPR and expression data (SynLeGG methods).

Description

Produces a boxplot of CRISPR scores split according to MultiSEp clusters (typically gene expression, but other data types may be used to produce the clusters) and with data points coloured by tissue. Alternatively, may produce a waterfall plot of CRISPR scores coloured by the MultiSEp cluster or a density plot of gene expression values (log2 data are given in the example). In the boxplot, CRISPR scores are split according to the MultiSEp gene expression cluster of the specified mrna gene.

Usage

mts_plotCRISPRGeneCluster(
  mrna_gene, 
  crispr_gene, 
  resultList, 
  crisprMatrix, 
  tissueMatrix, 
  diseaseFilter, 
  mixModelClustersXPR=NULL, 
  plotType
)

Arguments

mrna_gene

User specified mRNA gene. Must match a gene in the expression matrix.

crispr_gene

User specified CRISPR gene. Must match a gene in the CRISPR matrix. Not required for plotType mrna_only.

resultList

A result list from the mts_clusterAvg function, which specifies gene expression clusters. Required unless the mixModelClustersXPR argument is used.

crisprMatrix

Log2 crispr score matrix in a gene by sample format where rownames are genes and the column names are samples. Not required for plotType mrna_only.

tissueMatrix

Matrix of two columns where column 1 is a sample ID and column 2 is a tissue ID. Not required for plotType mrna_only.

diseaseFilter

Optional user specified tissue filter, defaults to all. Not used with plotType mrna_only.

mixModelClustersXPR

Optional output from mts_mixModelCluster as an alternative to specifying the resultList taken from mts_cluster_Avg.

plotType

User specified plot type. Options are 'Integrated', 'mrna_only' and 'crispr_only'. Defaults to 'Integrated'.

Value

A ggplot object, which can be printed or saved with ggsave. The plot produced depends on plotType:

  • "Integrated": a boxplot of crispr_gene CRISPR scores split according to the MultiSEp gene expression clusters of mrna_gene, with data points coloured by tissue (optionally restricted to a single tissue with diseaseFilter).

  • "crispr_only": a waterfall plot of crispr_gene CRISPR scores coloured by the MultiSEp cluster.

  • "mrna_only": a density plot of mrna_gene log2 expression values split by MultiSEp cluster.

See Also

mts_mixModelCluster, mts_clusterAvg

Examples

data(depMapXPR_subset)
data(depMapCRISPRscores_subset)
data(depMapTissue_subset)


clusterAssign <- mts_clusterAvg(
  exprsMatrix=depMapXPR_subset[1:5,],
  crisprMatrix=depMapCRISPRscores_subset, 
  cores=1
)

# boxplots
# using clustering results from mts_clusterAvg
mts_plotCRISPRGeneCluster(
  resultList = clusterAssign,
  mrna_gene = "NMT2",
  crispr_gene = "NMT1", 
  crisprMatrix = depMapCRISPRscores_subset, 
  tissueMatrix = depMapTissue_subset,
  plotType = "Integrated"
)

# With clusters defined by mts_mixmodelClusters
clusters_depMapXPR <- mts_mixModelCluster(
    dataMatrix = depMapXPR_subset[1:5,],
    cores = 1
)

mts_plotCRISPRGeneCluster(
  mrna_gene = "DNAJC15", 
  crispr_gene = "DNAJC19", 
  crisprMatrix = depMapCRISPRscores_subset, 
  tissueMatrix = depMapTissue_subset, 
  mixModelClustersXPR = clusters_depMapXPR,
  plotType = "Integrated"
)

# Waterfall plot of CRISPR scores coloured by gene expression cluster

mts_plotCRISPRGeneCluster(
  mrna_gene = "DNAJC15",
  crispr_gene = "DNAJC19",
  crisprMatrix = depMapCRISPRscores_subset,
  tissueMatrix = depMapTissue_subset,
  mixModelClustersXPR = clusters_depMapXPR,
  plotType = "crispr_only"
)

# density plot of gene expression clusters
mts_plotCRISPRGeneCluster(
  resultList = clusterAssign,
  mrna_gene = "NMT2",
  plotType = "mrna_only"
)

# tissue-specific plots
# Boxplot for lung cancer cell lines
mts_plotCRISPRGeneCluster(
  mrna_gene = "DNAJC15",
  crispr_gene = "DNAJC19",
  crisprMatrix = depMapCRISPRscores_subset,
  tissueMatrix = depMapTissue_subset,
  mixModelClustersXPR = clusters_depMapXPR,
  diseaseFilter = 'Lung Cancer',
  plotType = "Integrated"
)

# waterfall plot for lung cancer cell lines
mts_plotCRISPRGeneCluster(
  mrna_gene = "DNAJC15",
  crispr_gene = "DNAJC19",
  crisprMatrix = depMapCRISPRscores_subset,
  tissueMatrix = depMapTissue_subset,
  mixModelClustersXPR = clusters_depMapXPR,
  diseaseFilter = 'Lung Cancer',
  plotType = "crispr_only"
)


MultiSEp documentation built on Aug. 27, 2026, 5:07 p.m.