Title: | Enrichment Analysis and Intersecting Sankey Diagram |
---|---|
Description: | A flexible tool for enrichment analysis based on user-defined sets. It allows users to perform over-representation analysis of the custom sets among any specified ranked feature list, hence making enrichment analysis applicable to various types of data from different scientific fields. 'EnrichIntersect' also enables an interactive means to visualize identified associations based on, for example, the mix-lasso model (Zhao et al., 2022 <doi:10.1016/j.isci.2022.104767>) or similar methods. |
Authors: | Zhi Zhao [aut, cre], Manuela Zucknick [aut], Tero Aittokallio [ctb] |
Maintainer: | Zhi Zhao <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.7 |
Built: | 2024-11-20 04:51:50 UTC |
Source: | https://github.com/ocbe-uio/enrichintersect |
Data set 'cancers_drug_groups' is a list including a score dataframe with 147 drugs as rows and 19 cancer types as columns, and a dataframe with 9 self-defined drug groups (1st column) of the 147 drugs (2nd column). More details of the data can be found in the results of paper 'Tissue-specific identification of multi-omics features for pan-cancer drug response prediction' by Zhao Z., Wang S. Zucknick M. and Aittokallio T. (2022).
cancers_drug_groups
cancers_drug_groups
An object of class list
of length 2.
No return value.
Zhao Z, Wang S, Zucknick M and Aittokallio T (2022). Tissue-specific identification of multi-omics features for pan-cancer drug response prediction. iScience, 25(8): 104767.
# Load data data(cancers_drug_groups, package = "EnrichIntersect")
# Load data data(cancers_drug_groups, package = "EnrichIntersect")
Data set 'cancers_genes_drugs' is an array with association scores between 56 genes (1st dimension), three cancer types (2nd dimension) and two drugs (3rd dimension). More details of the data can be found in the results of paper 'Tissue-specific identification of multi-omics features for pan-cancer drug response prediction' by Zhao Z., Wang S. Zucknick M. and Aittokallio T. (2022).
cancers_genes_drugs
cancers_genes_drugs
An object of class array
of dimension 56 x 3 x 2.
No return value.
Zhao Z, Wang S, Zucknick M and Aittokallio T (2022). Tissue-specific identification of multi-omics features for pan-cancer drug response prediction. iScience, 25(8): 104767.
# Load data data(cancers_genes_drugs, package = "EnrichIntersect")
# Load data data(cancers_genes_drugs, package = "EnrichIntersect")
Plot enrichment map through a vector (matrix) of scores and a self-defined set that summarizes a few groups of the names (rownames) of the vector (matrix)
enrichment( x, custom.set, alpha = 0, normalize = TRUE, permute.n = 100, padj.method = "none", pvalue.cutoff = 0.05, angle = 45, ... )
enrichment( x, custom.set, alpha = 0, normalize = TRUE, permute.n = 100, padj.method = "none", pvalue.cutoff = 0.05, angle = 45, ... )
x |
a vector (matrix) of scores to be enriched |
custom.set |
a self-defined set that summarizes a few groups of the
names (rownames) of |
alpha |
exponent weight of the score of ordered features. Default is
|
normalize |
logic value to determine if normalizing enrichment scores,
accounting for custom set size. Default is |
permute.n |
number of custom-set permutations for significance testing. Default is 100 |
padj.method |
correction method, one of |
pvalue.cutoff |
a cutoff for both unadjusted and adjusted p-value to mark significantly enriched classes. Default is 0.05 |
angle |
angle of rotating x-axis labels. Default is 45 |
... |
other arguments |
Return a list including a matrix of (normalized) enrichment score, a matrix of corresponding p-value and ggplot object:
S - a matrix of calculated enrichment scores.
pvalue - a matrix of p-values using permuation test for the calculated enrichment scores.
g - a ggplot object for visualising the results of an enrichment analysis.
Reimand J, Isserlin R, Voisin V, et al (2019). Pathway enrichment analysis and visualization of omics data using g:profiler, gsea, cytoscape and enrichmentmap. Nature protocols, 14:482–517.
# Data set 'cancers_drug_groups' is a list including a score dataframe with 147 drugs as rows # and 19 cancer types as columns, and a dataframe with 9 self-defined drug groups (1st column) # of the 147 drugs (2nd column). data(cancers_drug_groups, package = "EnrichIntersect") x <- cancers_drug_groups$score custom.set <- cancers_drug_groups$custom.set set.seed(123) enrich <- enrichment(x, custom.set, permute.n = 5)
# Data set 'cancers_drug_groups' is a list including a score dataframe with 147 drugs as rows # and 19 cancer types as columns, and a dataframe with 9 self-defined drug groups (1st column) # of the 147 drugs (2nd column). data(cancers_drug_groups, package = "EnrichIntersect") x <- cancers_drug_groups$score custom.set <- cancers_drug_groups$custom.set set.seed(123) enrich <- enrichment(x, custom.set, permute.n = 5)
Plot Sankey diagram for intersecting set through an array
intersectSankey( x, out.fig = NULL, color = NULL, step.names = c("Levels", "Variables", "Tasks"), fontSize = c(20, 13, 20), nodePadding = 11, nodeWidth = 5, margin = list(right = 180), ... )
intersectSankey( x, out.fig = NULL, color = NULL, step.names = c("Levels", "Variables", "Tasks"), fontSize = c(20, 13, 20), nodePadding = 11, nodeWidth = 5, margin = list(right = 180), ... )
x |
an array for constructing intersecting set |
out.fig |
print the figure into |
color |
a vector of colors corresponding to individual tasks |
step.names |
names of the three dimensions of the array |
fontSize |
a value or vector of three values. If it is one value, it
is the font size for all labels. But a vector of three values specifies the
font size of the labels in the left, middle and right, respectively. Default
is |
nodePadding |
numeric essentially influences the width height |
nodeWidth |
numeric width of each node |
margin |
an integer or a named list/vector of integers for the plot margins |
... |
graphics parameters to be passed to |
An object of a D3 JavaScript intersecting Sankey diagram for visualising associations based on the input array.
# Data set 'cancers_genes_drugs' is an array with association scores between 56 genes (1st # dimension), three cancer types (2nd dimension) and two drugs (3rd dimension) data(cancers_genes_drugs, package = "EnrichIntersect") intersectSankey(cancers_genes_drugs, step.names = c("Cancers", "Genes", "Drugs"))
# Data set 'cancers_genes_drugs' is an array with association scores between 56 genes (1st # dimension), three cancer types (2nd dimension) and two drugs (3rd dimension) data(cancers_genes_drugs, package = "EnrichIntersect") intersectSankey(cancers_genes_drugs, step.names = c("Cancers", "Genes", "Drugs"))