wanglab-broad / ClusterMap

ClusterMap for multi-scale clustering analysis of spatial gene expression
GNU General Public License v3.0
39 stars 11 forks source link

Questions and Enhancements about ClusterMap #6

Open rocketeer1998 opened 2 years ago

rocketeer1998 commented 2 years ago

Hello @heihaizhengdong , I’m very interested in ClusterMap. I’d like to ask several questions which are crucial to improving ClusterMap

Questions

  1. Is the position of the centroid determined by DAPI image? Is the centroid position of a cell equal to the DAPI position of a cell? What is the function of DAPI image in cell segmentation?
  2. What’s the unit of xy_radiusand z_radius? μm? How can one know the area of an individual cell? Can I extract this information from the AnnDataproduced by ClusterMap pipeline?
  3. In general, I processed my data using the ‘split-and-stitch’ pipeline. Is a spot in an individual tile image equal to a fluorescent signal? If so, why do spots form a cluster-like pattern even if they are not so crowded in the scatter distribution plot? Is it a matter of plotting, which means the spots will be clearly separated after I decrease the size of a spot when visualizing? image
  4. How to improve the accuracy of cell segmentation? A tactic I commonly used to downsize a cell was to decrease threshand decrease min_spot_per_cell.

Enhancements

  1. Explain some important elements in model.cell_adata so users can easily interoperate it with other tool, like scanpy. In addition, there is an error when I try to export ClusterMap AnnData.h5ad file using adata.write which says TypeError: 0 of type <class 'int'> is an invalid key. Should be str. Above error raised while writing key 'var' of <class 'h5py._hl.files.File'> from /.. I try to resolve this by adata = ad.AnnData(model.cell_adata.X, obs=model.cell_adata.obs,var=model.cell_adata.var) but it is still not working. Any recommendation?
  2. How to change the color of a convex hull to make it be in accordance with unsupervised clustering results after scanpy pipeline?

In a word, ClusterMap is well performed in analyzing spatial transcriptomics data. Thanks again for your excellent work. And I would appreciate it if we can discuss more details about ClusterMap.

yichunher commented 2 years ago

Hi, thanks so much for asking! 1.The position of the centroid represents the 'center'/density peak of each cell. It's neither determined by DAPI image nor equal to the DAPI position of a cell. The function of DAPI image is to help cell segmentation in the tissue of high cell density and variable nuclear/cytosolic distribution of RNAs.

  1. The unit of xy_radius and z_radius is pixel. The area of an individual cell depends on the definition. For example, you can form a convex hull for each cell from RNA spots and compute the area of the convex hull.
  2. RNA spots in each individual tile are identified by multiple rounds of imaging. The cluster-like pattern may depend on tissue types, spatial transcriptomic protocols, # of genes, etc.. In most STARmap data, on the cell-level, a cluster-like pattern can be observed in most cells.
  3. try to set dapi_grid_interval to 3/4 or lower? Hope these answer your questions.
rocketeer1998 commented 2 years ago

Thanks for your reply!