f-hamidlab / nuclearpy

MIT License
0 stars 0 forks source link

Grouping of markers #3

Closed fursham-h closed 2 years ago

fursham-h commented 2 years ago

I noticed that cells are now grouped for each marker using kmeans clustering. If I understand the function correctly, it:

  1. Samples n files and group ALL pixels from each channel by intensity
  2. It then obtain the threshold intensities for each kmeans cluster.
  3. Using the thresholds, it then categorise all pixels of the remaining images
  4. Lastly, for each cell in each channel, the mode cluster value will be assigned to it.

The workflow above feels complicated. I can understand why clustering was done on all pixels (including background) rather than the avg_intensity, but does it significantly give better clusters? Also, are kmeans cluster number based on pixel intensity?

fursham-h commented 2 years ago

I still wish to speed this part up. @Marcel-Salier do you know the idea behind grouping the cells by ICC intensities?

Marcel-Salier commented 2 years ago

The thing with the ICC channels is that they change quite e bit from one staining to other and we decided to clasified them in 5 stars instead and then take the population as + as we wish (let's say above 3, 4, etc) depending of what we consider biologically reasonable. I remember we agreed to use k-means to cluster but not in this complicated manner we have to definitely review that.

fursham-h commented 2 years ago

Yeah I totally understand the reason for clustering.

We should simplify this, let me rest something out and we can discuss.

fursham-h commented 2 years ago

Closing this issue since it is resolved