{"name":"quantpunc","display_name":"QuantPunc","visibility":"public","icon":"","categories":["Annotation","Image Processing","Measurement","Registration","Segmentation","Utilities","Visualization"],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"quantpunc.create_puncta_counter","title":"Initializes QuantPunc","python_name":"quantpunc.quantpunc_widget:QuantPunc","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"quantpunc.create_puncta_counter","display_name":"QuantPunc","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"quantpunc","version":"0.0.1.post1","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A Napari plugin for puncta analysis and quantification in 2D microscopy images.","description":"# QuantPunc\n\n[![PyPI](https://img.shields.io/pypi/v/quantpunc.svg?color=green)](https://pypi.org/project/quantpunc)\n[![Python Version](https://img.shields.io/pypi/pyversions/quantpunc.svg?color=green)](https://python.org)\n[![License BSD-3](https://img.shields.io/pypi/l/quantpunc.svg?color=green)](https://github.com/tehahn/quantpunc/blob/main/LICENSE)\n\nQuantPunc is a Napari plugin for puncta analysis and quantification in 2D microscopy images. A brief overview of QuantPunc's workflow can be found below. \n\nA comprehensive guide to QuantPunc can be found at https://tehahn.github.io/quantpunc/.\n\nQuantPunc is currently in beta. Please report any problems to the [issues page].\n\n## Features\n1. Automated puncta labeling and counting\n2. Watershed segmentation\n3. Colocalization analysis \n4. Exportable counts and stats\n\n## Installation\nYou can install `quantpunc` via Napari's plugin manager:\n\n1. Click on \"Plugins\" in the toolbar.\n2. Click on \"Install/Uninstall Plugins...\" in the context menu.\n3. Type \"quantpunc\" in the searchbar.\n4. Click install.\n\nYou can also install `quantpunc` via [pip]:\n\n    pip install quantpunc\n\n## Puncta Quantification and Workflow\nHere’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 the more in-depth guide mentioned above [here].\n\n### 1. Preprocessing (optional but recommended)\nQuantPunc 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.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/preprocessing_example.gif\" \nalt=\"\" \nwidth=\"1000\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### 2. Automated labeling\nThere 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.\n\n### Random forest classifier (RFC)\nYou 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.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/rfc_example.gif\" \nalt=\"\" \nwidth=\"1000\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### Skimage blob detection\nSelect your favorite blob detection algorithm from the *Method* dropdown menu. After parameterizing it, click on *Label puncta*.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/skimage_blob_example.gif\" \nalt=\"\" \nwidth=\"1000\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### 3. Manual labeling\nYou 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.\n\n### 4. Watershed segmentation (optional)\nIf 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.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/watershed_example.gif\"\nalt=\"\" \nwidth=\"1000\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### Seed point generation\nYou can either provide your own seed points or generate them using skimage’s blob counting algorithms with a low min and max sigma.\n\n### 5. Puncta counting\nAfter 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”.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/counts_example.gif\" \nalt=\"\" \nheight=\"750\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### 6. Colocalization analysis (optional)\nColocalization is measured using the intersection over union (IoU), aka the Jaccard Index. Select two puncta labels layers and click on *Compute IoU*.\n\n<img \nsrc=\"https://raw.githubusercontent.com/tehahn/quantpunc/refs/heads/main/demo_imgs/coloc_example.gif\" \nalt=\"\" \nheight=\"750\"\nstyle=\"border-radius: 10px; max-width: 100%;\">\n\n### 7. Displaying stats and saving\nClick 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*.\n\n## Contributing\nContributions are very, very welcome. QuantPunc allows you to implement your own automated puncta labeler. Look in the Github repo at [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!\n\n## License\nDistributed under the terms of the [BSD-3] license,\nQuantPunc is free and open source software\n\n## Issues\nQuantPunc is still in beta, so bugs are to be expected. Please report any problems to the [issues page].\n\n\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[pip]: https://pypi.org/project/pip/\n\n[ilastik]: https://www.ilastik.org/\n[skimage’s blob detection]: https://scikit-image.org/docs/0.25.x/auto_examples/features_detection/plot_blob.html\n\n[abstract_puncta_labeler]: https://github.com/tehahn/quantpunc/blob/main/src/quantpunc/quantification/abstract_puncta_labeler.py\n[default_puncta_labelers]: https://github.com/tehahn/quantpunc/blob/main/src/quantpunc/quantification/default_puncta_labelers.py\n\n[Napari hub]: https://napari-hub.org/plugins/quantpunc.html\n[here]: https://tehahn.github.io/quantpunc/\n[issues page]: https://github.com/tehahn/quantpunc/issues\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"tehahn","author_email":null,"maintainer":null,"maintainer_email":null,"license":null,"classifier":["Development Status :: 4 - Beta","Framework :: napari","Intended Audience :: Science/Research","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy<2.3","magicgui","qtpy","scikit-image","scikit-learn>=1.6.1","pywavelets>=1.6.0","tox; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","napari; extra == \"testing\"","pyqt5; extra == \"testing\""],"requires_python":">=3.10","requires_external":null,"project_url":["Documentation, https://tehahn.github.io/quantpunc/","Repository, https://github.com/tehahn/quantpunc/"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}