Export10X | R Documentation |
Exports the counts matrix, features and barcodes from a Seurat object in a 10X-like format, with an additional metadata matrix in tsv format, that can be augmented with dimensionality reduction coordinates. The exported data is in standard mtx and tsv formats (sparse matrix matrix market format and tab separated values respectively), which facilitates sharing and reuse, and can be re-imported in a Seurat object with Import10X, or directly in matrices/data frames with e.g. Matrix::readMM and readr::read_tsv.
Export10X(
object,
dir,
meta_columns = "all",
append_reductions = "all",
gzip = T,
rows = "features.tsv",
cols = "barcodes.tsv",
counts = "matrix.mtx",
meta = "metadata.tsv",
layer = "counts",
assay = "RNA"
)
object |
Seurat object. |
dir |
character(1). The directory in which the data should be exported. Created if non-existent. |
meta_columns |
character(n). Metadata columns that should be exported from the Seurat Object. Can also be "all", or empty vector c() for none. Default: "all". |
append_reductions |
character(n). Name of the dimensionality reductions that should be included with the metadata. Default: "all". |
gzip |
logical(1). Should the exported files be compressed. If compressed, the filenames are appended with the extension ".gz". Default: TRUE |
rows |
character(1). Name of the exported file that lists row names. Default: features.tsv |
cols |
character(1). Name of the exported file that lists column names. Default: barcodes.tsv |
counts |
character(1). Name of the exported file that contains the sparse raw count matrix. Default: matrix.mtx |
meta |
character(1). Name of the exported file that contains the metadata. Default: metadata.tsv |
layer |
character(1). Name of the layer in the Seurat object from which the count matrix is exported. Default: counts |
assay |
character(1). Name of the assay in the Seurat object from which the count matrix is exported. Default: RNA |
# By default keeping all the metadata columns, and all dimensionality reductions.
Export10X(SeuratObject, "MyDir")
# Include only two custom metadata columns, two dimensionality reductions, and do not compress the matrices.
Export10X(SeuratObject, "MyDir", c("nFeature_RNA", "mito.content"), c("pca","umap"), gzip=FALSE)
# Export normalized CiteSeq data rather than raw RNA counts, and no metadata:
Export10X(SeuratObject, "MyDir", meta_columns = c(), layer="data", assay="CiteSeq")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.