How to get [“label”, “centroid”] for each cell with cellpose

dear squidpy dev,
again thanks for your useful work
I am struggling getting some information after cellpose nuclei deconvolution
I am following this tuto:
squidpy_reproducibility/hne_image_analysis.ipynb at master · theislab/squidpy_reproducibility (
When it comes to: calculate features: segmentation and summary

  1. in addition to fraction of area covered by cells, number of cells I would like to get the positions of the nuclei. I guess I would have to add “props”: [“label”, “centroid”] in features_kwargs but I don’t understand how to mix it with the custom function…
  2. Could you please explain me what is the
    ‘spot_scale’: 2, and ‘scale’: 1.0,?
    Many thanks !!

Hi @sophieRAIBAUD

  1. Next to the other args you pass features="custom" and features_kwargs={'custom':{'func': <your_function>}} to, where <your_function> is the custom function that retrieves the nuclei positions.

  2. 'spot_scale': float and 'scale':float are kwargs passed to and respectively. spot_scale is the scaling factor for the spot diameter and scale rescales the crop.

If there are further questions feel free to ask here.