from_cells2stats_to_h5mu
Convert spatial data resulting from Aviti Teton sequencers that have been processed by the Element Biosciences cells2stats workflow to H5MU format.
This component processes cells2stats count matrices to create a standardized H5MU file for downstream analysis.
The component reads:
Parquet file containing the count matrix and metadata
Panel.json with target and batch information
And outputs an H5MU file with:
Count data as the main .X matrix
Spatial coordinates in obsm
Cell Paint intensities in obsm (optional)
Nuclear count data as a layer (optional)
CellProfiler morphology metrics in obsm (optional)
Unassigned targets in obsm (optional)
Python
from_cosmx_to_h5mu
Converts the output from NanoString experiment into a MuData objcet.
<dataset_id>_exprMat_file.csv: File containing the counts.
<dataset_id>_metadata_file: File containing the spatial coordinates and additional cell-level metadata.
<dataset_id>_fov_file.csv: File containing the coordinates of all the fields of view.
In addition to reading the regular Nanostring output, it loads CellComposite and CellLabels directories, if present,
containing the images.
Python
from_cosmx_to_spatialexperiment
Creates a SpatialExperiment object from the downloaded unzipped CosMx directory for Nanostring
CosMx spatial gene expression data, and saves it as a SpatialExperiment object.
The constructor assumes the downloaded unzipped CosMx Folder has the following structure:
Mandatory files
· | — *_exprMat_file.csv
· | — *_metadata_file.csv
Optional files, by default added to the metadata() as a list of paths (will be converted to parquet):
· | —*_fov_positions_file.csv
· | — *_tx_file.csv
· | — *_polygons.csv
R
from_spatialdata_to_h5mu
Reads in the Tables field stored in a SpatialData object and converts it to an h5mu file.
Python
from_xenium_to_h5mu
Converts the output from Xenium to a single .h5mu file, where the count matrix is written to the rna modality.
The following files are expected to be present in the Xenium output bundle:
├── cell_feature_matrix.h5
├── cells.parquet
├── experiment.xenium
└── metrics_summary.csv
Python
from_xenium_to_spatialdata
Converts the output from 10X Genomics Xenium dataset into a SpatialData objcet.
By default, the following files will be converted:
experiment.xenium: File containing specifications.
nucleus_boundaries.parquet: Polygons of nucleus boundaries.
cell_boundaries.parquet: Polygons of cell boundaries.
transcripts.parquet: File containing transcripts.
cell_feature_matrix.h5: File containing cell feature matrix.
cells.parquet: File containing cell metadata.
morphology_mip.ome.tif: File containing morphology mip.
morphology_focus.ome.tif: File containing morphology focus.
Python
from_xenium_to_spatialexperiment
Creates a SpatialExperiment object from the downloaded unzipped Xenium Output Bundle directory
for 10x Genomics Xenium spatial gene expression data, and saves it as a SpatialExperiment object.
The constructor assumes the downloaded unzipped Xenium Output Bundle has the following structure:
Mandatory files
· | — cell_feature_matrix.h5
· | — cells.parquet
Optional files, by default added to the metadata() as a list of paths (will be converted to parquet):
· | — transcripts.parquet
· | — cell_boundaries.parquet
· | — nucleus_boundaries.parquet
· | — experiment.xenium
R
subset_cosmx
Filters the output from NanoString experiment to keep only a subset of the fields of view.
Expected input folder structure:
path/to/dataset/
├── CellComposite/
├── CellLabels/
├── CellOverlay/
├── CompartmentLabels/
├── <dataset_id>_exprMat_file.csv
├── <dataset_id>_fov_positions_file.csv
├── <dataset_id>_metadata_file.csv
└── <dataset_id>_tx_file.csv
Python