SydneyBioX / MoleculeExperiment

https://sydneybiox.github.io/MoleculeExperiment/
Other
11 stars 0 forks source link

readXenium() does not keep gene metadata on 10x public Xenium raw data download #7

Open estellad opened 12 months ago

estellad commented 12 months ago

Hi there,

Thank you for your package! Currently the github dev version of the package (1.1.3) works for me to readXenium() and countMolecules().

The readXenium() function reads in an object including all 541 features, including the "negative control" and "blank codeword" feature types. However, for modeling we should only need the Gene Expression feature type, which would result in a smaller number of genes, e.g. 248 genes for mouse brain and 313 genes for human breast cancer, excluding negative control probes. These gene metadata of feature type is stored in the cell_feature_matrix.h5 file or the /cell_feature_matrix folder, and should be stored as the rowData() of the coerced SPE object. The current coerced SPE object has empty rowData().

Rather than an issue, this is an important enhancement suggestion to retain the rowData(spe)$Type from .h5, so that we can easily subset to the gene of interest.

Data download I am referring to:

  1. High resolution mapping of the breast cancer tumor microenvironment using integrated single cell, spatial and in situ analysis of FFPE tissue>In Situ Sample 1, Replicate 1
  2. Fresh Frozen Mouse Brain for Xenium Explorer Demo > Tiny subset

Thank you for your help!!

Sincerely, Estella

estellad commented 11 months ago

Just an update that I submitted a pull request to SpatialExperiment pacakge for direct loading of Xenium, CosMX, or MERSCOPE to SPE at single-cell level resolution. The input files (no need of transcript counts and cell boundaries but need count matrix and spatial coords) are difference compared to MoleculeExperiment.