{"name":"napari-metroid","display_name":"napari METROID","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-metroid.write_multiple","title":"Save multi-layer data with napari METROID","python_name":"napari_metroid._writer:write_multiple","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-metroid.write_single_image","title":"Save image data with napari METROID","python_name":"napari_metroid._writer:write_single_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-metroid.make_cell1_AP1_data","title":"Load sample data Cell 1 Video Action Potential from napari METROID","python_name":"napari_metroid._sample_data:make_cell1_AP1_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-metroid.make_cell1_EP1_data","title":"Load sample data Cell 1 Video Electroporation from napari METROID","python_name":"napari_metroid._sample_data:make_cell1_EP1_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-metroid.make_qwidget","title":"Make example QWidget","python_name":"napari_metroid._dock_widget:MainInterface","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":[{"command":"napari-metroid.write_multiple","layer_types":["image*","labels*"],"filename_extensions":[],"display_name":""},{"command":"napari-metroid.write_single_image","layer_types":["image"],"filename_extensions":[".npy"],"display_name":""}],"widgets":[{"command":"napari-metroid.make_qwidget","display_name":"Main Interface","autogenerate":false}],"sample_data":[{"command":"napari-metroid.make_cell1_AP1_data","key":"AP","display_name":"Cell1 Video_Action_Potential"},{"command":"napari-metroid.make_cell1_EP1_data","key":"EP","display_name":"Cell1 Video_Electroporation"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-metroid","version":"0.0.5","dynamic":null,"platform":["UNKNOWN"],"supported_platform":null,"summary":"This napari plugin creates several regions of interest of similar area over cells in a fluorescence video (2D+time). It then gets ROIs means over time and performs signal denoising: fixes photobleaching and separates signal from noise by means of blind source separation (with or without wavelet filtering).","description":"# napari-metroid\n\n[![License](https://img.shields.io/pypi/l/napari-metroid.svg?color=green)](https://github.com/zoccoler/napari-metroid/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-metroid.svg?color=green)](https://pypi.org/project/napari-metroid)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-metroid.svg?color=green)](https://python.org)\n[![tests](https://github.com/zoccoler/napari-metroid/workflows/tests/badge.svg)](https://github.com/zoccoler/napari-metroid/actions)\n[![codecov](https://codecov.io/gh/zoccoler/napari-metroid/branch/main/graph/badge.svg)](https://codecov.io/gh/zoccoler/napari-metroid)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-metroid)](https://napari-hub.org/plugins/napari-metroid)\n\nThis napari plugin is an adaptation of [metroid](https://github.com/zoccoler/metroid). It creates several regions of interest of similar area over cells in a fluorescence video (2D+time). It then gets ROIs means over time and performs signal denoising: fixes photobleaching and separates signal from noise by means of blind source separation (with or without wavelet filtering).\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## A Picture (to boil down a thousand words)\n\nBelow is the graphical abstract of the Metroid software. This napari plugin works very similarly.\n\n![](https://github.com/zoccoler/metroid/blob/master/Metroid_flowchart.png)\n\n## Table of Contents\n\n- [Quick Walktrough](#quick-walkthrough)\n- [Installation](#installation)\n- [Usage](#usage)\n - [Open Sample Data](#open-sample-data)\n - [Open Plugin Main Interface](#open-plugin-main-interface)\n - [Auto-generate Cell Mask](#auto-generate-cell-mask)\n - [Split Mask into ROIs](#split-mask-into-rois)\n - [Get ROI Means over Time](#get-roi-means-over-time)\n - [Remove Photobleaching](#remove-photobleaching)\n - [Filter Signals](#filter-signals)\n - [Save outputs](#save-outputs)\n- [Contributing](#contributing)\n- [Citing napari-metroid](#citing-napari-metroid)\n- [License](#license)\n- [Issues](#issues)\n\n## Quick Walkthrough\n\nBelow is a full demonstration of using napari-metroid. It shows the following:\n * Open sample data;\n * Create cell mask;\n * Split mask into ROIs of similar area;\n * Get ROIs signals over time and plots two of them;\n * Remove photobleaching;\n * Remove noise:\n * Use ICA to decompose ROIs signals into independent components;\n * Plot 4 components;\n * Manually select the component of interest (source);\n * Perform inverse transformation with selected source;\n \n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/napari_metroid_demo.gif)\n\n## Installation\n\nDownload and install [Anaconda](https://www.anaconda.com/products/individual) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html#).\n\nCreate a new conda environment:\n\n conda create -n metroid-env python=3.8\n\nInstall napari, e.g. via pip:\n\n pip install \"napari[all]\"\n\nInstall `napari-metroid` via [pip]:\n\n pip install napari-metroid\n\nTo install latest development version :\n\n pip install git+https://github.com/zoccoler/napari-metroid.git\n\n## Usage\n### Open Sample Data\n\nThis plugin comes with two sample videos:\n- Cell1 Video Action Potential: 2D + time fluorescence video of a rat isolated cardiomyocyte labeled with a membrane potential dye upon which an external electrical field pulse is applied.\n- Cell1 Video Electroporation: Same cell, but submitted to a strong external electrical field pulse.\n\nYou can open them under \"File -> Open Sample -> napari-metroid\", as shown below. Both videos are loaded from the [metroid main repository](https://github.com/zoccoler/metroid). To know more about the experimental conditions, please refer to the [original publication](https://doi.org/10.1186/s12859-020-03661-9).\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/load_sample_data.gif)\n\n### Open Plugin Main Interface\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/open_plugin.gif)\n\n### Auto-generate Cell Mask\n\nMetroid can generate cell binary masks automatically by cumulative sum of images until any pixel saturation happens. It then applies Otsu thresholding and removes small objects.\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/auto_create_mask.png)\n\n### Split Mask into ROIs\n\nBy default, a cell mask is split into 32 regions of interest (ROIs) in a double-layer fashion: An outer layer of ROIs and an inner layer. \nThe method is solely based on the shape of the cell mask and the main criteria is that ROIs must have similar areas. The number of ROIs in each layer can be editted. \n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/mess.png)\n\n### Get ROI Means over Time\n\nThe 'Get Signals' button serves to collect each ROI mean fluorescence over time and enable plotting. There, you can optionally provide the frame rate so that the time axis is properly displayed.\nDouble click over a ROI to have its signal plotted. Hold the 'ALT' key to plot multiple signals together.\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/get_signals.gif)\n\n### Remove Photobleaching\n\nMetroid removes photobleaching by curve fitting over time periods that lack the cellular signal (which can be an action potential or an electroporation signal). That is why the 'Transitory' parameter is important. Action potentials are transitory signals whereas electroporation (at least for the duration of this experiment) are not, and the algorithm must be informed about that for proper trend removal.\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/remov_photob.gif)\n\n### Filter Signals\n\nCellular signals are filtered by separating signal components with either PCA or ICA (plus optional wavelet filtering). It then chooses one (or several) components and it applies the inverse transform using only the selected components. Metroid can do this component/source selection automatically based on estimations of signal power. Instead, we show below the manual selection procedure, where 4 components are plotted and the user selects one of them.\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/bssd.gif)\n\n### Save Outputs\n\nRaw, corrected and filtered signals, as well as time and components, are arranged in a table with values for each time point. The table is displayed as a widget after each Run button click. Estimated signal-to-noise (SNR) in dB for each label/ROI are also provided (in this case, each line corresponds to a ROI, not a time point).\nThe user can save these data by clicking on the buttons \"Copy to clipboard\" or \"Save as csv...\".\n\n![](https://github.com/zoccoler/napari-metroid/raw/main/figures/table_widget.png)\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## Citing napari-metroid\n\nIf you use this plugin in your research, please be kind to cite the original paper below:\n\nZoccoler, M., de Oliveira, P.X. METROID: an automated method for robust quantification of subcellular fluorescence events at low SNR. BMC Bioinformatics 21, 332 (2020). https://doi.org/10.1186/s12859-020-03661-9\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-metroid\" 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[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/zoccoler/napari-metroid/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\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/zoccoler/napari-metroid","download_url":null,"author":"Marcelo Leomil Zoccoler","author_email":"marcelo.zoccoler@tu-dresden.de","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Intended Audience :: Developers","Framework :: napari","Topic :: Software Development :: Testing","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.7","Programming Language :: Python :: 3.8","Operating System :: OS Independent","License :: OSI Approved :: BSD License"],"requires_dist":["numpy","scikit-learn","scikit-image","statsmodels","scipy","matplotlib","napari-skimage-regionprops (>=0.3.1)"],"requires_python":"<3.9,>=3.7","requires_external":null,"project_url":["Bug Tracker, https://github.com/zoccoler/napari-metroid/issues","Documentation, https://github.com/zoccoler/napari-metroid#README.md","Source Code, https://github.com/zoccoler/napari-metroid","User Support, https://github.com/zoccoler/napari-metroid/issues"],"provides_extra":null,"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}