alluvial_enriched: alluvial_enriched

Description Usage Arguments Value Examples

View source: R/coregulstions.R

Description

'alluvial_enriched’ draws an alluvial plot and finds comigrated proteins. The comigration is a group of proteins that show the same expression pattern, classified and evaluated by XINA clustering, in at least two conditions. XINA can reduce the dataset complexity by filtering based on the number of comigrated proteins (size, ’comigration_size’ parameter) and perform an enrichment test (P-value of Fisher’s exact test, ’pval_threshold’) to determine significance of enriched comigrations. The Fisher’s exact test can only be done for two conditions at a time. The following 2x2 table was used to calculate the P-value from the Fisher’s exact test. To evaluate significance of co-migrated proteins from cluster #1 in control to cluster #2 in test group,

- cluster #1 in control other clusters in control
cluster #2 in test 65 (TP) 175 (FP)
other clusters in test 35 (FN) 979 (TN)

Usage

1
2
3
alluvial_enriched(clustering_result, selected_conditions,
  comigration_size = 0, pval_threshold = 1, pval_method = "fdr",
  cex = 0.7, alpha = 0.3)

Arguments

clustering_result

A list containing XINA clustering results. See xina_clustering

selected_conditions

A vector of condition names used in XINA clustering results. The number of selected conditions should be at least two.

comigration_size

The number of proteins comigrated together in the selected conditions of XINA clustering results. Default is 0

pval_threshold

This option is avaiable only when you selected two conditions for comigration search.

pval_method

Method for p-value adjustment. See p.adjust

cex

Scaling of fonts of category labels. Default if 0.7. See alluvial

alpha

Transparency of the stripes. Default if 0.3. See alluvial

Value

A data frame containing comigrations and an alluvial plot showing comigrations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# load XINA example data
data(xina_example)

# Get the experimental conditions in the example data
classes <- as.vector(example_clusters$condition)

# Get comigrations without any thresholds
all_comigrations <- alluvial_enriched(example_clusters, classes)

# Get comigrations that have >= 5 size (the number of comigrated proteins)
all_cor_enriched <- alluvial_enriched(example_clusters, classes, comigration_size=5)

# Get all the comigrations between Control and Stimulus1
comigrations_Control_Stimulus1 <- alluvial_enriched(example_clusters,
c(classes[1],classes[2]))

# Get comigrations between Control and Stimulus1, that have >=5 size
comigrations_Control_Stimulus1_over5 <- alluvial_enriched(example_clusters,
c(classes[1],classes[2]), comigration_size=5)

# Get comigrations between Control and Stimulus1,
# that have >= 5 size and enrichment FDR <= 0.01
comigrations_Control_Stimulus1_pval0.01_size5 <- alluvial_enriched(example_clusters,
c(classes[1],classes[2]), comigration_size=5, pval_threshold=0.01)

# Get  comigrations between Control and Stimulus1,
# that have >= 5 size and enrichment Benjamini & Yekutieli <= 0.01
comigrations_Control_Stimulus1_BY0.01_size5 <- alluvial_enriched(example_clusters,
c(classes[1],classes[2]), comigration_size=5, pval_threshold=0.01, pval_method="BY")

XINA documentation built on Nov. 8, 2020, 5:32 p.m.