Skip to main content

track2p

Cell tracking for longitudinal calcium imaging recordings.

PyPI version All time downloads Monthly downloads License: GPL v3


Note: We are actively developing the software for the next couple of months, so we would greatly appreciate any feedback! You can raise it as an issue on GitHub or contact us directly. Thanks!


Installation

Installing via pip

First we need to set up a conda environment with python 3.9:

conda create --name track2p python=3.9
conda activate track2p

Then simply install the track2p package using pip:

pip install track2p

Thats it, track2p should be succesfully set up :) You can simply run it by:

python -m track2p

This opens a GUI allowing the user to launch the algorithm and visualise the results interactively.

(For instructions on running track2p without the GUI see the 'Run via script' under the 'Usage' section)

Note: For common installation issues see documentation.

Usage

Run through GUI

After activating the GUI through python -m track2p the user should navigate to the 'Run' tab on the top left of the window and select 'Run algorithm' from the dropdown menu. This will open a pop-up window that will allow the user to set the paths to suite2p datasets and to set the algorithm parameters. Once these have been set the user can click on 'Run', which will launch the track2p algorithm, with the progress being printed in the window below.

When the algorithm is finished, another pop-up window will appear, asking the user if they want to visualise the outputs in the GUI.

For more details on how to run the algorithm through the GUI see documentation and for more description of paramters see documentation here.

GUI visualisation

The GUI supports both visualisation after algorithm run (as described above), as well as visualising previously processed data. The latter can be done by navigating to File -> Load processed data on the top left of the GUI.

gui_mainwindow.png

Briefly the GUI allows the user to visualise the mean field of view on all days, with the ROIs of all matched cells visualised. The user can then interactively select a cell by clicking on the ROI on the mean image. This will display a zoomed-in view of this cell across all days on the right, and the extracted fluorescence time series below.

For more details on how to use the GUI for visualising track2p results see documentation.

Run via script

To run via script you can use the run_track2p.py script in the root of this repo as a template. It is exactly the same as running thrugh the gui, only that the paths and the parameters are defined within the script (for more on parameters etc. see documentation). When running make sure you are running it within the track2p environment, for example:

conda activate track2p
python -m run_track2p

Outputs

All the outputs of the script will be saved in a track2p folder created within the track_ops.save_path directory specified by the user when running the algorithm. For an introduction on how to use the outputs for further downstream analysis we provide a useful demo notebook demo_t2p_output.ipynb in the root of this repository. Note: You will need to additionally install jupyter for this to work. For example:

conda install conda-forge::jupyterlab

For more information see documentation relating to track2p viusalisations and outputs.

Reference

For now if you use the algorithm please reference the Cosyne abstract:

Majnik, J., Zangila, S., Cossart, R. & Platel, J. C. (2024). Emergence of state modulation in a developing cortical circuit. COSYNE Abstract.

You can also see the YouTube recording of the talk for a reference use-case in neocortical development: Link to video (starting at 47:20)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

track2p-0.5.1.tar.gz (47.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

track2p-0.5.1-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file track2p-0.5.1.tar.gz.

File metadata

  • Download URL: track2p-0.5.1.tar.gz
  • Upload date:
  • Size: 47.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for track2p-0.5.1.tar.gz
Algorithm Hash digest
SHA256 fda6beec95283ef72e7f43900d210a1e30a5886158cfbbf05fb79613400a96e5
MD5 c26fd69948cd57b1566fe56f9a2fb1ba
BLAKE2b-256 9b17b819c42021ebf27d44ca091b71b1ff4180745038461fa6bdf4c5c56b5b6e

See more details on using hashes here.

File details

Details for the file track2p-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: track2p-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for track2p-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa5da73cf06b56d0e8116df6eea69e29dc46e89bd91db1ab4d31d6b7333c120a
MD5 37b301a7eda623af91d1f44157750c9b
BLAKE2b-256 55a0636294930e217bd73393c5663ba9ea98d78632680386503007e6816c60e5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.2

2 files

0.6.1

2 files

0.6

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

1 file

0.5.3

2 files

0.5.2

2 files

This release

0.5.1 This release

2 files

0.5.0

2 files

0.4.4

2 files

0.4.2

2 files

0.4.1

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

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