forked from neurogenomics/scKirby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
153 lines (95 loc) · 5.54 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
title: "Automated ingestion and conversion of various single-cell data formats"
author: "<img src='https://github.com/bschilder/scKirby/blob/main/inst/hex/scKirby.png?raw=true' height='400'><h4>Author: <i>Brian M. Schilder</i></h4>"
date: "<h4>Most recent update: <i>`r format( Sys.Date(), '%b-%d-%Y')`</i></h4>"
output:
github_document
---
```{r setup, include=F}
knitr::opts_chunk$set(echo = T)
```
# Intro
There's a lot of single-cell omics file/object formats out there, and not all tools support all of these formats. `scKirby` aims to make switching between these formats much easier by running several steps within a single function: `ingest_data()`. Alternatively, users can run any of these steps separately using the designated sub-functions.
1. **Read**: Automatically infers the file/object type and loads it (sub-function: `read_data()`).
2. **Convert**: Converts it to the desired file/object type (sub-function: `to_<format>`).
3. **Save**: Saves the converted file/object (sub-function: `save_data()`).
## [Documentation website](https://bschilder.github.io/scKirby)
## [Vignette: data ingestion](https://bschilder.github.io/scKirby/articles/scKirby.html)
## [Vignette: conda environments](https://bschilder.github.io/scKirby/articles/conda.html)
# i/o formats
## Supported input formats
- [SingleCellExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html)
- [SummarizedExperiment](https://bioconductor.org/packages/release/bioc/html/SummarizedExperiment.html)
- [HDF5SummarizedExperiment](https://bioconductor.org/packages/release/bioc/html/HDF5Array.html)
- [Seurat](https://satijalab.org/seurat/index.html)
- [H5Seurat](https://mojaveazure.github.io/seurat-disk/articles/convert-anndata.html)
- [anndata](https://github.com/rcannood/anndata)
- [loom](http://loompy.org/)
- [loomR](https://satijalab.org/loomR/loomR_tutorial.html)
- [CellDataSet/monocle](http://cole-trapnell-lab.github.io/monocle-release/docs/#getting-started-with-monocle)
- [ExpressionSet](https://www.rdocumentation.org/packages/Biobase/versions/2.32.0/topics/ExpressionSet)
- [list](https://github.com/NathanSkene/EWCE)
- [EWCE](https://github.com/NathanSkene/EWCE)
- [matrix](https://cran.r-project.org/web/packages/Matrix/index.html)
- [sparseMatrix (dgTMatrix/dgCMatrix)](https://slowkow.com/notes/sparse-matrix/)
- [DelayedArray](https://petehaitch.github.io/BioC2020_DelayedArray_workshop/articles/Effectively_using_the_DelayedArray_framework_for_users.html)
## Supported output formats
- [SingleCellExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html)
- [HDF5SummarizedExperiment](https://bioconductor.org/packages/release/bioc/html/HDF5Array.html)
- [Seurat](https://satijalab.org/seurat/index.html)
- [H5Seurat](https://mojaveazure.github.io/seurat-disk/articles/convert-anndata.html)
## Planned output formats
- [anndata](https://github.com/rcannood/anndata)
- [loom](http://loompy.org/)
- [CellDataSet/monocle](http://cole-trapnell-lab.github.io/monocle-release/docs/#getting-started-with-monocle)
**Notes**:
- For exporting to additional formats, see these following packages:
+ [sceasy](https://github.com/cellgeni/sceasy)
+ [zellkonverter](https://theislab.github.io/zellkonverter/articles/zellkonverter.html)
- Currently, some (but not all) conversions carry over:
+ Multiple assays per experiment.
+ Additional objects like dimensionality reduction projections (e.g. PCA, tSNE, UMAP) or graphs (e.g. K-nearest neighbors). This feature will be added in the future.
# Installation
```{r Installation, eval=FALSE}
if(!"remotes" %in% rownames(install.packages())){install.packages("remotes")}
remotes::install_github("bschilder/scKirby")
```
# Quick examples
Here are several quick examples of how one can use `scKirby`. For a complete list of examples please see the [documentation website](https://bschilder.github.io/scKirby).
```{r Examples, message=FALSE, warning=FALSE}
library(scKirby)
```
## Ingest list
`scKirby` can ingest a named list (i.e. `list(exp=..., annot=...)`) with the following items:
- `exp`: Expression matrix with *rows/genes x cols/cells*.
Can be a variety of matrix classes, including dense or sparse.
- `annot`: Cell annotation `data.frame` with one cell per row.
`rownames(annot)` should be the same as `colnames(exp)`.
This happens to be the format that the example data in [`EWCE`](https://github.com/NathanSkene/EWCE) uses, but any user-supplied data will work.
### As `SingleCellExperiment`
```{r EWCElist}
data("example_EWCElist")
sce <- ingest_data(obj=example_EWCElist)
```
### As `Seurat`
```{r}
seurat <- ingest_data(obj=example_EWCElist,
output_type = "Seurat")
```
## Ingest Seurat
### As `SingleCellExperiment`
In-memory
```{r Seurat}
data("example_seurat")
sce <- ingest_data(obj=example_seurat)
```
# Conda environments
## Updating Seurat objects
Seurat's `UpdateSeuratObject()` can only update objects from the version immediately previous to the version of Seurat you currently have installed (e.g. Seurat v2 --> v3). This means you can't import an object created in Seurat v1 and directly upgrade it to Seurat v3. We have provided yaml files when can be used to create separate envs for each version of Seurat [here](https://github.com/bschilder/scKirby/tree/main/inst/conda).
For more details, see the [scKirby conda env tutorial](https://bschilder.github.io/scKirby/articles/conda.html).
# Session Info
<details>
```{r Session Info}
utils::sessionInfo()
```
</details>