angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
71 stars 25 forks source link

Mixing score default thresholds #1015

Closed camisowers closed 1 year ago

camisowers commented 1 year ago

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

After testing the mixing score on 100 images and across various populations, we determined that total cell count was more useful to restrict rather than counts for the individual populations. As a result, we need to be more restrictive with the ratio of cells that we allow. The defaults that seem to work best are ratio_threshold=5 and cell_count_thresh=200.

For plotting the ratios in the mixing notebook, we should drop any bigger than 15. Large ratio values just mess with the x axis and makes the plots hard to interpret. Image

Image

How did you implement your changes

Change the threshold default values in both the notebook and the code. For the output file, only return one cell_ratio value per image, instead of both the pop1/pop2 ratio and pop2/pop1 ratio.

Adjust the notebook to

  1. Check for and automatically generate the specified neighbor matrix, rather than rely on the user to run the correct cell.
  2. Tweak the ratio plots to have x-limit 15 and the mixing histogram plot to always start at 0.

Remaining issues

N/A

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB