Closed ibseq closed 3 years ago
Hi!
Yes, the method generally works with 10X data, although 10X data is more sparse than other types of data, so in some 10X datasets, more cells are left Unassigned. To extract the data from the Seurat object simply do:
counts = seurat@assays$RNA@counts
input = SingleCellExperiment(assays = list(counts = counts),
reducedDims = SimpleList(UMAP = seurat@reductions$umap@cell.embeddings))
This should work for Seurat version >3.0, and you need to substitute seurat
with the name of your seurat object.
If you stored you data in something other than the standard RNA
field, you need to change the RNA
in line one to the custom field name. The same goes for UMAP
, this should be changed if another dimensional reduction is used, e.g. tSNE
Other than that, you can just follow the provided vignette.
Does this help?
Best, Jurrian
Alternatively, you can use as.SingleCellExperiments in Seurat
Convert Seurat to SingleCellExperiments
scrna.sce <- as.SingleCellExperiment(YourSeuratObject)
Load sample
counts_data <- assay(scrna.sce) tsne_data <- reducedDim(scrna.sce)[,1:2]
Load reference
load(file = "./CHETAH_TME_reference.Rdata") counts_ref <- assay(reference) celltypes_ref <- reference$celltypes
This works for me.
Hi!
Yes, the method generally works with 10X data, although 10X data is more sparse than other types of data, so in some 10X datasets, more cells are left Unassigned. To extract the data from the Seurat object simply do:
counts = seurat@assays$RNA@counts input = SingleCellExperiment(assays = list(counts = counts), reducedDims = SimpleList(UMAP = seurat@reductions$umap@cell.embeddings))
This should work for Seurat version >3.0, and you need to substitute
seurat
with the name of your seurat object. If you stored you data in something other than the standardRNA
field, you need to change theRNA
in line one to the custom field name. The same goes forUMAP
, this should be changed if another dimensional reduction is used, e.g.tSNE
Other than that, you can just follow the provided vignette.Does this help?
Best, Jurrian
I guess that the reference of CHETAH was generated with tSNE, should we use tSNE rather than UMAP? Is there any difference between using tSNE and UMAP?
Hi shengqh,
t-SNE and UMAP are algorithms that try to visually represent as much of the variance in a set of samples as possible in two dimensions. This is completely separated from what CHETAH does. t-SNE/UMAP plots can be used (e.g. with the DimPlot of Seurat, or the PlotCHETAH function in this package) to visualize the outcome of CHETAH. Whether you use t-SNE or UMAP will therefore not influence the results of CHETAH, but only the way the data (your cells) are visualized.
I hope that is clear. If you have more questions, please let me know.
Hi shengqh,
t-SNE and UMAP are algorithms that try to visually represent as much of the variance in a set of samples as possible in two dimensions. This is completely separated from what CHETAH does. t-SNE/UMAP plots can be used (e.g. with the DimPlot of Seurat, or the PlotCHETAH function in this package) to visualize the outcome of CHETAH. Whether you use t-SNE or UMAP will therefore not influence the results of CHETAH, but only the way the data (your cells) are visualized.
I hope that is clear. If you have more questions, please let me know.
Thank you so much.
hi can this be used on 10x data processed using Seurat. if so, what input should be using? thanks ibseq