seuflviz

Processing, plotting, and interactive eda of full-length scRNA-seq as seurat objects

https://github.com/cobriniklab/seuflviz

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Processing, plotting, and interactive eda of full-length scRNA-seq as seurat objects

Basic Info
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • Open Issues: 3
  • Releases: 2
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License Citation

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
    eval = FALSE,
    collapse = TRUE,
    comment = "#>",
    dpi = 900,
    fig.path = "man/figures/README-",
    out.width = "100%"
)
```


# seuFLViz

This package includes a set of Shiny apps for exploring single cell RNA datasets processed with Seurat

A demo using a human gene transcript dataset from Shayler et al. (link) is available here

There are also convenient functions for:

-   Clustering and Dimensional Reduction of Raw Sequencing Data.
-   Integration and Label Transfer
-   Louvain Clustering at a Range of Resolutions
-   Cell cycle state regression and labeling
-   RNA velocity calculation with Velocyto.R and scvelo

> [!WARNING]
> seuFLVizSeurat was designed for full-length smart-seq based single cell data. Default settings may not be appropriate for droplet (10x) data, though most can be adjusted. Keep in mind [best practices](https://satijalab.org/seurat/articles/pbmc3k_tutorial) regarding normalization, dimensional reduction, etc. when using. 

## Installation

You can install the released version of seuFLViz from github with:

### Install locally and run in three steps:

You can install seuFLViz locally using the following steps:

```{r, eval=FALSE}
install.packages("devtools")
devtools::install_github("cobriniklab/seuFLViz")
seuFLViz::create_project_db()
```

You can also customize the location of the app using these steps:

```{r, eval=FALSE}
devtools::install_github("cobriniklab/seuFLViz")
seuFLViz::create_project_db(destdir = "/your/path/to/app")
```


## Getting Started

First, load seuFLViz and all other packages required 

```{r}
library(seuFLViz)
library(Seurat)
library(tidyverse)
library(ggraph)
```

## TLDR

seuFLViz provides a single command to:

-   construct a Seurat object

-   filter genes by minimum expression and ubiquity

-   normalize and scale expression by any of several methods packaged in Seurat

## Run clustering on a single seurat object

By default clustering will be run at ten different resolutions between 0.2 and 2.0. Any resolution can be specified by providing the resolution argument as a numeric vector.

```{r, cache = FALSE, eval = FALSE}
clustered_seu <- clustering_workflow(human_gene_transcript_seu,
    experiment_name = "seurat_hu_trans",
    organism = "human"
)
```

## Get a first look at a processed dataset using an interactive shiny app 

The included dataset is available upon package loading, but is also stored at https://zenodo.org/records/15596099

```{r, eval = FALSE}
minimalSeuratApp(human_gene_transcript_seu)
```

## Set up a seurat object

We start with a gene by cell matrix of count/UMI values and a table of cell metadata

```{r, eval=FALSE}
human_count[1:5, 1:5]

head(human_meta)
```

```{r, eval = FALSE, echo=FALSE}
knitr::kable(human_count[1:5, 1:5])

knitr::kable(head(human_meta))
```

We can then create a seurat object in the usual manner using `CreatSeuratObject` function

```{r}
myseu <- CreateSeuratObject(human_count, assay = "gene", meta.data = human_meta)
```

## Preprocess the seurat object

seuFLViz includes a handy function to preprocess the data that handles normalization and scaling required for downstream analysis. If needed, parameters can be specified by the user.

```{r, message = FALSE}
myseu <- seurat_preprocess(myseu)
```

This single function includes seurat sub-functions that normalizes, identifies highly variable features and scales the data

## Perform dimension reduction

seuFLViz also implements a standardized dimension reduction step to select variable features at a user-specified threshold and perform PCA, tSNE, and UMAP. The default assay the dimension reduction is being run on is "gene".

```{r, results=FALSE, warning = FALSE, message=FALSE}
myseu <- seurat_reduce_dimensions(myseu, assay = "RNA")
```


## Community detection by clustering

Clustering analysis is performed via Louvain(default) or alternative algorithms available in Seurat. Clustering is performed at a range of resolutions with default value ranging from 0.2 to 2 and pca reduction

```{r, message = FALSE, result = FALSE, chache = FALSE, warning = FALSE}
seu <- seurat_cluster(seu = Dim_Red_seu, resolution = seq(0.2, 2, by = 0.2))
```

This function produces clustering analysis via two steps performed using two different sub-functions


## Split included dataset based on collection technology

seuFLViz includes a function, `SplitObject`, which is capable of splitting the dataset into subsets based on a single attribute indicated by the split.by argument 

```{r}
split_human <- SplitObject(human_gene_transcript_seu, split.by = "dataset")
```
In this example the `split_human` object consists of a list of subsetted objects which are split based on batch


## Run seurat batch integration on 'child' projects

When joint analysis of 2 or more datasets is to be performed `integration_workflow` function can be used, which takes in a list of seurat objects as input and returns an integrated seurat object

```{r, results="hide", cache = FALSE}
integrated_seu <- integration_workflow(split_human)
```

## View analysis details

```{r, eval = FALSE}
Misc(integrated_seu, "experiment") %>%
    tibble::enframe() %>%
    knitr::kable()
```

Owner

  • Name: Cobrinik Laboratory at Children's Hospital Los Angeles
  • Login: cobriniklab
  • Kind: organization
  • Location: Los Angeles, CA

GitHub Events

Total
  • Release event: 1
  • Push event: 4
  • Create event: 1
Last Year
  • Release event: 1
  • Push event: 4
  • Create event: 1

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • Seurat * depends
  • shiny >= 1.6.0 depends
  • shinydashboard * depends
  • Biobase * imports
  • ComplexHeatmap >= 2.5.4 imports
  • DBI * imports
  • DT * imports
  • DataEditR >= 0.0.9 imports
  • Nebulosa * imports
  • RSQLite * imports
  • Rcpp * imports
  • SeuratWrappers >= 0.2.0 imports
  • SingleCellExperiment * imports
  • annotables >= 0.1.91 imports
  • checkmate * imports
  • clustree * imports
  • dplyr * imports
  • ensembldb * imports
  • formattable * imports
  • fs * imports
  • future * imports
  • genesorteR >= 0.4.3 imports
  • ggplotify * imports
  • ggpubr * imports
  • httr * imports
  • janitor * imports
  • magrittr * imports
  • megadepth * imports
  • patchwork * imports
  • plotly * imports
  • presto >= 1.0.0 imports
  • reticulate * imports
  • rhandsontable * imports
  • rlang * imports
  • sessioninfo * imports
  • shinyFiles * imports
  • shinyWidgets * imports
  • shinyhelper * imports
  • shinyjs * imports
  • tidyr * imports
  • tximport * imports
  • unglue * imports
  • waiter * imports
  • wiggleplotr >= 1.13.1 imports
  • ggplot2 * suggests
  • knitr * suggests
  • monocle3 >= 0.2.1 suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests
Dockerfile docker
  • openanalytics/r-ver 4.1.3 build