ExportSeurat | R Documentation |
Export SeuratObject to Other Formats.
ExportSeurat(
seu.obj,
assay = NULL,
reduction = NULL,
to = c("SCE", "AnnData", "CellDataSet", "cell_data_set", "loom"),
anndata.file = NULL,
loom.file = NULL,
conda.path = NULL,
...
)
seu.obj |
A seurat object. |
assay |
Which assay to use. Default: NULL (get with |
reduction |
Name of DimReduc to set to main reducedDim in cds. |
to |
The target format, chosen from "SCE" (SingleCellExperiment), "AnnData", "CellDataSet", "cell_data_set", "loom". Default: "SCE". |
anndata.file |
File used to save AnnData results. Default: NULL. |
loom.file |
File used to save loom results. Default: NULL. |
conda.path |
Conda environment path, used when |
... |
Parameter for |
Object corresponding to to
.
## Not run:
library(Seurat)
# export to SingleCellExperiment
sce.obj <- ExportSeurat(seu.obj = pbmc_small, assay = "RNA", to = "SCE")
# export to CellDataSet
cds.obj <- ExportSeurat(seu.obj = pbmc_small, assay = "RNA", reduction = "tsne", to = "CellDataSet")
# export to cell_data_set
cds3.obj <- ExportSeurat(seu.obj = pbmc_small, assay = "RNA", to = "cell_data_set")
# export to AnnData, need users to provide the conda path and the output file
ExportSeurat(
seu.obj = pbmc_small, assay = "RNA", to = "AnnData", conda.path = "/path/to/anaconda3",
anndata.file = "/path/to/pbmc_small.h5ad"
)
# export to loom, need users to provide the output file
ExportSeurat(
seu.obj = pbmc_small, assay = "RNA", to = "loom",
loom.file = "/path/to/pbmc_small.loom"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.