library(knitr)
opts_chunk$set(fig.align = "center", 
               out.width = "90%",
               fig.width = 6, fig.height = 5.5,
               dev.args=list(pointsize=10),
               par = TRUE, # needed for setting hook 
               collapse = TRUE, # collapse input & ouput code in chunks
               warning = FALSE)

knit_hooks$set(par = function(before, options, envir)
  { if(before && options$fig.show != "none") 
       par(family = "sans", mar=c(4.1,4.1,1.1,1.1), mgp=c(3,1,0), tcl=-0.5)
})
set.seed(1) # for exact reproducibility
library(seuratter)

Introduction

seuratter is an R package to provide an additional perspective to analyzing single cell RNA seq transcriptomic data through generation of a graph. The current workflow provides information on each cluster but lacks the information that portrays the relationship between those clusters, in the context of gene expression. Therefore, seuratter attempts to solve this by plotting a network graph between the clusters to determine how related each pair of clusters are by examining similarity in gene expression profile.

This document gives a quick tour of seuratter (version r packageVersion("mclust")) functionalities. It was written in R Markdown, using the knitr package for production. See help(package="seuratter") for further details and references provided by citation("seuratter").

Data

The data object used for this package is a Seurat object which can be easily generated using the package, Seurat. For the purpose of this introduction, an example Seurat data was generated using 10X genomics data.

Determining Dimensionality

The resulting graph should indicate which dimensionilty was determined to cover data that was indicated by the cutoff, with an arrow. You may use this for downstream Seurat analysis for clustering.

data("elbow_plot_data")
determine_dimensionality(elbow_plot_data, 0.7)

Cluster gene expression relationship analysis

This workflow analyzes the gene expression profiles between each pair of clusters to generate a network graph. The color indicates how much or less similarity is observed between each pair. The subsequent line of code will generate a bar plot to indicate numerical data of gene expression similarity. This is relative to the most similar pair of clusters so 1.0 indicates that that cluster pair has the highest similarity in the data. All the other values are relative to this pair.

data("gene_comparison_matrix")
graph <- draw_cluster_gene_relations(gene_comparison_matrix)
plot_cluster_relations(graph)

References:

ahmohamed. (February 14 2015). How to scale edge colors in igraph?. Stackoverflow. Retrieved from: https://stackoverflow.com/questions/28366329/how-to-scale-edge-colors-in-igraph

Butler et al. (April 2 2018). Integrating single-cell transcriptomic data across different conditions, technologies, and species. Natural Biotechnology, 36, 411-420. https://doi.org/10.1038/nbt.4096

Csárdi G and Nepusz T. (2006). The igraph software package for complex network research. Inter- Journal Complex Systems, 1695.

mnel. (November 13 2012). Gradient legend in base. Stackoverflow. Retrieved from: https://stackoverflow.com/questions/13355176/gradient-legend-in-base

Scrucca L., Fop M., Murphy T. B. and Raftery A. E. (2016) mclust 5: clustering, classification and density estimation using Gaussian finite mixture models The R Journal 8/1, pp. 205-233 https://cran.r-project.org/web/packages/mclust/vignettes/mclust.html

Stuart et al. (June 6 2019). Comprehensive Integration of Single-Cell Data. Cell, 177 (7): P1888- 1902.E21. https://doi.org/10.1016/j.cell.2019.05.031



sotaro0214/seuratter documentation built on Dec. 8, 2019, 4:24 p.m.