{"name":"napari-buds","display_name":"napari BudAnnotation","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-buds.get_reader","title":"Open data with napari BudAnnotation","python_name":"napari_buds._reader:napari_get_reader","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.write_multiple","title":"Save multi-layer data with napari BudAnnotation","python_name":"napari_buds._writer:write_multiple","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.write_single_image","title":"Save image data with napari BudAnnotation","python_name":"napari_buds._writer:write_single_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.make_sample_data","title":"Load sample data from napari BudAnnotation","python_name":"napari_buds._sample_data:make_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.translate","title":"translate image layer","python_name":"napari_buds._translate:translate","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.testing","title":"Napari bud annotation","python_name":"napari_buds._widget:Main","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-buds.redecorated","title":"Napari bud annotation redecorated","python_name":"napari_buds._widget_overview:UIWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":[{"command":"napari-buds.get_reader","filename_patterns":["*.npy"],"accepts_directories":false}],"writers":[{"command":"napari-buds.write_multiple","layer_types":["image*","labels*"],"filename_extensions":[],"display_name":""},{"command":"napari-buds.write_single_image","layer_types":["image"],"filename_extensions":[".npy"],"display_name":""}],"widgets":[{"command":"napari-buds.translate","display_name":"Translate image layers (controls ASWD, T = register)","autogenerate":false},{"command":"napari-buds.redecorated","display_name":"bud annotation","autogenerate":false}],"sample_data":[{"command":"napari-buds.make_sample_data","key":"unique_id.1","display_name":"napari BudAnnotation"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-buds","version":"0.1.6","dynamic":null,"platform":null,"supported_platform":null,"summary":"Random-forest automated bud annotation","description":"# napari-buds\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-buds.svg?color=green)](https://github.com/SanderSMFISH/napari-buds/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-buds.svg?color=green)](https://pypi.org/project/napari-buds)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-buds.svg?color=green)](https://python.org)\n[![tests](https://github.com/SanderSMFISH/napari-buds/workflows/tests/badge.svg)](https://github.com/SanderSMFISH/napari-buds/actions)\n[![codecov](https://codecov.io/gh/SanderSMFISH/napari-buds/branch/main/graph/badge.svg)](https://codecov.io/gh/SanderSMFISH/napari-buds)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-buds)](https://napari-hub.org/plugins/napari-buds)\n\nRandom-forest automated bud annotation\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Installation\n\nmake sure you already have installed napari. \n\nNext, You can install `napari-buds` via [pip]:\n\n pip install napari-buds\n\n\n\nTo install latest development version :\n\n pip install git+https://github.com/SanderSMFISH/napari-buds.git\n\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## Documentation\nNapari-Buds is a random forest based mother-bud annotation plugin for Napari devevoped by the TutucciLab (https://www.tutuccilab.com/) of the systems biology group at the Vrije Universiteit van Amsterdam. Mother-bud annotation requires single or multichannel 2D images of budding yeast and a fluorescent marker that localizes to the bud. In the example dataset provided smFISH DNA-probes were used as localized bud marker.The GUI layout for random forest based classification was inspired by ImageJ 'plugin Weka Segmentation' [1]. **Before installation make sure you have a working version of napari installed (pip install \"napari[all]\").** Napari-Buds is a random forest based mother-bud annotation plugin for Napari developed by the TutucciLab (https://www.tutuccilab.com/) of the systems biology group at the Vrije Universiteit van Amsterdam. Mother-bud annotation requires single or multichannel 2D images of budding yeast and a fluorescent marker that localizes to the bud. In the example dataset provided smFISH DNA-probes were used as localized bud marker.The GUI layout for random forest based classification was inspired by ImageJ 'plugin Weka Segmentation' [1]. \n\nPlease follow the workflow described underneath to perform mother-bud annotation:\n\n1. Open images in napari and create empty label layer.\nFor multichannel images each channel should be provided seperately to napari.\nAn example (jupyter) notebook (Open Test Images Napari.ipynb) for loading test data in napari is provided in the notebooks folder. \nExample dataset can be downloaded from https://zenodo.org/record/7004556#.YwM1_HZBztU. \n \n2. If multichannel images are unaligned the translate widget under Plugins>napari-buds>Translate can be used. \nSelect which layer should be translated to align to the layers in widget menu. Then use the aswd keys to translate (move) the selected layer. \nTo register changes and update coordinates of the translated image in napari press t. \n \n### Random forest classification\n3. To open the mother-bud annotation plugin go to Plugins>napari-buds>bud annotation.\n \n4. To train a random forest classifier, in the created label layer draw examples of cells, buds and background (see tutorial gif below). \nIn the Define Label segment of the widget you define which label value (class #label_value) corresponds to cells, buds and background. \nCurrently, cells and backgrounds and buds **have to be defined in the Define Label segment** if you want to be able to segment the classification as well.\nIn the segment **Layers to extract Features from** we can select which layers will be used in training the random forest classifier. \nNext press **Train classifier**. After training is completed a result layer is added to layer list. \nInspect the results carefully to asses classifier performance. The trained classifier can be saved using the **save classifier** button.\nPreviously trained classifier can be loaded by pressing **Load classifier**. Loaded classifier can applied to new images by pressing **Classify**, resulting again in a results layer.\nIt is possible to change the random forest parameters with **the Set random forest parameters** button and changing the values in the pop up menu.\nPress **Run** to register changed settings. For an example of the parameters used see: \nhttps://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html and \nhttps://scikit-image.org/docs/stable/auto_examples/segmentation/plot_trainable_segmentation.html. \n \n5. Next, we want to perfom watershed segmentation using the result layer. However, for watershed segmentation seeds (also called markers) are required\n(for an explanation of watershed segmenation see: https://en.wikipedia.org/wiki/Watershed_(image_processing)). \nTo define the seeds we can either simply threshold on one of the supplied image layers or we can use distance tranform (https://scikit-image.org/docs/stable/auto_examples/segmentation/plot_watershed.html#sphx-glr-auto examples-segmentation-plot-watershed-py).The resulting seeds layer can be adjusted manually by editing in napari.\nA good seeds layers correspond to each cell having a single seed (buds are not single cells). To perform watershed segmentation press the **Segment** button.\n \n6. Carefully inspect the resulting cell mask and bud layer. Correct the mistakes in both layers. \nBud label values should correspond to the label value of the cell mask of mother cell. To verify mother bud relations were drawn correctly\npress **Draw Mother-Bud relations**. If Mother-Bud relations are correct, you can save both label layers. Mother and buds simply share the same label number.\nThus, either the mother or bud layer can be manually corrected for mistakes. Corrections can be checked by clicking **Draw Mother-Bud relations** again. \nmother and buds layer can be saved manually in napari. When using Jupyter notebook mother and bud layers can be saved as shown in Open Test Images Napari.ipynb.\n\n7. An example notebook for dataextraction of the created cell and bud masks can be found in the example notebooks folder (Extract_Mother_Buds_relations_from_Masks_and_intergrate_FQ_spot_data.ipynb).This notebooks relates RNA spots (smFISH data found on zenodo) to the mother or bud compartment. \n\n\nSee video for clarification:\n\n![Watch the video](https://github.com/SanderSMFISH/napari-buds/blob/main/videos/Napari_bud_gif.gif)\n\n## Similar Napari plugins \n\n1-napari-accelerated-pixel-and-object-classification (APOC) by Robert Haase.\n\n2-napari-feature-classifier.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-buds\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n### Known Issues\n\nIf window geometry of the window is unable to be set, this might lead to issues in the display of the widget. For example, part of the widget might fall of the screen.\nIn these cases, it might help to adjust in your display setting the display scaling to a lower setting. \n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n\n[file an issue]: https://github.com/SanderSMFISH/napari-buds/issues\n\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n\n## References\n1. Arganda-Carreras, I., Kaynig, V., Rueden, C., Eliceiri, K. W., Schindelin, J., Cardona, A., & Sebastian Seung, H. (2017). Trainable Weka Segmentation: a machine learning tool for microscopy pixel classification. Bioinformatics, 33(15), 2424–2426. doi:10.1093/bioinformatics/btx180\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/SanderSMFISH/napari-buds","download_url":null,"author":"Sander van Otterdijk","author_email":"scvanotterdijk@gmail.com","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","magicgui","qtpy","pandas","napari","magic-class","scipy","scikit-learn","scikit-image","matplotlib","joblib","imageio-ffmpeg","stackview","jupyterlab","tox ; extra == 'testing'","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":["Bug Tracker, https://github.com/SanderSMFISH/napari-buds/issues","Documentation, https://github.com/SanderSMFISH/napari-buds#README.md","Source Code, https://github.com/SanderSMFISH/napari-buds","User Support, https://github.com/SanderSMFISH/napari-buds/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}