napari-cardio-bio-eval

napari-cardio-bio-eval

The evaluation of the epic cardio biosensor integrated into napari

License BSD-3 PyPI Python Version tests

napari hub

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.


The plugin provides a widget which can load, preprocess, annotate and export cardio biosensor data.

Installation

You can install napari-cardio-bio-eval via pip:

pip install napari-cardio-bio-eval

Or use the Napari plugin manager and search for napari-cardio-bio-eval.

You can open the plugin's widgets from the Plugins menu after the installation of the plugin.

image

Data loading and preprocessing

At the top of the widget, you need to select the directory, which contains the data you want to examine and process. To successfully load the data the directory have to contain the following files:

  • *_wl_power.file: which contains the starting values of the measurement
  • DRM directory: which contains the difference from the previous measurement point
  • *_avg.file: which contains additional biosensor data

Import parameters:

  • Flipping: horizontal and vertical mirroring of the biosensor recording
  • Signal range type: with this you can choose how do you want to select a smaller range of the measurement in the next field Ranges
    • measurement phase: you can give the index of the phases you want to see, for example with 0-1 you can view the measurement from the start to the first pause
    • individual point: you can select any given frames in an interval, for example with selecting 34 and 275 you can view the measurement from frame 34 to frame 275
  • Ranges: if you choose measurement phase then give the range of the phases you want to see and if you choose individual point then select the starting and end frames. The label above helps as it shows the phrases (except the last one) and the full time of the measurement. The minimum frame or phase must be smaller than the maximum.
  • Drift correction threshold: Ranges between 25 and 500.
  • Filter method: mean or median

image

image

After selecting the source directory and the optional fliping you can load in the data with the Load Data button. After the raw data is loaded you can select the slice of the measurement you want to work with and some other parameters. Then by clicking the Preprocess Data button you start the processing and after a few seconds the well images will appear on the viewer.

image

Each well has its own layer. You can turn the layers visible or invisible by clicking the small eye icon on each layer.

If the selected range is not what you wanted then you can change the parameters and preprocess again. But if you moved on to the next step (manual background selection or peak detection) then you need to restart Napari to load other data or preprocess with different parameters.

After you see the wells you can proceed to the next step or if the automatic background correction is not good enough you can click the Select Background Points Manually button and it will show the automatically selected background points for each well, which you can move to better background coordinates and in the next peak detection step these points will be used by the background correction algorithm. After the first export these points will be saved so if the same directory is loaded a second time the preprocessing will use these points.

During the background selection do NOT delete any layers.

image

Selecting the cells

In this step you can also set some parameters for the peak detection algorithm and then click the Detect Signal Peaks button to start the process. After a few seconds the wells with the potential cells will show on the window.

Detection parameters:

  • Threshold range: 25-5000
  • Neighbourhood size: 1-10
  • Error mask filtering:

image

Here you can delete, add or move the points on each points layer. There are keyboard shortcuts for easier use! Additionally by double clicking on any point of the image you can examine the time-signal diagram of the selected point under the widget. Be sure to select the correct layer!

If you do not need any of the wells, then you can delete the layer and it won't be exported. If you either delete an image or peak points layer belonging to a well, the well will not be included in the export!
After selecting the needed cells and wells (and deleting the unnecessary ones) you can export plots and additional information about them.

Exporting

You can select what kind of data do you want to export and click the Export Data button. The data will be exported to the source directory into a result sub-directory.

Export options:

  • Coordinates: the coordinates of the selected cells
  • Preprocessed signals:
  • Raw signals:
  • Average signal:
  • Breakdown signal:
  • Max well:
  • Plot signals with well:
  • Plot well with coordinates:
  • Plot cells individually:
  • Signal parts by phases:
  • Max centered signals:

Segmentation widget

The data loading and preprocessing is the same but it uses a deep learning model to segment the cells.

License

Distributed under the terms of the BSD-3 license, "napari-cardio-bio-eval" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Version:

  • 0.1.3

Last updated:

  • 15 August 2024

First released:

  • 15 August 2024

License:

  • Copyright (c) 2024, Nanobiosensorics All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Supported data:

  • Information not submitted

Plugin type:

  • Information not submitted

GitHub activity:

  • Stars: 0
  • Forks: 0
  • Issues + PRs: 0

Python versions supported:

Operating system:

Requirements:

  • matplotlib
  • opencv-python-headless
  • openpyxl
  • napari[pyqt5]
  • torch
  • numpy==1.26