vignettes/iSEEdemo.Rmd
iSEEdemo.Rmd
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.
iSEE
: https://bioconductor.org/packages/iSEE
iSEEde
: https://bioconductor.org/packages/iSEEde
iSEEindex
: https://bioconductor.org/packages/iSEEindex
iSEEpathways
: https://bioconductor.org/packages/iSEEpathways
iSEEhub
: https://bioconductor.org/packages/iSEEhub
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.
library("SingleCellExperiment")
library("iSEE")
library("TENxPBMCData")
library("iSEEu")
library("iSEEde")
library("iSEEpathways")
library("iSEEhub")
library("iSEEindex")
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!
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):
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/
How many lines of code are required to realize this?
How many of these lines had to be typed by a human?
So, yes, I will show you that is as easy as that:
Let’s run this together and see what we have got in store.
What typical visualizations people would you use to represent and explore your datasets?
Each panel has some essential content:
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.
iSEE also has some additional controls, grouped into the header bar, let’s have a look at them:
With this, we can…
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.
Panels: add, move, remove; exporting the initial
configuration, reloading it
A couple of additional things you can do with custom panels (and this is just an appetizer!):
You might have got the gist:
So, yes, we mighe be down to THREE lines of code.
Maybe iSEEu can be the place to find already that piece of functionality!
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.
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
ruleexlore 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:
“Wait, I got Seurat/Anndata objects”.
The single cell communities got you covered:
library("Seurat")
seurat_object <- readRDS("datasets/seurat_pbmc3k.RDS")
sce_from_seurat <- Seurat::as.SingleCellExperiment(
seurat_object
)
sce_from_seurat
iSEE(sce_from_seurat)
… 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/
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:
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