Skip to content

Commit

Permalink
Merge branch 'main' of github.com:NajlaAbassi/iSEEfier into prep_for_…
Browse files Browse the repository at this point in the history
…checks

# Conflicts:
#	NAMESPACE
#	man/iSEEfier-pkg.Rd
#	man/view_initial_tiles.Rd
  • Loading branch information
federicomarini committed Mar 15, 2024
2 parents 955ac31 + 7bd7d0d commit 28f8173
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 25 deletions.
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Generated by roxygen2: do not edit by hand

export(glue_initials)
export(iSEEfier)
export(iSEEconfigviewer)
export(iSEEinit)
export(iSEEnetworkviewer)
export(iSEEnrich)
export(view_initial_network)
export(view_initial_tiles)
Expand Down
10 changes: 5 additions & 5 deletions R/iSEEfier.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' iSEEfier: 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
#'
#' `iSEEfier()` 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 feature.list A character vector containing a list of genes
Expand All @@ -9,7 +9,7 @@
#' @param groups A character string of the groups/conditions...(as it appears in the colData of the sce)
#'
#' @return A list of "Panel" objects specifying the initial state of iSEE instance
#' @export iSEEfier
#' @export
#' @importFrom methods new
#' @importFrom SummarizedExperiment colData
#' @importClassesFrom iSEE ColumnDataPlot
Expand All @@ -28,8 +28,8 @@
#' gene_list <- c("ENSMUSG00000026581", "ENSMUSG00000005087", "ENSMUSG00000015437")
#' cluster <- "stimulus"
#' group <- "single cell quality"
#' initial <- iSEEfier(sce = sce, feature.list = gene_list, clusters = cluster, groups = group)
iSEEfier <- function(sce,
#' initial <- iSEEinit(sce = sce, feature.list = gene_list, clusters = cluster, groups = group)
iSEEinit <- function(sce,
feature.list,
reddim.type = "TSNE",
clusters = colnames(colData(sce))[1],
Expand Down
1 change: 1 addition & 0 deletions man/iSEEfier-pkg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/iSEEfier.Rd → man/iSEEinit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test_iSEEfier.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
test_that("test iSEEfier",{
test_that("test iSEEinit",{
sce <- scRNAseq::ReprocessedAllenData(assays = "tophat_counts")
sce <- scuttle::logNormCounts(sce, exprs_values="tophat_counts")
sce <- scater::runPCA(sce)
sce <- scater::runTSNE(sce)
initial <- iSEEfier(sce = sce,
initial <- iSEEinit(sce = sce,
feature.list = c("IL2rb",
"Klre1"),
clusters = "Primary.Type",
Expand Down
34 changes: 23 additions & 11 deletions vignettes/iSEEfier_userguide.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
---
title: >
The `iSEEfier` User's Guide
author:
- name: Najla Abassi
affiliation:
- Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI), Mainz
email: [email protected]
- name: Federico Marini
affiliation:
- Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI), Mainz
- Research Center for Immunotherapy (FZI), Mainz
email: [email protected]
date: "`r BiocStyle::doc_date()`"
output:
BiocStyle::html_document:
toc: true
Expand All @@ -9,6 +20,7 @@ vignette: >
%\VignetteIndexEntry{iSEEfier_userguide}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
%\VignettePackage{iSEEfier}
---

```{r, include = FALSE}
Expand Down Expand Up @@ -48,12 +60,12 @@ Once installed, the package can be loaded and attached to the current workspace
library("iSEEfier")
```

# Create an initial state for gene expression visualization using `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:

```{r runfunc, eval=FALSE}
iSEEfier(sce = sce_obj,
iSEEinit(sce = sce_obj,
feature.list = feature_list,
reddim.type = reduced_dim,
clusters = cluster,
Expand Down Expand Up @@ -123,33 +135,33 @@ cluster <- "label" #the name should match what's in the colData names
group <- "strain" #the name should match what's in the colData names
```

At this point, all the elements are ready to be transferred into `iSEEfier()`
At this point, all the elements are ready to be transferred into `iSEEinit()`

```{r initial1}
initial1 <- iSEEfier(sce = sce,
initial1 <- iSEEinit(sce = sce,
feature.list = gene_list,
clusters = cluster,
groups = group)
```

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 `iSEEfier`
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 `iSEEfier()`, 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.

- A `ComplexHeatmapPlot`
- A `ComplexHeatmapPlot` with all genes in `feature.list`

- `DynamicMarkerTable`
- A `DynamicMarkerTable` that identifies marker genes from a sample selection.

- `ColumnDataPlot`
- A `ColumnDataPlot`

- `MarkdownBoard```
- A `MarkdownBoard`

# Create an initial state for feature sets exploration using `iSEEnrich()`

Expand Down Expand Up @@ -189,7 +201,7 @@ iSEE(results$sce1, initial = results$initial)

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 `iSEEconfigviewer()`.

We only need as an input the initial configuration to obtain a graphical visualization of the expected the corresponding iSEE insantance:
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)
Expand Down

0 comments on commit 28f8173

Please sign in to comment.