Overview of the workshop

Description

The iSEE package is a flexible, powerful and extendible application to explore any dataset stored in SummarizedExperiment objects, including single cell and spatially resolved data.

iSEE enables a multitude of panels to gain in-depth insight in your data; it does so combining interactivity and reproducibility, and providing an ideal companion to CELLxGENE for deeper dives into data.

This package demo provides an overview of the functionality of the iSEE Bioconductor package, and is intended as an appetizer to more.

Pre-requisites

  • Familiarity with single-cell sequencing data (ideally scRNA-seq)
  • Familiarity with the SummarizedExperiment/SingleCellExperiment class, or alternatively the Seurat or AnnData frameworks - basically, any of the widely used ecosystem for working with/storing/processing single cell data
  • Familiarity with single-cell data visualizations and representations

Participation

Participants will be able to follow along in the live coding parts of the demo.

Workshop goals and objectives

Learning goals

  • Outline the features of iSEE, built upon the RStudio Shiny framework
  • Utilize interactive GUI components and layouts to efficiently extract information from biological data sets
  • Describe how to construct interactive apps and custom panels
  • Demonstrate how these package can smoothly be integrated into and enhance existing workflows for the datasets at hand

Learning objectives

  • Set up a local environment for running iSEE apps
  • Interact with components of the iSEE user interface to visually inspect and discuss various data sets
  • Identify and locate configurable aspects of iSEE apps
  • Practice interactive visualization over a single-cell RNA-sequencing workflow
  • Imagine use cases and future developments for interactive visualization as part of computational workflows
  • Design and create iSEE instances for collections of datasets

Installing and loading the required packages

To run the content presented in this demo, run this following chunk in your R environment.

library("BiocManager")
BiocManager::install("iSEE/iSEEdemo")

We start by loading the packages that will be used during the demo.

All of these would be loaded if you run

You can also clone this repository (https://iSEE.github.io/iSEEdemo) locally by git clone - it makes it easy to follow along this vignette!

Let’s go get us some data!

We will start very much in medias res, assuming that this might be the ideal point where you have processed your data - early or late phase - and now want to have the BEST look at that.

Navigate to https://zenodo.org/records/10084595 and download the data (it contains the three objects you might be “coming from”).
Unpack the archive you downloaded in the datasets subfolder of the vignette folder.

We included a SingleCellExperiment object on a processed version for the PBMC3k dataset, many of you can somehow be familiar with this.

Let’s load the dataset in our environment:

sce_pbmc3k <- readRDS(
  file = system.file("datasets", "sce_pbmc3k.RDS", package = "iSEEdemo")
)

sce_pbmc3k
#> class: SingleCellExperiment 
#> dim: 32738 2643 
#> metadata(0):
#> assays(2): counts logcounts
#> rownames(32738): MIR1302-10 FAM138A ... AC002321.2 AC002321.1
#> rowData names(21): ENSEMBL_ID Symbol_TENx ... FDR_cluster13
#>   FDR_cluster14
#> colnames(2643): Cell1 Cell2 ... Cell2699 Cell2700
#> colData names(20): Sample Barcode ... sizeFactor Cluster
#> reducedDimNames(3): PCA TSNE UMAP
#> mainExpName: NULL
#> altExpNames(0):

As easy as saying iSEE(sce)!

Who of you is investing a fair amount/lot of time in doing proper data exploration?

Who of you is familiar with the beautiful CellxGene tool?

Who of you dreamed to do even more on your data?

I have a quiz for you - have a look at this, for example:

http://shiny.imbei.uni-mainz.de:3838/iSEE_Tonsils_CD4Tcells/

Question 1

How many lines of code are required to realize this?

  1. 4-5
  2. 250-300
  3. 7500-10000
Question 2

How many of these lines had to be typed by a human?

  1. 4-5
  2. 250-300
  3. 7500-10000

So, yes, I will show you that is as easy as that:

library("iSEE")
iSEE(sce_pbmc3k)

Let’s run this together and see what we have got in store.

Quick tour of the panels

What typical visualizations people would you use to represent and explore your datasets?

Each panel has some essential content:

  • Data parameters
  • Visual parameters
  • Selection parameters

Let’s have a closer look at that on the Reduced Dimension Plot 1 panel.

If you have no idea of what a panel can “normally” do, look for the question mark icon, that will start a tiny tour on its functionality.

Additional UI functionality

iSEE also has some additional controls, grouped into the header bar, let’s have a look at them:

  • Organization buttons
  • Export buttons
  • Documentation buttons
  • Extra info buttons

With this, we can…

  • reorganize the panel layout - add, remove, re-order
  • extract the code to exactly reproduce the outputs, 1:1
  • store (and re-utilize) the panel settings
  • generate at once an archive with all/selected parts of the panel outputs
  • start a tour on the content displayed - yes, you can very much tell a story with iSEE!

In depth exploration of data - iSEE’s main functionality

You can control pretty much everything in a plot

Coloring by, faceting, zooming, hovering!
Make a wish!

Brush selection, lasso selection, select the receiving panel, iterate!
Read out information, see the panel transmission graph.

You can use tables to navigate panels

Search and select, transmit, receive, iterate!

Configuring your iSEE instance

Panels: add, move, remove; exporting the initial configuration, reloading it

Reproducibility for the win!

A magic wand: two clicks away from all the R code you need; export all outputs, save individual images

Sharing is caring, and so is telling a story

Start the tour, highlighting elements; make your data really explorable!

Custom panels & the iSEE universe

A couple of additional things you can do with custom panels (and this is just an appetizer!):

Got data?

Got single cell data?

You might have got the gist:

sce <- sce_pbmc3k # Load your data in some manner
library("iSEE")
iSEE(sce)

So, yes, we mighe be down to THREE lines of code.

Got some special feature in your data?

Maybe iSEEu can be the place to find already that piece of functionality!

Got bulk?

Have a look at the functionality provided by

These can be ideal companions for exploring DE results.

iSEEde and iSEEpathways are two new Bioconductor packages that provide iSEE panels specifically aimed towards exploration of differential expression and pathway analysis results. More precisely, iSEEde provides the VolcanoPlot, MAPlot, LogFCLogFCPlot and DETable panels.

Got many datasets?

Have a look at the functionality provided by

The iSEEhub package provides a custom landing page for an iSEE application interfacing with the Bioconductor ExperimentHub. The landing page allows users to browse the ExperimentHub, select a data set, download and cache it, and import it directly into an iSEE app.

iSEEindex provides an interface to any collection of data sets within a single iSEE web-application.
The main functionality of this package is to define a custom landing page allowing app maintainers to list a custom collection of data sets that users can select from and directly load objects into an iSEE web application.

One iSEE instance to rule exlore them all…

A more elaborate example is available at https://rehwinkellab.shinyapps.io/ifnresource/. The source can be found at https://github.com/kevinrue/IFNresource.

Potential use cases can include:

  • An app to present and explore the different datasets in your next publication
  • An app to explore collection of datasets collaboratively, in consortium-like initiatives
  • An app to mirror and enhance the content of e.g. the CellxGene data portal
  • Got any ideas on how to use iSEE for such deployments?

Interoperability

“Wait, I got Seurat/Anndata objects”.

The single cell communities got you covered:

From Seurat…

library("Seurat")

seurat_object <- readRDS("datasets/seurat_pbmc3k.RDS")
sce_from_seurat <- Seurat::as.SingleCellExperiment(
  seurat_object
)
sce_from_seurat


iSEE(sce_from_seurat)

From AnnData…

… which is basically able to serve any dataset available throught the CELLxGENE Data Portal!

library("zellkonverter")

sce_from_anndata <- zellkonverter::readH5AD(file = "datasets/anndata_pbmc3k.h5ad")
sce_from_anndata

iSEE(sce_from_anndata)

An example could be…

https://cellxgene.cziscience.com/e/c7856243-c59a-4b70-8ce7-25b94c2d9da1.cxg/

I want moaaaaar on iSEE!

For more extensive descriptions of the different parts of the interface, we refer to the overview vignette in a previous, extended workshop on iSEE.

Additional material can also be found at these other repositories:

Session info

sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-apple-darwin20 (64-bit)
#> Running under: macOS Monterey 12.7.1
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib 
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> time zone: Europe/Berlin
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats    graphics utils    stats4   methods  base    
#> 
#> other attached packages:
#>  [1] iSEEdemo_1.0.0              iSEEindex_1.0.0            
#>  [3] iSEEhub_1.4.0               ExperimentHub_2.10.0       
#>  [5] AnnotationHub_3.10.0        BiocFileCache_2.10.1       
#>  [7] dbplyr_2.4.0                iSEEpathways_1.0.0         
#>  [9] iSEEde_1.0.0                iSEEu_1.14.0               
#> [11] iSEEhex_1.4.0               TENxPBMCData_1.20.0        
#> [13] HDF5Array_1.30.0            rhdf5_2.46.0               
#> [15] DelayedArray_0.28.0         SparseArray_1.2.2          
#> [17] S4Arrays_1.2.0              abind_1.4-5                
#> [19] Matrix_1.6-2                iSEE_2.14.0                
#> [21] SingleCellExperiment_1.24.0 SummarizedExperiment_1.32.0
#> [23] Biobase_2.62.0              GenomicRanges_1.54.1       
#> [25] GenomeInfoDb_1.38.1         IRanges_2.36.0             
#> [27] S4Vectors_0.40.1            BiocGenerics_0.48.1        
#> [29] MatrixGenerics_1.14.0       matrixStats_1.1.0          
#> [31] BiocStyle_2.30.0           
#> 
#> loaded via a namespace (and not attached):
#>   [1] RColorBrewer_1.1-3            rstudioapi_0.15.0            
#>   [3] jsonlite_1.8.7                shape_1.4.6                  
#>   [5] magrittr_2.0.3                rmarkdown_2.25               
#>   [7] GlobalOptions_0.1.2           fs_1.6.3                     
#>   [9] zlibbioc_1.48.0               ragg_1.2.6                   
#>  [11] vctrs_0.6.4                   DelayedMatrixStats_1.24.0    
#>  [13] memoise_2.0.1                 RCurl_1.98-1.13              
#>  [15] htmltools_0.5.7               curl_5.1.0                   
#>  [17] Rhdf5lib_1.24.0               sass_0.4.7                   
#>  [19] bslib_0.5.1                   htmlwidgets_1.6.2            
#>  [21] desc_1.4.2                    cachem_1.0.8                 
#>  [23] igraph_1.5.1                  mime_0.12                    
#>  [25] lifecycle_1.0.4               iterators_1.0.14             
#>  [27] pkgconfig_2.0.3               colourpicker_1.3.0           
#>  [29] R6_2.5.1                      fastmap_1.1.1                
#>  [31] GenomeInfoDbData_1.2.11       shiny_1.7.5.1                
#>  [33] clue_0.3-65                   digest_0.6.33                
#>  [35] colorspace_2.1-0              paws.storage_0.4.0           
#>  [37] AnnotationDbi_1.64.1          DESeq2_1.42.0                
#>  [39] rprojroot_2.0.4               textshaping_0.3.7            
#>  [41] RSQLite_2.3.3                 beachmat_2.18.0              
#>  [43] filelock_1.0.2                urltools_1.7.3               
#>  [45] fansi_1.0.5                   httr_1.4.7                   
#>  [47] mgcv_1.9-0                    compiler_4.3.0               
#>  [49] bit64_4.0.5                   doParallel_1.0.17            
#>  [51] BiocParallel_1.36.0           DBI_1.1.3                    
#>  [53] shinyAce_0.4.2                highr_0.10                   
#>  [55] hexbin_1.28.3                 rappdirs_0.3.3               
#>  [57] rjson_0.2.21                  tools_4.3.0                  
#>  [59] vipor_0.4.5                   interactiveDisplayBase_1.40.0
#>  [61] httpuv_1.6.12                 glue_1.6.2                   
#>  [63] nlme_3.1-163                  rhdf5filters_1.14.1          
#>  [65] promises_1.2.1                grid_4.3.0                   
#>  [67] cluster_2.1.4                 generics_0.1.3               
#>  [69] gtable_0.3.4                  utf8_1.2.4                   
#>  [71] XVector_0.42.0                ggrepel_0.9.4                
#>  [73] BiocVersion_3.18.0            foreach_1.5.2                
#>  [75] pillar_1.9.0                  stringr_1.5.0                
#>  [77] limma_3.58.1                  later_1.3.1                  
#>  [79] rintrojs_0.3.3                circlize_0.4.15              
#>  [81] splines_4.3.0                 dplyr_1.1.3                  
#>  [83] lattice_0.22-5                bit_4.0.5                    
#>  [85] paws.common_0.6.4             tidyselect_1.2.0             
#>  [87] locfit_1.5-9.8                ComplexHeatmap_2.18.0        
#>  [89] scuttle_1.12.0                Biostrings_2.70.1            
#>  [91] miniUI_0.1.1.1                knitr_1.45                   
#>  [93] edgeR_4.0.1                   xfun_0.41                    
#>  [95] shinydashboard_0.7.2          datasets_4.3.0               
#>  [97] statmod_1.5.0                 DT_0.30                      
#>  [99] stringi_1.8.1                 yaml_2.3.7                   
#> [101] shinyWidgets_0.8.0            evaluate_0.23                
#> [103] codetools_0.2-19              tibble_3.2.1                 
#> [105] BiocManager_1.30.22           cli_3.6.1                    
#> [107] xtable_1.8-4                  systemfonts_1.0.5            
#> [109] munsell_0.5.0                 jquerylib_0.1.4              
#> [111] Rcpp_1.0.11                   triebeard_0.4.1              
#> [113] png_0.1-8                     parallel_4.3.0               
#> [115] ellipsis_0.3.2                pkgdown_2.0.7                
#> [117] ggplot2_3.4.4                 blob_1.2.4                   
#> [119] sparseMatrixStats_1.14.0      bitops_1.0-7                 
#> [121] viridisLite_0.4.2             scales_1.2.1                 
#> [123] grDevices_4.3.0               purrr_1.0.2                  
#> [125] crayon_1.5.2                  GetoptLong_1.0.5             
#> [127] rlang_1.1.2                   KEGGREST_1.42.0              
#> [129] shinyjs_2.1.0