Skip to main content

napari-locpix

License MIT PyPI Python Version tests codecov napari hub

Load in SMLM data and annotate within napari


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

Installation

Compatibility

Tested with napari 0.9.2.

Install

Install napari via pip:

pip install "napari[all]"

You can install napari-locpix via pip:

pip install napari-locpix2

To install latest development version :

pip install git+https://github.com/AlistairCurd/napari-locpix.git

Note: napari-locpix2 is the PyPI project name for this repository. The name on PyPI was changed from napari-locpix in v0.0.8 to expedite new releases following the transfer of the repo from @oubino to @AlistairCurd.

Usage

First launch napari

napari

Then can find the plugin in napari, in the plugins menu, titled 'Annotate (napari-locpix)'

This plugin allows a user to

  1. Read in SMLM data
  2. Visualise SMLM data in a histogram
  3. Add segmentations to the data
  4. Extract the underlying localisations from the segmentations

IO

The input data can be in the form of a .csv or .parquet.

We expect there to be 4 columns at least, which should he identified in the file column selection:

  • X coordinate
  • Y coordinate
  • Frame
  • Channel

If the data has been annotated with this software and written to a Parquet file, we can also load this in ("Load annotated data"). A napari Labels layer will overlay localisations previously annotated as foreground/gt_label:1 (see Annotations).

Using "Load annotated data" is not currently supported for CSV files. However, the annotated data may still be read in with "Load raw data", and "gt_label" can be chosen as the Channel in File column selection (acquisition channel information will then not be rendered).

Visualisation

Using the render button you can render the loaded in data according to the histogram settings

X/Y bins defines the number of bins for the histogram. Use the X/Y bins ratio to retain the original aspect ratio of the FOV (or close) in the visualisation, if desired. The aspect ratio in this rendering does not affect the underlying localisation position data.

Vis interpolation defines how to interpolate the image before viewing

Annotations

Annotations of localisations can be added using napari's viewer.

Click on the napari button to create a new Labels layer. Label localisations by overlaying with the polygon, paintbrush tool, etc.

Localisations will get a new column, "gt_label", when the data is written to CSV or Parquet. Localisations will have gt_label: 0, unless they are underneath the labels layer annotations, in which case they will have gt_label: 1.

For saving in Parquet format, optionally change the names in the "Label map", which will be stored in metadata.

Rename the new napari Labels layer to "Labels", otherwise the annotations will not be saved.

Output

The data can be output to a .parquet or a .csv.

"Drop localisations with zero label": This gives you the option to only save the localisations which have been annotated with the Labels layer.

Channel labels allows you to give a real name label to each of the channels e.g. Chan 0 label: 'Alexa 647'

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, "napari-locpix" is free and open source software

Issues

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

Metadata

Release files for napari-locpix2 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-locpix2 0.0.8
File Size Uploaded Provenance Actions
napari_locpix2-0.0.8.tar.gz 21.2 kB Without provenance Details for napari_locpix2-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-locpix2 0.0.8
File Interpreter ABI Platform Actions
napari_locpix2-0.0.8-py3-none-any.whl Python 3 none any Details for napari_locpix2-0.0.8-py3-none-any.whl

Total release size: 41.5 kB

Release files / napari_locpix2-0.0.8.tar.gz

Download URL napari_locpix2-0.0.8.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
87e312500229bbf9b25cb20ac3b668f9da5fb1ecd06bbfe4f6b7fe7235b4bbaf
BLAKE2b-256 checksum
How to use checksums
515504af04fa5d985d3a9a6a4e19fe5b1ad19e263c4bc4f6493059ee0f1a4858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / napari_locpix2-0.0.8-py3-none-any.whl

Download URL napari_locpix2-0.0.8-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5378980134a4565409c8e832123aa6fcd68c568a985535978e57fe035fb080a6
BLAKE2b-256 checksum
How to use checksums
cbfc82ddc6bbede66c1d4d5ff65aceed1296f19d6b6174f58138db444ba6bb5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for napari-locpix2 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page