[EXPERIMENTAL]: Integrate cp-measure
Associated notebook: https://github.com/scverse/squidpy_notebooks/blob/add_cpmeasure_notebook/tutorials/tutorial_cpmeasure.ipynb
Note to self:
-
Doesn't correctly parse str names of channels
INFO Calculating 'cpmeasure' correlation features between channels '0' and '1'. -
Should show, for permutations, the total number of iterations (in general, the progress bar should contain a (step n out m) readout so one can know how far in the featurisation is. Can easily take more than a day given the amount of cells and cpu_cores. Should also maybe show the total runtime so far for the steps that are done
-
Fails if labels and image don't have the same dimensions, despite transformation to align them
Tried it out and it worked very well!
One quality of life feature would be the ability to specify channels that should be measured.
Often times there are channels that are not informative / used only for segmentation and those slow down the calculations.
Ah I noticed another thing.
For the created morphology table .uns["spatialdata_attrs"] needs to be set, otherwise this runs into problem when querying the Spatialdata afterwards.