library(ACSNMineR) knitr::opts_chunk$set(fig.dpi = 96)
ACSNMineR is an R package, freely available.
ACSN stands for Atlas of Cancer Signaling Networks, and shows gene interaction in pathways relevant to cancer.
This package is designed for an easy analysis of gene maps (either user imported from gmt files or ACSN maps). Its aim is to allow a statistical analysis of statistically enriched or depleted pathways from a user imported gene list, as well as a graphic representation of results.
This readme contains:
Gmt files can be imported thanks to the format_from_gmt function. Let's use saved data from the package:
# Retrieve path of the example gmt file<-system.file("extdata", "cellcycle_short.gmt", package = "ACSNMineR") # Then import it gmt<-ACSNMineR::format_from_gmt(file)
knitr::kable(gmt[,1:10])
ACSN maps are built-in and can easily be accessed through ACSNEnrcihment::ACSN_maps:
# Name of available maps: names(ACSNMineR::ACSN_maps) ```` `````r knitr::kable(names(ACSNMineR::ACSN_maps)) ```` ````r #And accessing them: ACSNMineR::ACSN_maps$CellCycle ```` ````r knitr::kable(head(ACSNMineR::ACSN_maps$CellCycle[,1:10]), row.names = FALSE)
The gene set that was used for tests is the following:
ACSNMineR::genes_test
knitr::kable(ACSNMineR::genes_test)
Gene set enrichment for a single set can be performed by calling:
Example<-ACSNMineR::enrichment(ACSNMineR::genes_test, min_module_size = 10, threshold = 0.05, maps = list(cellcycle = ACSNMineR::ACSN_maps$CellCycle))
```r knitr::kable(Example,row.names = FALSE)
Where: * genes_test is a character vector to test * min_module_size is the minimal size of a module to be taken into account * threshold is the maximal p-value that will be displayed in the results (all modules with p-values higher than threshold will be removed) * maps is a list of maps -here we take the cell cycle map from ACSN- imported through the format_from_gmt() function of the package Gene set enrichment for multiple sets/cohorts can be performed by calling: ````r Example<-ACSNMineR::multisample_enrichment(Genes_by_sample = list(set1 = ACSNMineR::genes_test[-1], set2 = ACSNMineR::genes_test[-2]), maps = ACSNMineR::ACSN_maps$CellCycle, min_module_size = 10, cohort_threshold = FALSE)
```r print(Example[[1]])
```r knitr::kable(Example[[1]],row.names = FALSE)
```r print(Example[[2]])
```r knitr::kable(Example[[2]],row.names = FALSE)
Where:
Genes_by_sample is a list of character vectors to test
min_module_size is the minimal size of a module to be taken into account
maps is a list of maps -here we take the cell cycle map from ACSN - imported through the format_from_gmt() function of the package
Results from the enrichment analysis function can be transformed to images thanks to the represent enrichment function. Two different plot are available: heatmap and barplot.
Heatmaps for single sample or multiple sample representing p-values can be easily generated thanks to the represent_enrichment function.
ACSNMineR::represent_enrichment(enrichment = list( SampleA = ACSNMineR::enrichment_test[1:10,], SampleB = ACSNMineR::enrichment_test[3:10,]), plot = "heatmap", scale = "reverselog", low = "steelblue" , high ="white", na.value = "grey")+theme(axis.text = element_text(size = 6,angle = 45), legend.text = element_text(size = 6), legend.title = element_text(size = 8))
Where:
enrichment is the result from the enrichment or multisample_enrichment function
scale can be set to either identity or log and will affect the gradient of colors
low: the color for the low (significant) p-values
high: color for the high (less significant) p-values
na.value is the color in which tiles which have "NA" should appear
A barplot can be achieved by using the following:
ACSNMineR::represent_enrichment(enrichment = list( SampleA = ACSNMineR::enrichment_test[1:10,], SampleB = ACSNMineR::enrichment_test[3:10,]), plot = "bar", scale = "reverselog")
Where:
enrichment is the result from the enrichment or multisample_enrichment function
scale can be set to either identity or log and will affect the gradient of colors
nrow is the number of rows that should be used to plot all barplots (default is 1)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.