| mts_omics | R Documentation |
Compare any 'omics datatype either against itself (e.g. XPR_vs_XPR) or against another data-type (e.g. XPR_vs_CRISPR). Analysis of dependency relationships across many different data types is possible. For example: mutation, RNA-seq, proteomics, methylation data, histone marks, CRISPR scores, drug sensitivity, potentially metabolomics etc. This function takes as input either one dataset (for symmetrical analysis such as XPR_vs_XPR) or two datasets (non-symmetrical analysis such as XPR_vs_mutation).
mts_omics(
dataMatrix = NULL,
dataMatrix2 = NULL,
mixModelClusters1 = NULL,
mixModelClusters2 = NULL,
categorical1 = FALSE,
categorical2 = FALSE,
genepairs = NULL,
SyntheticLethalityPrediction = TRUE,
p_adjustMethod = c("BY","BH"),
qVal,
directionality = c("depletion", "enrichment"),
include_reverse_pairs = TRUE,
effectsize = TRUE,
effectsize_threshold = NULL,
verbose = FALSE,
cores)
dataMatrix |
A matrix in gene by sample format, where rownames typically correspond to genes (or other data features) and colnames correspond to sample names. May be omitted if |
dataMatrix2 |
Optional. A matrix where rownames correspond to genes (or other data features) and colnames correspond to sample names. If provided, the function will perform bidirectional analysis to assess associations between values in dataMatrix and dataMatrix2. If not provided, the function will perform one-directional analysis. May be omitted if |
mixModelClusters1 |
Optional. A pre-computed cluster list for data type 1, as produced by |
mixModelClusters2 |
Optional. A pre-computed cluster list for data type 2, as for |
categorical1 |
If |
categorical2 |
As |
genepairs |
Optional. If the argument is not called (left as |
SyntheticLethalityPrediction |
If set to |
p_adjustMethod |
The |
directionality |
Considers directionality across the entire contingency table. Two options are available: |
include_reverse_pairs |
If |
qVal |
A q value filter. Defaults to 0.05. |
effectsize |
If |
effectsize_threshold |
A numeric value between 0 and 1. Gene pairs with effect sizes below this threshold will be excluded from the final results. If set to |
cores |
The number of compute cores to use. Defaults to 1. |
verbose |
If |
A data frame with one row per evaluated gene pair,
containing the gene names (Gene1, Gene2),
the observed count (Actual_Count),
the number of cluster combinations, the sample count,
the expected count (Expected_Count), and
the p_value and false-discovery-rate q_value
(plus an Effect_Size column when effectsize = TRUE).
An empty data frame with these columns is returned when no gene pair is valid.
mts_mixModelCluster,
mts_mixModelCluster_XPR,
mts_patternDetection
data(mixModelClusters_depMapXPR)
Unidirectional_depletion_SL_XPRvsXPR = mts_omics(
mixModelClusters1 = mixModelClusters_depMapXPR,
qVal=1,
cores=1
)
data(depMapXPR_subset)
data(depMapCRISPRscores_subset)
Bidirectional_enrichment_SL_XPRvsCRISPR = mts_omics(
dataMatrix = depMapCRISPRscores_subset[3,],
dataMatrix2 = depMapXPR_subset[2,],
directionality = "enrichment",
qVal=1,
cores=1
)
GDR_patternAnalysis_unidirectional_depletion_XPRvsXPR = mts_omics(
dataMatrix = depMapXPR_subset[1:2,],
SyntheticLethalityPrediction = FALSE,
effectsize=FALSE,
qVal=1,
cores=1
)
# Mutation (categorical) with gene expression.
# depMapMUT_small contains string variant calls ("WT" or e.g. "p.R167W");
# convert to the 1/2 impact convention expected by mts_formatMatrix().
data(depMapMUT_small)
data(depMapXPR_small)
mutImpact <- as.data.frame(
ifelse(as.matrix(depMapMUT_small) == "WT", 2L, 1L),
stringsAsFactors = FALSE, check.names = FALSE)
rownames(mutImpact) <- rownames(depMapMUT_small)
SL_mut_vs_xpr = mts_omics(
dataMatrix = mutImpact,
dataMatrix2 = depMapXPR_small[3,],
categorical1 = TRUE,
directionality = "depletion",
qVal = 1,
effectsize = FALSE,
cores = 1
)
# Or with pre-computed mutation 'clusters'
mutClusters <- mts_formatMatrix(matrix = mutImpact, cores = 1)
SL_mut_vs_xpr_pre = mts_omics(
mixModelClusters1 = mutClusters,
dataMatrix2 = depMapXPR_small[3,],
directionality = "depletion",
qVal = 1,
effectsize = FALSE,
cores = 1
)
# Using only mutation (or other categorical) data
data(depMapMUT_small)
mutImpactSmall <- as.data.frame( # make a binary matrix
ifelse(as.matrix(depMapMUT_small) == "WT", 2L, 1L),
stringsAsFactors = FALSE, check.names = FALSE)
rownames(mutImpactSmall) <- rownames(depMapMUT_small)
mutClasses <- mts_formatMatrix(matrix = mutImpactSmall[,1:5], cores = 1)
SL_mut_only = mts_omics(
mixModelClusters1 = mutClasses,
directionality = "depletion",
qVal = 1,
effectsize = FALSE,
cores = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.