...
|
...
|
@@ -204,8 +204,8 @@ plot(sce$decontX_contamination, sce.delta$decontX_contamination,
|
204
|
204
|
abline(0, 1, col = "red", lwd = 2)
|
205
|
205
|
```
|
206
|
206
|
|
207
|
|
-## Integration with other packages such as Seurat and singleCellTK
|
208
|
|
-You can integrate decontX into your scRNA-seq analysis pipelines, such as one provided by [Seurat](https://cran.r-project.org/web/packages/Seurat/index.html).
|
|
207
|
+## Integration with packages such as Seurat and singleCellTK
|
|
208
|
+You can integrate decontX into your scRNA-seq analysis pipelines, such as the one provided by [Seurat](https://cran.r-project.org/web/packages/Seurat/index.html). Both decontX and Seurat takes input count matrix, although the decontaminated matrix of decontX consists of floating point numbers. As heuristics, you can round the decontaminated matrix to integers before applying it to your Seurat pipeline.
|
209
|
209
|
|
210
|
210
|
```{r seuratIntegration, eval=FALSE}
|
211
|
211
|
library(Seurat)
|
...
|
...
|
@@ -217,12 +217,21 @@ sce <- SingleCellExperiment(list(counts = counts)).
|
217
|
217
|
sce <- decontX(sce)
|
218
|
218
|
|
219
|
219
|
# Retrieve decontaminated matrix, round to integer, and convert to Seurat object
|
220
|
|
-countsDecontaminated <- decontXcounts(sce)
|
221
|
|
-seuratObject <- CreateSeuratObject(round(countsDecontaminated))
|
222
|
|
-
|
|
220
|
+decontaminated.matrix <- decontXcounts(sce)
|
|
221
|
+decontaminated.counts <- round(decontaminated.matrix)
|
|
222
|
+seuratObject <- CreateSeuratObject(decontaminated.counts)
|
223
|
223
|
```
|
224
|
224
|
|
225
|
225
|
|
|
226
|
+To import datasets into SingleCellExperiment object, the [singleCellTK](https://bioconductor.org/packages/release/bioc/html/singleCellTK.html) package has several importing functions for different preprocessing tools including CellRanger, STARsolo, BUStools, Optimus, DropEST, SEQC, and Alevin/Salmon. For example, the following code can be used as a template to read in the filtered and raw matrices for multiple samples processed with CellRanger:
|
|
227
|
+
|
|
228
|
+```{r singleCellTKIntegration, eval=FALSE}
|
|
229
|
+library(singleCellTK)
|
|
230
|
+
|
|
231
|
+sce <- importCellRanger(sampleDirs = c("path/to/sample1/", "path/to/sample2/"))
|
|
232
|
+sce.raw <- importCellRanger(sampleDirs = c("path/to/sample1/", "path/to/sample2/"), dataType = "raw")
|
|
233
|
+```
|
|
234
|
+
|
226
|
235
|
|
227
|
236
|
# Session Information
|
228
|
237
|
|