Title: | Import and represent Xenium data from the 10X Xenium Analyzer |
---|---|
Description: | The package allows users to readily import spatial data obtained from the 10X Xenium Analyzer pipeline. Supported formats include 'parquet', 'h5', and 'mtx' files. The package mainly represents data as SpatialExperiment objects. |
Authors: | Marcel Ramos [aut, cre] |
Maintainer: | Marcel Ramos <[email protected]> |
License: | Artistic-2.0 |
Version: | 0.99.8 |
Built: | 2025-02-22 03:27:36 UTC |
Source: | https://github.com/bioc/XeniumIO |
The package allows users to readily import spatial data obtained from the 10X Xenium Analyzer pipeline. Supported formats include 'parquet', 'h5', and 'mtx' files. The package mainly represents data as SpatialExperiment objects.
Maintainer: Marcel Ramos [email protected] (ORCID)
Other contributors:
Dario Righelli [contributor]
Estella Dong [contributor]
Useful links:
This class is a composed class of TENxFileList which can contain a list of TENxFile objects for the cell-feature matrix. It is meant to handle a single Xenium sample from 10X Genomics.
TENxXenium( resources, xeniumOut, sample_id = "sample01", format = c("mtx", "h5"), boundaries_format = c("parquet", "csv.gz"), spatialCoordsNames = c("x_centroid", "y_centroid"), ... ) ## S4 method for signature 'TENxXenium,ANY,ANY' import(con, format, text, ...)
TENxXenium( resources, xeniumOut, sample_id = "sample01", format = c("mtx", "h5"), boundaries_format = c("parquet", "csv.gz"), spatialCoordsNames = c("x_centroid", "y_centroid"), ... ) ## S4 method for signature 'TENxXenium,ANY,ANY' import(con, format, text, ...)
resources |
A TENxFileList object or a file path to the tarball containing the matrix / assay data resources. |
xeniumOut |
|
sample_id |
|
format |
The format of the output. If missing and |
boundaries_format |
|
spatialCoordsNames |
|
... |
In the constructor, additional arguments passed to TENxFileList; otherwise, not used. |
con |
The connection from which data is loaded or to which data is
saved. If this is a |
text |
If |
Note that one can provide a ref
argument to import
method which
will get passed to the internal splitAltExps
operation. This allows one
to set a mainExpName
in the output object.
A SpatialExperiment object
import(con = TENxXenium, format = ANY, text = ANY)
: Import Xenium Analyzer data
resources
A TENxFileList or TENxH5 object containing the cell feature matrix.
boundaries
Either a TENxSpatialParquet or TENxSpatialCSV object containing the spatial boundaries data.
coordNames
character()
A vector specifying the names
of the columns in the spatial data containing the spatial coordinates.
sampleId
character(1)
A scalar specifying the sample identifier.
colData
TENxSpatialParquet
A
TENxSpatialParquet object containing
the spatial coordinates data.
metadata
XeniumFile
A XeniumFile object
containing the metadata information.
showClass("TENxXenium") zipfile <- paste0( "https://mghp.osn.xsede.org/bir190004-bucket01/BiocXenDemo/", "Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny_outs.zip" ) destfile <- XeniumIO:::.cache_url_file(zipfile) outfold <- file.path( tempdir(), tools::file_path_sans_ext(basename(zipfile)) ) if (!dir.exists(outfold)) dir.create(outfold, recursive = TRUE) unzip( zipfile = destfile, exdir = outfold, overwrite = FALSE ) TENxXenium(xeniumOut = outfold) |> import(ref = "Gene Expression")
showClass("TENxXenium") zipfile <- paste0( "https://mghp.osn.xsede.org/bir190004-bucket01/BiocXenDemo/", "Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny_outs.zip" ) destfile <- XeniumIO:::.cache_url_file(zipfile) outfold <- file.path( tempdir(), tools::file_path_sans_ext(basename(zipfile)) ) if (!dir.exists(outfold)) dir.create(outfold, recursive = TRUE) unzip( zipfile = destfile, exdir = outfold, overwrite = FALSE ) TENxXenium(xeniumOut = outfold) |> import(ref = "Gene Expression")
This class is a minimal class to represent Xenium metadata.
It is dedicated to importing experiment.xenium
metadata files. It uses
the jsonlite
package to import the metadata.
XeniumFile(resource) ## S4 method for signature 'XeniumFile,ANY,ANY' import(con, format, text, ...)
XeniumFile(resource) ## S4 method for signature 'XeniumFile,ANY,ANY' import(con, format, text, ...)
resource |
|
con |
The connection from which data is loaded or to which data is
saved. If this is a |
format |
The format of the output. If missing and |
text |
If |
... |
Parameters to pass to the format-specific method. |
A XeniumFile object
import(con = XeniumFile, format = ANY, text = ANY)
: Import Xenium metadata
showClass("XeniumFile")
showClass("XeniumFile")