View source: R/mts_patternDetection.R
| mts_patternDetection | R Documentation |
Enumerates different types of gene dependency relationships (GDRs). Can optionally detect SL where there is a depletion of samples in the bottom left cell of the contingency table (if low-scoring values indicate a reduction or loss of gene function). Performs statistical analysis of depletion with the binomial test. The expected proportion of samples in each contingency table cell is calculated with reference to the size of the clusters.
mts_patternDetection(
genepairs = NULL,
mixModelClusters1,
mixModelClusters2 = NULL,
SyntheticLethalityPrediction = TRUE,
p_adjustMethod = c("BY","BH"),
qVal,
effectsize = TRUE,
effectsize_threshold = NULL,
include_reverse_pairs = FALSE,
directionality = c("depletion", "enrichment"),
verbose = FALSE,
cores)
mixModelClusters1 |
List object containing multisep cluster assignments output by the |
mixModelClusters2 |
Optional. A list object produced by the |
genepairs |
Optional. If the argument is not called or left as |
SyntheticLethalityPrediction |
If set to |
p_adjustMethod |
The method for false discovery rate adjustment of p-values for multiple comparisons. The options are: |
qVal |
The q value filter threshold value, 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 |
include_reverse_pairs |
If |
directionality |
Valid options are |
verbose |
If |
cores |
The number of compute cores to use, defaults to 1. |
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_crisprPartition,
mts_genepairsChunkGeneration,
mts_formatMatrix,
mts_plotClusterDistribution
data("mixModelClusters_depMapXPR")
mixturemodelClusters <- mts_mixModelCluster_XPR(dataMatrix = depMapXPR_subset[c(1:12, 20), ])
# partition into two 'clusters' at -0.5
CRISPR_clusters = mts_crisprPartition(dataMatrix = depMapCRISPRscores_subset[1:12, ])
# unidirectional (i.e. symmetrical) evaluation
# of synthetic lethality depletion relationships with expression data
predicted_XPR_SL = mts_patternDetection(
mixModelClusters1=mixModelClusters_depMapXPR,
qVal=1
)
# unidirectional synthetic lethal depletion prediction with expression data and
# specified gene pairs, using BH FDR correction, filtering using the q-value
# and the effect size
predicted_XPR_SL2 = mts_patternDetection(
genepairs = data.frame(Gene1="PSMB8",Gene2="TTC7B"),
mixModelClusters1 = mixturemodelClusters,
SyntheticLethalityPrediction = TRUE,
p_adjustMethod="BH",
qVal = 0.05, effectsize=TRUE)
# bidirectional synthetic lethal depletion prediction with expression and CRISPR data
# and including reverse pairs
Predicted_SL3 = mts_patternDetection(
mixModelClusters1=mixturemodelClusters[1:10],
mixModelClusters2=CRISPR_clusters[1:10],
include_reverse_pairs = FALSE, effectsize=FALSE, qVal =0.05,
directionality = "enrichment"
)
# tissue specific analysis
# 1. subset cell lines of interest using mapping file
Lung_Cancer_cellLines <- depMapTissue_subset$cell_line[
depMapTissue_subset$tissue == "Lung Cancer"]
# 2. subset XPR mixture model result list
LungCancer_XPRmixturemodelClusters <- lapply(mixturemodelClusters, function(GMM) {
GMM[GMM$Sample %in% Lung_Cancer_cellLines, ]
})
# 3. subset CRISPR mixture model result list
LungCancer_CRISPR_clusters <- lapply(CRISPR_clusters, function(GMM) {
GMM[GMM$Sample %in% Lung_Cancer_cellLines, ]
})
TissueSpecific_SL = mts_patternDetection(mixModelClusters1 = LungCancer_CRISPR_clusters,
mixModelClusters2 = LungCancer_XPRmixturemodelClusters,
include_reverse_pairs = TRUE,
SyntheticLethalityPrediction = TRUE,
directionality = "enrichment",
qVal = 1)
# bidirectional analysis of all depletion gene dependency relationships
# for expression and CRISPR data with BY FDR correction
PredictedGDR = mts_patternDetection(
mixModelClusters1=mixturemodelClusters[1:10],
mixModelClusters2=CRISPR_clusters[1:10],
SyntheticLethalityPrediction = FALSE,
directionality = "enrichment",
p_adjustMethod="BY", effectsize = FALSE, qVal = 0.01
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.