From fef6103cb877e03c1768755c0344dd4ad81fa385 Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:38:33 +0200 Subject: [PATCH 1/8] better checks on the function arguments via BiocBaseUtils routines --- DESCRIPTION | 3 ++- NAMESPACE | 3 +++ R/iSEEinit.R | 19 +++++++------------ R/iSEEnrich.R | 15 +++++++-------- R/utils.R | 2 +- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0d7fbee..5de40dc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,7 +33,8 @@ Imports: stats, SummarizedExperiment, SingleCellExperiment, - visNetwork + visNetwork, + BiocBaseUtils Suggests: knitr, rmarkdown, diff --git a/NAMESPACE b/NAMESPACE index 2edfa9a..4358be2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,9 @@ importClassesFrom(iSEE,FeatureAssayPlot) importClassesFrom(iSEE,ReducedDimensionPlot) importClassesFrom(iSEE,RowDataTable) importClassesFrom(iSEEu,MarkdownBoard) +importFrom(BiocBaseUtils,isCharacter) +importFrom(BiocBaseUtils,isScalarCharacter) +importFrom(BiocBaseUtils,isTRUEorFALSE) importFrom(SingleCellExperiment,reducedDimNames) importFrom(SummarizedExperiment,colData) importFrom(ggplot2,aes) diff --git a/R/iSEEinit.R b/R/iSEEinit.R index f164cd9..659f695 100644 --- a/R/iSEEinit.R +++ b/R/iSEEinit.R @@ -45,22 +45,17 @@ iSEEinit <- function(sce, if (!is(sce, "SingleCellExperiment")) stop("Please provide a SingleCellExperiment as input!") - stopifnot(is.character(features)) - stopifnot(length(features) > 0) + stopifnot(is.character(features), length(features) > 0) - stopifnot(is.character(reddim_type)) - stopifnot(length(reddim_type) == 1) + stopifnot(isScalarCharacter(reddim_type)) - stopifnot(is.character(clusters)) - stopifnot(length(clusters) == 1) + stopifnot(isScalarCharacter(clusters)) - stopifnot(is.character(groups)) - stopifnot(length(groups) == 1) + stopifnot(isScalarCharacter(groups)) - stopifnot(is.logical(add_markdown_panel)) - stopifnot(length(add_markdown_panel) == 1) - stopifnot(is.logical(add_dynamicTable_panel)) - stopifnot(length(add_dynamicTable_panel) == 1) + stopifnot(isTRUEorFALSE(add_markdown_panel)) + + stopifnot(isTRUEorFALSE(add_dynamicTable_panel)) if (!(reddim_type %in% reducedDimNames(sce))) { available_reddims <- reducedDimNames(sce) diff --git a/R/iSEEnrich.R b/R/iSEEnrich.R index 9e87896..56375f3 100644 --- a/R/iSEEnrich.R +++ b/R/iSEEnrich.R @@ -27,7 +27,7 @@ #' collection = GO_collection, #' organism = Mm_organism, #' gene_identifier = gene_id) -#' +#' iSEEnrich <- function(sce, collection = c("GO", "KEGG"), organism = "org.Hs.eg.db", @@ -37,20 +37,19 @@ iSEEnrich <- function(sce, if (!is(sce, "SingleCellExperiment")) stop("Please provide a SingleCellExperiment as input!") - stopifnot(is.character(collection)) - stopifnot(length(collection) == 1) + stopifnot(isScalarCharacter(collection)) collection <- match.arg(collection, c("GO", "KEGG")) - stopifnot(is.character(organism)) - stopifnot(length(organism) == 1) + stopifnot(isScalarCharacter(organism)) - stopifnot(is.character(gene_identifier)) - stopifnot(length(gene_identifier) == 1) + stopifnot(isScalarCharacter(gene_identifier)) if (!requireNamespace(organism, quietly = TRUE)) stop("Please check the value of the provided orgDb package ", - "(it needs to be installed)...") + "(the package needs to be installed)...", + "If you want to install it run the following line:\n", + "BiocManager::install('", organism,"')") initial <- list() diff --git a/R/utils.R b/R/utils.R index 123bd1c..6d6f82a 100644 --- a/R/utils.R +++ b/R/utils.R @@ -328,7 +328,7 @@ glue_initials <- function(..., allowed_panels <- names(iSEE_panel_colors) if (!is.null(custom_panels_allowed)) { - stopifnot(is.character(custom_panels_allowed)) + stopifnot(isCharacter(custom_panels_allowed)) allowed_panels <- c(allowed_panels, custom_panels_allowed) } From aafab39cc60767eb20663ad449b8f20e17ed6a24 Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:39:35 +0200 Subject: [PATCH 2/8] wrapping lines of the codebase to fit below the 80 chars limit --- R/iSEEinit.R | 41 +++++++++++++++++++++++++++-------------- R/iSEEnrich.R | 21 ++++++++++++++------- R/utils.R | 9 ++++++--- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/R/iSEEinit.R b/R/iSEEinit.R index 659f695..3b49624 100644 --- a/R/iSEEinit.R +++ b/R/iSEEinit.R @@ -1,16 +1,26 @@ -#' iSEEinit: Create an initial state of an iSEE instance for gene expression visualization +#' iSEEinit: Create an initial state of an iSEE instance for gene expression +#' visualization #' -#' `iSEEinit()` defines the initial setup of an iSEE instance, recommending tailored visual elements to effortlessly illustrate the expression of a gene list in a single view. +#' `iSEEinit()` defines the initial setup of an iSEE instance, recommending +#' tailored visual elements to effortlessly illustrate the expression of a gene +#' list in a single view. #' #' @param sce SingleCellExperiment object #' @param features A character vector containing a list of genes -#' @param reddim_type A string vector containing the dimensionality reduction type -#' @param clusters A character string containing the name of the clusters/cell-type/state...(as listed in the colData of the sce) -#' @param groups A character string of the groups/conditions...(as it appears in the colData of the sce) -#' @param add_markdown_panel A logical indicating whether or not to include the MarkdownBoard panel in the initial configuration -#' @param add_dynamicTable_panel A logical indicating whether or not the DynamicMarkerTable and linked panels should be included in the initial configuration +#' @param reddim_type A string vector containing the dimensionality reduction +#' type +#' @param clusters A character string containing the name of the +#' clusters/cell-type/state...(as listed in the colData of the sce) +#' @param groups A character string of the groups/conditions...(as it appears in +#' the colData of the sce) +#' @param add_markdown_panel A logical indicating whether or not to include the +#' MarkdownBoard panel in the initial configuration +#' @param add_dynamicTable_panel A logical indicating whether or not the +#' DynamicMarkerTable and linked panels should be included in the initial +#' configuration #' -#' @return A list of "Panel" objects specifying the initial state of iSEE instance +#' @return A list of "Panel" objects specifying the initial state of iSEE +#' instance #' @export #' @importFrom methods new #' @importFrom SummarizedExperiment colData @@ -22,6 +32,7 @@ #' @importClassesFrom iSEE RowDataTable #' @importClassesFrom iSEE ComplexHeatmapPlot #' @importClassesFrom iSEEu MarkdownBoard +#' @importFrom BiocBaseUtils isCharacter isScalarCharacter isTRUEorFALSE #' #' #' @examples @@ -29,7 +40,9 @@ #' sce <- scuttle::logNormCounts(sce) #' sce <- scater::runPCA(sce) #' sce <- scater::runTSNE(sce) -#' gene_list <- c("ENSMUSG00000026581", "ENSMUSG00000005087", "ENSMUSG00000015437") +#' gene_list <- c("ENSMUSG00000026581", +#' "ENSMUSG00000005087", +#' "ENSMUSG00000015437") #' cluster <- "stimulus" #' group <- "single cell quality" #' initial <- iSEEinit(sce = sce, features = gene_list, clusters = cluster, groups = group) @@ -174,21 +187,21 @@ iSEEinit <- function(sce, PanelWidth = 4L) } - if(add_dynamicTable_panel == TRUE) { - initial[[paste0("ReducedDimensionPlot",length(features)+2)]] <- new( + if (add_dynamicTable_panel == TRUE) { + initial[[paste0("ReducedDimensionPlot",length(features) + 2)]] <- new( "ReducedDimensionPlot", Type = reddim_type, ColorByColumnData = clusters, ColorBy = "Column data", SelectionAlpha = 0.05, - ColumnSelectionSource = paste0("FeatureAssayPlot",length(features)+2)) + ColumnSelectionSource = paste0("FeatureAssayPlot",length(features) + 2)) initial[["DynamicMarkerTable1"]] <- new( "DynamicMarkerTable", - ColumnSelectionSource = paste0("ReducedDimensionPlot",length(features)+2)) + ColumnSelectionSource = paste0("ReducedDimensionPlot",length(features) + 2)) - initial[[paste0("FeatureAssayPlot",length(features)+2)]] <- new( + initial[[paste0("FeatureAssayPlot",length(features) + 2)]] <- new( "FeatureAssayPlot", XAxis = "Column data", XAxisColumnData = groups, diff --git a/R/iSEEnrich.R b/R/iSEEnrich.R index 56375f3..4559f97 100644 --- a/R/iSEEnrich.R +++ b/R/iSEEnrich.R @@ -1,19 +1,25 @@ #' iSEEnrich #' -#' `iSEEnrich()` creates an initial state of an iSEE instance for interactive exploration of feature sets extracted from GO and KEGG database, -#' displaying all associated genes in a `RowDataTable` panel. +#' `iSEEnrich()` creates an initial state of an iSEE instance for interactive +#' exploration of feature sets extracted from GO and KEGG database, displaying +#' all associated genes in a `RowDataTable` panel. #' #' @param sce SingleCellExperiment object -#' @param collection A character vector specifying the gene set collections of interest (GO,KEGG) -#' @param organism A character string of the org.*.eg.db package to use to extract mappings of gene sets to gene IDs. -#' @param gene_identifier A character string specifying the identifier to use to extract gene IDs for the organism package +#' @param collection A character vector specifying the gene set collections of +#' interest (GO,KEGG) +#' @param organism A character string of the org.*.eg.db package to use to +#' extract mappings of gene sets to gene IDs. +#' @param gene_identifier A character string specifying the identifier to use to +#' extract gene IDs for the organism package #' -#' @return A list of "Panel" objects specifying the initial state of iSEE instance +#' @return A list of "Panel" objects specifying the initial state of iSEE +#' instance #' @export iSEEnrich #' @importFrom iSEE RowDataTable #' @importFrom iSEEu createGeneSetCommands #' @importFrom iSEEu registerFeatureSetCommands #' @importFrom iSEEu FeatureSetTable +#' @importFrom BiocBaseUtils isScalarCharacter #' #' #' @examples @@ -61,7 +67,8 @@ iSEEnrich <- function(sce, initial[["FeatureSetTable1"]] <- FeatureSetTable() - initial[["RowDataTable1"]] <- RowDataTable(RowSelectionSource="FeatureSetTable1") + initial[["RowDataTable1"]] <- RowDataTable( + RowSelectionSource = "FeatureSetTable1") return( list( diff --git a/R/utils.R b/R/utils.R index 6d6f82a..222747c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -26,6 +26,7 @@ #' @importFrom ggplot2 ggplot aes geom_tile scale_fill_manual scale_y_discrete #' theme theme_void #' @importFrom rlang .data +#' @importFrom BiocBaseUtils isCharacter #' #' @seealso [view_initial_network()] #' @@ -36,7 +37,9 @@ #' sce <- scater::runPCA(sce) #' sce <- scater::runTSNE(sce) #' ## Select some features and aspects to focus on -#' gene_list <- c("ENSMUSG00000026581", "ENSMUSG00000005087", "ENSMUSG00000015437") +#' gene_list <- c("ENSMUSG00000026581", +#' "ENSMUSG00000005087", +#' "ENSMUSG00000015437") #' cluster <- "stimulus" #' group <- "single cell quality" #' initial <- iSEEinit(sce = sce, @@ -73,7 +76,7 @@ view_initial_tiles <- function(initial) { cur_row <- 1 # fill in the tiles vector "with the rule of 12" - for(i in seq_len(length(initial))) { + for (i in seq_len(length(initial))) { this_width <- panel_widths[i] this_paneltype <- panel_types[i] this_color <- iSEE_panel_colors[this_paneltype] @@ -133,7 +136,7 @@ view_initial_tiles <- function(initial) { name = "iSEE Panel type", values = iSEE_panel_colors ) + - theme(legend.position="bottom") + theme(legend.position = "bottom") return(p) } From 074e6799fcdfe6c2abcb6d44e0f3adc8b50b0fdd Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:40:45 +0200 Subject: [PATCH 3/8] also adjusting the vignette content to fit into the 80 chars limit --- tests/testthat/setuptests_iSEEfier.R | 2 +- vignettes/iSEEfier_userguide.Rmd | 117 ++++++++++++++++----------- 2 files changed, 70 insertions(+), 49 deletions(-) diff --git a/tests/testthat/setuptests_iSEEfier.R b/tests/testthat/setuptests_iSEEfier.R index 69d5668..da397f9 100644 --- a/tests/testthat/setuptests_iSEEfier.R +++ b/tests/testthat/setuptests_iSEEfier.R @@ -9,7 +9,7 @@ message("- Done!") message("--- Preparing datasets...") sce_allen <- scRNAseq::ReprocessedAllenData(assays = "tophat_counts") -sce_allen <- scuttle::logNormCounts(sce_allen, exprs_values="tophat_counts") +sce_allen <- scuttle::logNormCounts(sce_allen, exprs_values = "tophat_counts") sce_allen <- scater::runPCA(sce_allen) sce_allen <- scater::runTSNE(sce_allen) diff --git a/vignettes/iSEEfier_userguide.Rmd b/vignettes/iSEEfier_userguide.Rmd index eed465c..b428896 100644 --- a/vignettes/iSEEfier_userguide.Rmd +++ b/vignettes/iSEEfier_userguide.Rmd @@ -1,18 +1,18 @@ --- title: > - The `iSEEfier` User's Guide + The `iSEEfier` User's Guide author: - name: Najla Abassi - affiliation: + affiliation: - Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI), Mainz email: najla.abassi@uni-mainz.de - name: Federico Marini - affiliation: + affiliation: - Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI), Mainz - Research Center for Immunotherapy (FZI), Mainz email: marinif@uni-mainz.de date: "`r BiocStyle::doc_date()`" -output: +output: BiocStyle::html_document: toc: true toc_float: true @@ -21,8 +21,8 @@ vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} %\VignettePackage{iSEEfier} ---- +--- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, @@ -36,24 +36,29 @@ knitr::opts_chunk$set( # Introduction {#introduction} -This vignette describes how to use the `r BiocStyle::Biocpkg("iSEEfier")` package to configure various initial states of iSEE instances, in order to simplify the task of visualizing single-cell RNA-seq, bulk RNA-seq data, or even your proteomics data in `r BiocStyle::Biocpkg("iSEE")`. - -In the remainder of this vignette, we will illustrate the main features of `r BiocStyle::Biocpkg("iSEEfier")` on a publicly available dataset from Baron et al. "A Single-Cell Transcriptomic Map of the Human and Mouse Pancreas Reveals Inter- and Intra-cell Population Structure", published in Cell Systems in 2016. [doi:10.1016/j.cels.2016.08.011](https://doi.org/10.1016/j.cels.2016.08.011). - -The data is made available via the `r BiocStyle::Biocpkg("scRNAseq")` Bioconductor package. We'll simply use the mouse dataset, consisting of islets isolated from five C57BL/6 and ICR mice. - +This vignette describes how to use the `r BiocStyle::Biocpkg("iSEEfier")` +package to configure various initial states of iSEE instances, in order to +simplify the task of visualizing single-cell RNA-seq, bulk RNA-seq data, or even +your proteomics data in `r BiocStyle::Biocpkg("iSEE")`. +In the remainder of this vignette, we will illustrate the main features of `r +BiocStyle::Biocpkg("iSEEfier")` on a publicly available dataset from Baron et +al. "A Single-Cell Transcriptomic Map of the Human and Mouse Pancreas Reveals +Inter- and Intra-cell Population Structure", published in Cell Systems in 2016. +[doi:10.1016/j.cels.2016.08.011](https://doi.org/10.1016/j.cels.2016.08.011). +The data is made available via the `r BiocStyle::Biocpkg("scRNAseq")` +Bioconductor package. We'll simply use the mouse dataset, consisting of islets +isolated from five C57BL/6 and ICR mice. # Getting started {#gettingstarted} - To install `r BiocStyle::Biocpkg("iSEEfier")` package, we start R and enter: ```{r install, eval=FALSE} if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") - BiocManager::install("iSEEfier") ``` -Once installed, the package can be loaded and attached to the current workspace as follows: +Once installed, the package can be loaded and attached to the current workspace +as follows: ```{r setup} library("iSEEfier") @@ -61,7 +66,8 @@ library("iSEEfier") # Create an initial state for gene expression visualization using `iSEEinit()` -When we have all input elements ready, we can create an `iSEE` initial state by running: +When we have all input elements ready, we can create an `iSEE` initial state by +running: ```{r runfunc, eval=FALSE} iSEEinit(sce = sce_obj, @@ -73,10 +79,13 @@ iSEEinit(sce = sce_obj, add_dynamicTable_panel = FALSE) ``` -To configure the initial state of our `iSEE` instance using `iSEEinit()`, we need five parameters: - -1. `sce` : A `SingleCellExperiment` object. This object stores information of different quantifications (counts, log-expression...), dimensionality reduction coordinates (t-SNE, UMAP...), as well as some metadata related to the samples and features. +To configure the initial state of our `iSEE` instance using `iSEEinit()`, we +need five parameters: +1. `sce` : A `SingleCellExperiment` object. This object stores information of +different quantifications (counts, log-expression...), dimensionality reduction +coordinates (t-SNE, UMAP...), as well as some metadata related to the samples +and features. We'll start by loading the `sce` object: ```{r loaddata} @@ -103,7 +112,9 @@ sce <- runUMAP(sce) Now our `sce` is ready, we can move on to the next argument. -2. `features` : which is a list or a vector of genes/features of interest. Let's say we would like to visualize the expression of some genes that were identified as marker genes for different cell population. +2. `features` : which is a list or a vector of genes/features of interest. +Let's say we would like to visualize the expression of some genes that were +identified as marker genes for different cell population. ```{r genelist} gene_list <- c("Gcg", # alpha @@ -116,7 +127,8 @@ gene_list <- c("Gcg", # alpha reddim_type <- "TSNE" ``` -4. `clusters` : Now we specify what clusters/cell-types/states/samples we would like to color/split our data with +4. `clusters` : Now we specify what clusters/cell-types/states/samples we would +like to color/split our data with ```{r cluster-id} # cell populations @@ -130,8 +142,9 @@ cluster <- "label" #the name should match what's in the colData names group <- "strain" #the name should match what's in the colData names ``` -We can choose to include in this initial step a `MarkdownBoard` and a `DynamicMarkerTable`, along with its linked panels by setting the arguments `add_markdown_panel` and `add_dynamicTable_panel` to `TRUE`. - +We can choose to include in this initial step a `MarkdownBoard` and a +`DynamicMarkerTable`, along with its linked panels by setting the arguments +`add_markdown_panel` and `add_dynamicTable_panel` to `TRUE`. At this point, all the elements are ready to be transferred into `iSEEinit()` ```{r initial1} @@ -143,35 +156,34 @@ initial1 <- iSEEinit(sce = sce, add_dynamicTable_panel = TRUE) ``` -Now we are one step away from visualizing our list of genes of interest. All that's left to do is to run `iSEE` with the initial state created with `iSEEinit()` +Now we are one step away from visualizing our list of genes of interest. All +that's left to do is to run `iSEE` with the initial state created with +`iSEEinit()` ```{r iSEEviz1, eval=FALSE} library("iSEE") iSEE(sce, initial= initial1) ``` -This instance, generated with `iSEEinit()`, returns a combination of panels, linked to each other, with the goal of visualizing the expression of certain marker genes in each cell population/group: +This instance, generated with `iSEEinit()`, returns a combination of panels, +linked to each other, with the goal of visualizing the expression of certain +marker genes in each cell population/group: - A `ReducedDimensionPlot`, `FeatureAssayPlot` and `RowDataTable` for each single gene in `features`. - - A `ComplexHeatmapPlot` with all genes in `features` - - A `DynamicMarkerTable` that identifies marker genes from a sample selection. - - A `ColumnDataPlot` panel - - A `MarkdownBoard` panel # Create an initial state for feature sets exploration using `iSEEnrich()` -Sometimes it is interesting to look at some specific feature sets and the associated genes. That's when the utility of `iSEEnrich` becomes apparent. We will need 4 elements to explore feature sets of interest: +Sometimes it is interesting to look at some specific feature sets and the +associated genes. That's when the utility of `iSEEnrich` becomes apparent. We +will need 4 elements to explore feature sets of interest: - `sce`: A SingleCellExperiment object - - `collection`: A character vector specifying the gene set collections of interest (it is possible to use GO or KEGG terms) - - `gene_identifier`: A character string specifying the identifier to use to extract gene IDs for the organism package. This can be **"ENS"** for ENSEMBL ids, **"SYMBOL"** for gene names... - - `organism`: A character string of the `org.*.eg.db` package to use to extract mappings of gene sets to gene IDs. ```{r set-param} @@ -189,7 +201,8 @@ results <- iSEEnrich(sce = sce, gene_identifier = gene_id) ``` -`iSEEnrich` will specifically return a list with the updated `sce` object and its associated `initial` configuration. To start the `iSEE` instance we run: +`iSEEnrich` will specifically return a list with the updated `sce` object and +its associated `initial` configuration. To start the `iSEE` instance we run: ```{r iSEEviz2, eval=FALSE} iSEE(results$sce, initial = results$initial) @@ -197,9 +210,11 @@ iSEE(results$sce, initial = results$initial) # Visualize a preview of the initial configurations with `view_initial_tiles()` -Previously, we successfully generated two distinct initial configurations for iSEE. However, understanding the expected content of our iSEE instances is not always straightforward. That's when we can use `view_initial_tiles()`. - -We only need as an input the initial configuration to obtain a graphical visualization of the expected the corresponding `iSEE` instance: +Previously, we successfully generated two distinct initial configurations for +iSEE. However, understanding the expected content of our iSEE instances is not +always straightforward. That's when we can use `view_initial_tiles()`. +We only need as an input the initial configuration to obtain a graphical +visualization of the expected the corresponding `iSEE` instance: ```{r panelgraph} library(ggplot2) @@ -209,24 +224,25 @@ view_initial_tiles(initial = results$initial) # Visualize network connections between panels with `view_initial_network()` -As some of these panels are linked to each other, we can visualize these networks with `view_initial_network()`. Similar to `iSEEconfigviewer()`, this function takes the initial setup as input: - -This function always returns the `igraph` object underlying the visualizations that can be displayed as a side effect. +As some of these panels are linked to each other, we can visualize these +networks with `view_initial_network()`. Similar to `iSEEconfigviewer()`, this +function takes the initial setup as input: +This function always returns the `igraph` object underlying the visualizations +that can be displayed as a side effect. ```{r networkviz} library("igraph") library("visNetwork") - g1 <- view_initial_network(initial1, plot_format = "igraph") g1 - initial2 <- results$initial g2 <- view_initial_network(initial2, plot_format = "visNetwork") ``` # Merge different initial configurations with `glue_initials()` -Sometimes, it would be interesting to merge different `iSEE` initial configurations to visualize all different panel in the same `iSEE` instance. +Sometimes, it would be interesting to merge different `iSEE` initial +configurations to visualize all different panel in the same `iSEE` instance. ```{r glueconfig} merged_config <- glue_initials(initial1,initial2) @@ -240,16 +256,21 @@ view_initial_tiles(merged_config) # Related work -The idea of launching `iSEE()` with some specific configuration is not entirely new, and it was covered in some use cases by the `mode_` functions available in the `r BiocStyle::Biocpkg("iSEEu")` package.\ -There, the user has access to the following: +The idea of launching `iSEE()` with some specific configuration is not entirely +new, and it was covered in some use cases by the `mode_` functions available in +the `r BiocStyle::Biocpkg("iSEEu")` package.\ There, the user has access to the +following: - `iSEEu::modeEmpty()` - this will launch `iSEE` without any panels, and let you build up the configuration from the scratch. Easy to start, easy to build. - `iSEEu::modeGating()` - this will open `iSEE` with multiple chain-linked FeatureExpressionPlot panels, just like when doing some in silico gating. This could be a very good fit if working with mass cytometry data. - `iSEEu::modeReducedDim()` - `iSEE` will be ready to compare multiple ReducedDimensionPlot panels, which is a suitable option to compare the views resulting from different embeddings (and/or embeddings generated with slightly different parameter configurations). - -The `mode`s directly launch an instance of `iSEE`, whereas the functionality in `r BiocStyle::Biocpkg("iSEEfier")` is rather oriented to obtain more tailored-to-the-data-at-hand `initial` objects, that can subsequently be passed as an argument to the `iSEE()` call. - -We encourage users to submit suggestions about their "classical ways" of using `iSEE` on their data - be that by opening an issue or already proposing a Pull Request on GitHub. +The `mode`s directly launch an instance of `iSEE`, whereas the functionality in +`r BiocStyle::Biocpkg("iSEEfier")` is rather oriented to obtain more +tailored-to-the-data-at-hand `initial` objects, that can subsequently be passed +as an argument to the `iSEE()` call. +We encourage users to submit suggestions about their "classical ways" of using +`iSEE` on their data - be that by opening an issue or already proposing a Pull +Request on GitHub. # Session info {.unnumbered} From 87d357ef23a985b1f39de45a3bccb2aca19b16de Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:40:56 +0200 Subject: [PATCH 4/8] re-rendering manpage --- man/iSEEinit.Rd | 26 ++++++++++++++++++-------- man/iSEEnrich.Rd | 17 +++++++++++------ 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/man/iSEEinit.Rd b/man/iSEEinit.Rd index 5aad138..0e8fff4 100644 --- a/man/iSEEinit.Rd +++ b/man/iSEEinit.Rd @@ -2,7 +2,8 @@ % Please edit documentation in R/iSEEinit.R \name{iSEEinit} \alias{iSEEinit} -\title{iSEEinit: Create an initial state of an iSEE instance for gene expression visualization} +\title{iSEEinit: Create an initial state of an iSEE instance for gene expression +visualization} \usage{ iSEEinit( sce, @@ -19,21 +20,30 @@ iSEEinit( \item{features}{A character vector containing a list of genes} -\item{reddim_type}{A string vector containing the dimensionality reduction type} +\item{reddim_type}{A string vector containing the dimensionality reduction +type} -\item{clusters}{A character string containing the name of the clusters/cell-type/state...(as listed in the colData of the sce)} +\item{clusters}{A character string containing the name of the +clusters/cell-type/state...(as listed in the colData of the sce)} -\item{groups}{A character string of the groups/conditions...(as it appears in the colData of the sce)} +\item{groups}{A character string of the groups/conditions...(as it appears in +the colData of the sce)} -\item{add_markdown_panel}{A logical indicating whether or not to include the MarkdownBoard panel in the initial configuration} +\item{add_markdown_panel}{A logical indicating whether or not to include the +MarkdownBoard panel in the initial configuration} -\item{add_dynamicTable_panel}{A logical indicating whether or not the DynamicMarkerTable and linked panels should be included in the initial configuration} +\item{add_dynamicTable_panel}{A logical indicating whether or not the +DynamicMarkerTable and linked panels should be included in the initial +configuration} } \value{ -A list of "Panel" objects specifying the initial state of iSEE instance +A list of "Panel" objects specifying the initial state of iSEE +instance } \description{ -\code{iSEEinit()} defines the initial setup of an iSEE instance, recommending tailored visual elements to effortlessly illustrate the expression of a gene list in a single view. +\code{iSEEinit()} defines the initial setup of an iSEE instance, recommending +tailored visual elements to effortlessly illustrate the expression of a gene +list in a single view. } \examples{ sce <- scRNAseq::RichardTCellData() diff --git a/man/iSEEnrich.Rd b/man/iSEEnrich.Rd index 545b93b..af24797 100644 --- a/man/iSEEnrich.Rd +++ b/man/iSEEnrich.Rd @@ -14,18 +14,23 @@ iSEEnrich( \arguments{ \item{sce}{SingleCellExperiment object} -\item{collection}{A character vector specifying the gene set collections of interest (GO,KEGG)} +\item{collection}{A character vector specifying the gene set collections of +interest (GO,KEGG)} -\item{organism}{A character string of the org.*.eg.db package to use to extract mappings of gene sets to gene IDs.} +\item{organism}{A character string of the org.*.eg.db package to use to +extract mappings of gene sets to gene IDs.} -\item{gene_identifier}{A character string specifying the identifier to use to extract gene IDs for the organism package} +\item{gene_identifier}{A character string specifying the identifier to use to +extract gene IDs for the organism package} } \value{ -A list of "Panel" objects specifying the initial state of iSEE instance +A list of "Panel" objects specifying the initial state of iSEE +instance } \description{ -\code{iSEEnrich()} creates an initial state of an iSEE instance for interactive exploration of feature sets extracted from GO and KEGG database, -displaying all associated genes in a \code{RowDataTable} panel. +\code{iSEEnrich()} creates an initial state of an iSEE instance for interactive +exploration of feature sets extracted from GO and KEGG database, displaying +all associated genes in a \code{RowDataTable} panel. } \examples{ sce <- scRNAseq::RichardTCellData() From f66f44daba3c015fd85fc10528a0d1aee4f7f3d3 Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:55:18 +0200 Subject: [PATCH 5/8] rerendered examples --- man/iSEEinit.Rd | 4 +++- man/view_initial_tiles.Rd | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/man/iSEEinit.Rd b/man/iSEEinit.Rd index 0e8fff4..109ce99 100644 --- a/man/iSEEinit.Rd +++ b/man/iSEEinit.Rd @@ -50,7 +50,9 @@ sce <- scRNAseq::RichardTCellData() sce <- scuttle::logNormCounts(sce) sce <- scater::runPCA(sce) sce <- scater::runTSNE(sce) -gene_list <- c("ENSMUSG00000026581", "ENSMUSG00000005087", "ENSMUSG00000015437") +gene_list <- c("ENSMUSG00000026581", + "ENSMUSG00000005087", + "ENSMUSG00000015437") cluster <- "stimulus" group <- "single cell quality" initial <- iSEEinit(sce = sce, features = gene_list, clusters = cluster, groups = group) diff --git a/man/view_initial_tiles.Rd b/man/view_initial_tiles.Rd index 3b2c8a5..563ee0a 100644 --- a/man/view_initial_tiles.Rd +++ b/man/view_initial_tiles.Rd @@ -35,7 +35,9 @@ sce <- scuttle::logNormCounts(sce) sce <- scater::runPCA(sce) sce <- scater::runTSNE(sce) ## Select some features and aspects to focus on -gene_list <- c("ENSMUSG00000026581", "ENSMUSG00000005087", "ENSMUSG00000015437") +gene_list <- c("ENSMUSG00000026581", + "ENSMUSG00000005087", + "ENSMUSG00000015437") cluster <- "stimulus" group <- "single cell quality" initial <- iSEEinit(sce = sce, From 1e280ba8c1b8f3a13635791d34eba30d91ffd58a Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:55:26 +0200 Subject: [PATCH 6/8] updated news --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 63f8ec9..5ff51a3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# iSEEfier 0.99.2 + +* Addressing the points raised in the Bioc review +* Better checks of the arguments - more compact and robust +* Explicitly suggesting the instructions to install potentially missing packages for `iSEEnrich()` + # iSEEfier 0.99.1 * Ready for Bioconductor review From 2b5f2f28bc1a71ab781eef42e87619ad0f3362df Mon Sep 17 00:00:00 2001 From: Najla Abassi Date: Wed, 3 Apr 2024 15:55:37 +0200 Subject: [PATCH 7/8] version bump, 0.99.2 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5de40dc..5b9fc36 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: iSEEfier Title: Streamlining the creation of initial states for starting an iSEE instance -Version: 0.99.1 +Version: 0.99.2 Authors@R: c( person(given = "Najla", family = "Abassi", role = c("aut", "cre"), From eb66d11385ef95695d90fe9f19fc9e1db7239d0b Mon Sep 17 00:00:00 2001 From: Federico Marini Date: Wed, 3 Apr 2024 16:00:23 +0200 Subject: [PATCH 8/8] styling up a bit the pkgdown looks, thanks to Kevin's configuration of css! --- pkgdown/extra.css | 97 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 pkgdown/extra.css diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..c51e05b --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,97 @@ +/* +Developed and maintained by Kevin Rue-Albrecht (@kevinrue) +*/ + +/* +#0092ac blue +#00758a darker blue (active menu) +#c4d931 green (on blue) +#87b13f green (on white) +*/ + +.headroom { + background-color: #0092ac; +} + +.navbar-default .navbar-link { + color: #ffffff; +} + +.navbar-default .navbar-link:hover { + color: #c4d931; +} + +.navbar-default .navbar-nav>.active>a, +.navbar-default .navbar-nav>.active>a:hover, +.navbar-default .navbar-nav>.active>a:focus { + color: #c4d931; + background-color: #00758a; +} + +.navbar-default .navbar-nav>.open>a, +.navbar-default .navbar-nav>.open>a:hover, +.navbar-default .navbar-nav>.open>a:focus { + color: #c4d931; + background-color: #00758a; +} + +.dropdown-menu>.active>a, +.dropdown-menu>.active>a:hover, +.dropdown-menu>.active>a:focus { + color: #c4d931; + background-color: #00758a; +} + +.navbar-default .navbar-nav>li>a:hover, +.navbar-default .navbar-nav>li>a:focus { + color: #c4d931; +} + +.dropdown-menu>li>a:hover { + color: #87b13f; + background-color: #ffffff; +} + +.navbar-default .navbar-nav>li>a { + color: #ffffff; +} + +h1 { + color: #87b13f; +} + +h2 { + color: #1a81c2; +} + +h3 { + color: #1a81c2; + font-weight: bold; +} + +.btn-copy-ex { + color: #ffffff; + background-color: #0092ac; + border-color: #0092ac; +} + +.btn-copy-ex:hover { + color: #ffffff; + background-color: #00758a; + border-color: #00758a; +} + +.btn-copy-ex:active:focus { + color: #c4d931; + background-color: #00758a; + border-color: #0092ac; +} + +p>.fa, +p>.fas { + color: #0092ac; +} + +img { + width: auto; +}