________ ___ ___ ________ ________ _________ ________ ___ ___ ________ ________
|\ __ \|\ \|\ \|\ __ \|\ ___ \|\___ ___\\ __ \|\ \|\ \|\ ___ \|\ ____\
\ \ \|\ \ \ \\\ \ \ \|\ \ \ \\ \ \|___ \ \_\ \ \|\ \ \ \\\ \ \ \\ \ \ \ \___|
\ \ \\\ \ \ \\\ \ \ __ \ \ \\ \ \ \ \ \ \ \ ____\ \ \\\ \ \ \\ \ \ \ \
\ \ \\\ \ \ \\\ \ \ \ \ \ \ \\ \ \ \ \ \ \ \ \___|\ \ \\\ \ \ \\ \ \ \ \____
\ \_____ \ \_______\ \__\ \__\ \__\\ \__\ \ \__\ \ \__\ \ \_______\ \__\\ \__\ \_______\
\|___| \__\|_______|\|__|\|__|\|__| \|__| \|__| \|__| \|_______|\|__| \|__|\|_______|
\|__|
QuantPunc is a Napari plugin for puncta analysis and quantification in 2D microscopy images. You can also find QuantPunc on Napari hub.
QuantPunc is currently in beta. Please report any problems to the issues page.
- Automated puncta labeling and counting
- Watershed segmentation
- Colocalization analysis
- Exportable counts and stats
You can install quantpunc via Napari's plugin manager:
- Click on "Plugins" in the toolbar.
- Click on "Install/Uninstall Plugins..." in the context menu.
- Type "quantpunc" in the searchbar.
- Click install.
You can also install quantpunc via pip:
pip install quantpunc
Here’s an ideal, high-level workflow for puncta segmentation and quantification. This is the recommended way of using QuantPunc. However, QuantPunc’s widgets are modularly designed so that they can be used as standalone tools. If this is your first time working with these tools, you can access a more in-depth guide here.
QuantPunc uses wavelet denoising and adaptive histogram equalization to enhance edge information and contrast in your image. If you feel that your image has sufficient contrast and minimal noise, feel free to skip this step.
There are two automated labeling methods. One of them uses skimage’s blob detection algorithms and the other uses a random forest classifier with features inspired by ilastik. You also have the option to only segment puncta within ROIs. You can provide your own ROIs or create them using a labels layer in Napari.
You can use Napari to create annotations or provide your own. After annotating your puncta and specifying your integer labels, you can then train the RFC. Click on Label puncta to segment your puncta.
Select your favorite blob detection algorithm from the Method dropdown menu. After parameterizing it, click on Label puncta.
You can remove any puncta labels you don’t want from automated segmentation by using Napari’s layer control toolbar. You also have the option to do a full manual segmentation using a labels layer and quantify your annotations after.
If your puncta exhibits lots of clumping, you can use the watershed tool to perform instance segmentation on your puncta labels layer. You can choose either to use a distance transform or Sobel filter to generate the elevation map.
You can either provide your own seed points or generate them using skimage’s blob counting algorithms with a low min and max sigma.
After you have a segmentation you’re happy with, select the image you want to quantify and click Count puncta. Make sure that your puncta labels layer is named after the image you’re quantifying with “_puncta” as its suffix, e.g., “your_img_puncta”.
Colocalization is measured using the intersection over union (IoU), aka the Jaccard Index. Select two puncta labels layers and click on Compute IoU.
Click on any of the tabs in the table widget to view different summaries of the puncta you’ve quantified. To export the tables as a csv for the layer you’ve selected, click on Save selected data. If you want to save the data for all the images you’ve quantified click on Save all data.
Contributions are very, very welcome. QuantPunc allows you to implement your own automated puncta labeler. Look in abstract_puncta_labeler to see what methods need to be implemented and default_puncta_labelers for examples. If you're interested in making it available to everyone else or have any other improvements, feel free to send a pull request!
Distributed under the terms of the BSD-3 license, QuantPunc is free and open source software
QuantPunc is still in beta, so bugs are to be expected. Please report any problems to the issues page.





