Explore Data {scran} | R Documentation

## Shiny app for explorative data analysis

### Description

Generate an interactive Shiny app to explore gene expression patterns in single-cell data

### Usage

    exploreData(x, cell.data, gene.data, red.dim, run=TRUE)

### Arguments

`x` | A numeric matrix of expression values to be visualized.
`cell.data` | A data frame of cell information, where each row corresponds to a column of `x`.
`gene.data` | A data frame of gene information, where each row corresponds to a row of `x`.
`red.dim` | A numeric matrix with two colums, specifying the reduced-dimension coordinates for each cell.
`run` | A logical scalar specifying whether the app should be run immediately.

### Details

Note that this function is deprecated; we suggest using the iSEE package for data exploration instead.

This function will return a Shiny app object that can be run with `runApp`. The app allows the user to interactively explore gene expression patterns in single-cell RNA-seq data. Explorative analysis is focused on comparing gene exression between different groups of cells, as defined by the covariates of `cell.data`.

Three plots are shown in the app:

- a scatterplot of cell locations based on the `red.dim` coordinates, colored by a selected covariate

- a scatterplot of cell locations based on the `red.dim` coordinates, colored by expression of a selected gene

- boxplot(s) of expression values for a selected gene, grouped by a selected covariate.

Several options are available within the app:

“Color by”:

  Covariate to be used for coloring the first scatter plot.

“Group by”:

  Covariate with which expression values are grouped in the boxplots.

In addition, the `gene.data` data frame is rendered as an interactive table using the JavaScript library `DataTable`. This allows the user to subset/search the feature data and select a gene by clicking on the corresponding row.

### Value

If `run=FALSE`, a Shiny app object is returned, which can be run with `runApp`. If `run=TRUE`, a Shiny app object is created and run.

### Author(s)

Karsten Bach

### See Also

`runApp`,

### Examples

    # Set up example data
    example(SingleCellExperiment)
    cell.data <- DataFrame(stuff=sample(LETTERS, ncol(sce), replace=TRUE))
    gene.data <- DataFrame(lengths=runif(nrow(sce)))

    # Mocking up  some reduced dimensions.
    pca <- prcomp(t(exprs(sce)))
    red.dim <- pca$x[,1:2]

    # Creating the app object.
    app <- exploreData(exprs(sce), cell.data, gene.data, red.dim, run=FALSE)
    if (interactive()) { shiny::runApp(app) }

    ## Not run: # Running directly from the function.
    saved <- exploreData(x, cell.data, gene.data, red.dim)

    ## End(Not run)

[Package scran version 1.8.4 Index]