Unverified Commit 92c1a9c3 authored by Haojia Wu's avatar Haojia Wu Committed by GitHub
Browse files

Update README.md

parent 6c9332d1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
This R package allows users to visualize the single cell data on the R object or output files generated by Seurat. It is currently under active development. 

## Installation
plot1cell R package can be easily installed from Github using devtools. Please make sure you have installed <a href="https://satijalab.org/seurat/">Seurat 4.0</a>, <a href="https://github.com/jokergoo/circlize">circlize</a> and <a href="https://github.com/jokergoo/ComplexHeatmap">ComplexHeatmap</a> packages.
```plot1cell``` R package can be easily installed from Github using devtools. Please make sure you have installed <a href="https://satijalab.org/seurat/">Seurat 4.0</a>, <a href="https://github.com/jokergoo/circlize">circlize</a> and <a href="https://github.com/jokergoo/ComplexHeatmap">ComplexHeatmap</a> packages.

```
devtools::install_github("TheHumphreysLab/plot1cell")
@@ -20,7 +20,7 @@ devtools::install_github(dev.packages)
```

## Usage
We provide some example codes to help generate figures from user's provided Seurat object. The Seurat object input to plot1cell should be a final object with complete clustering and cell type annotation. If a seurat object is not available, we suggest to use the demo data from Satija's lab (https://satijalab.org/seurat/articles/integration_introduction.html). To demonstrate the plotting functions in plot1cell, we re-created a Seurat object from our recent paper <a href="https://www.pnas.org/doi/10.1073/pnas.2005477117">Kirita et al, PNAS 2020</a> by integrating the count matrices we uploaded to GEO ([GSE139107](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE139107)).
We provide some example codes to help generate figures from user's provided Seurat object. The Seurat object input to ```plot1cell``` should be a final object with complete clustering and cell type annotation. If a seurat object is not available, we suggest to use the demo data from Satija's lab (https://satijalab.org/seurat/articles/integration_introduction.html). To demonstrate the plotting functions in plot1cell, we re-created a Seurat object from our recent paper <a href="https://www.pnas.org/doi/10.1073/pnas.2005477117">Kirita et al, PNAS 2020</a> by integrating the count matrices we uploaded to GEO ([GSE139107](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE139107)).
```
library(plot1cell)
iri.integrated <- Install.example() 
@@ -72,7 +72,7 @@ dev.off()
```
![alt text](https://github.com/HaojiaWu/Plot1cell/blob/master/data/dotplot_single_split.png) <br />

To visualize the same gene on multiple group factors, simply add more group factor IDs to the "groups" argument.
To visualize the same gene on multiple group factors, simply add more group factor IDs to the ```groups``` argument.
```
png(filename =  'dotplot_more_groups.png', width = 8, height = 6,units = 'in', res = 100)
complex_dotplot_single(seu_obj = iri.integrated, feature = "Havcr1",groups= c("Group","Replicates"))
@@ -80,7 +80,7 @@ dev.off()
```
![alt text](https://github.com/HaojiaWu/Plot1cell/blob/master/data/dotplot_more_groups.png) <br />

Each group factor can be further splitted by its own factor if the ```splitby argument``` is provided. Note that in this case, the order of the group factors needs to match the order of splitby factors.
Each group factor can be further splitted by its own factor if the ```splitby``` argument is provided. Note that in this case, the order of the group factors needs to match the order of splitby factors.
```
iri.integrated@meta.data$ReplicateID<-plyr::mapvalues(iri.integrated@meta.data$Replicates, from = names(table((iri.integrated@meta.data$Replicates))), to = c(rep("Rep1",3),rep("Rep2",3), rep("Rep3",1)))
iri.integrated@meta.data$ReplicateID<-as.character(iri.integrated@meta.data$ReplicateID)
@@ -111,7 +111,7 @@ dev.off()

![alt text](https://github.com/HaojiaWu/Plot1cell/blob/master/data/vlnplot_single.png) <br />

Similar to complex_dotplot_single, the complex_vlnplot_single function also allows splitting the group factor by another factor with the argument "splitby".
Similar to complex_dotplot_single, the complex_vlnplot_single function also allows splitting the group factor by another factor with the argument ```splitby```.
```
png(filename =  'vlnplot_single_split.png', width = 4, height = 6,units = 'in', res = 100)
complex_vlnplot_single(iri.integrated, feature = "Havcr1", groups = "Group",celltypes   = c("PTS1" ,   "PTS2"  ,  "PTS3"  ,  "NewPT1" , "NewPT2"), splitby = "Phase")