1 Basics

1.1 Install iSEEpathways

R is an open-source statistical environment which can be easily modified to enhance its functionality via packages. iSEEpathways is a R package available via the Bioconductor repository for packages. R can be installed on any operating system from CRAN after which you can install iSEEpathways by using the following commands in your R session:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
      install.packages("BiocManager")
  }

BiocManager::install("iSEEpathways")

## Check that you have a valid Bioconductor installation
BiocManager::valid()

1.2 Required knowledge

iSEEpathways is based on many other packages and in particular in those that have implemented the infrastructure needed for dealing with omics data and interactive visualisation. That is, packages like SummarizedExperiment, SingleCellExperiment, iSEE and shiny.

If you are asking yourself the question “Where do I start using Bioconductor?” you might be interested in this blog post.

1.3 Asking for help

As package developers, we try to explain clearly how to use our packages and in which order to use the functions. But R and Bioconductor have a steep learning curve so it is critical to learn where to ask for help. The blog post quoted above mentions some but we would like to highlight the Bioconductor support site as the main resource for getting help: remember to use the iSEEpathways tag and check the older posts. Other alternatives are available such as creating GitHub issues and tweeting. However, please note that if you want to receive help you should adhere to the posting guidelines. It is particularly critical that you provide a small reproducible example and your session information so package developers can track down the source of the error.

1.4 Citing iSEEpathways

We hope that iSEEpathways will be useful for your research. Please use the following information to cite the package and the overall approach. Thank you!

## Citation info
citation("iSEEpathways")
#> To cite package 'iSEEpathways' in publications use:
#> 
#>   Rue-Albrecht K, Soneson C (2023). _iSEEpathways: iSEE extension for panels related to pathway analysis_.
#>   doi:10.18129/B9.bioc.iSEEpathways <https://doi.org/10.18129/B9.bioc.iSEEpathways>, R package version
#>   1.0.0, <https://bioconductor.org/packages/iSEEpathways>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {iSEEpathways: iSEE extension for panels related to pathway analysis},
#>     author = {Kevin Rue-Albrecht and Charlotte Soneson},
#>     year = {2023},
#>     note = {R package version 1.0.0},
#>     url = {https://bioconductor.org/packages/iSEEpathways},
#>     doi = {10.18129/B9.bioc.iSEEpathways},
#>   }

2 Quick start to using to iSEEpathways

library("iSEEpathways")
library("fgsea")
library("iSEE")

# Example data ----

set.seed(1)
simulated_data <- simulateExampleData()

pathways_list <- simulated_data[["pathwaysList"]]
features_stat <- simulated_data[["featuresStat"]]
se <- simulated_data[["summarizedexperiment"]]

# fgsea ----

set.seed(42)
fgseaRes <- fgsea(pathways = pathways_list, 
                  stats    = features_stat,
                  minSize  = 15,
                  maxSize  = 500)
fgseaRes <- fgseaRes[order(pval), ]
head(fgseaRes)
#>         pathway         pval      padj   log2err         ES       NES size
#> 1: pathway_3193 0.0001211540 0.3204337 0.5384341 -0.2896765 -1.539403  352
#> 2: pathway_2245 0.0001281735 0.3204337 0.5188481  0.3838463  1.789193  119
#> 3: pathway_1942 0.0002489896 0.3688884 0.4984931  0.6384197  2.035004   22
#> 4: pathway_2564 0.0004065213 0.3688884 0.4984931 -0.2960470 -1.536240  266
#> 5: pathway_3993 0.0005506760 0.3688884 0.4772708 -0.4879636 -1.879389   46
#> 6: pathway_4437 0.0005542489 0.3688884 0.4772708 -0.2680266 -1.444987  428
#>                                                                             leadingEdge
#> 1: feature_13088,feature_8518,feature_1735,feature_4778,feature_12174,feature_13420,...
#> 2:   feature_6410,feature_4592,feature_3340,feature_11088,feature_7859,feature_5638,...
#> 3:  feature_2107,feature_14713,feature_2314,feature_12352,feature_1389,feature_3925,...
#> 4:  feature_1148,feature_1370,feature_14652,feature_14211,feature_1113,feature_8783,...
#> 5:   feature_3658,feature_5492,feature_13167,feature_1271,feature_4815,feature_2900,...
#> 6:   feature_3658,feature_1370,feature_10001,feature_169,feature_1048,feature_11007,...

# iSEE ---

se <- embedPathwaysResults(fgseaRes, se, name = "fgsea", class = "fgsea", pathwayType = "simulated",
                           pathwaysList = pathways_list, featuresStats = features_stat)

app <- iSEE(se, initial = list(
  PathwaysTable(ResultName="fgsea", Selected = "pathway_1350 ", PanelWidth = 6L),
  FgseaEnrichmentPlot(ResultName="fgsea", PathwayId = "pathway_1350", PanelWidth = 6L)
))

if (interactive()) {
  shiny::runApp(app)
}