TrackSegNet
TrackSegNet: a tool for trajectory segmentation into diffusive states using supervised deep learning - Published in JOSS (2024)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 11 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords from Contributors
Scientific Fields
Repository
Segmentation of trajectories into diffusive states using supervised LSTM network
Basic Info
- Host: GitHub
- Owner: hkabbech
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://tracksegnet.readthedocs.io/en/latest/
- Size: 7.31 MB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
TrackSegNet
Purposes
Recent advances in the field of microscopy allow the capture, at nanometer resolution, of the motion of fluorescently-labeled particles in live cells such as proteins or chromatin loci. Therefore, the development of methods to characterize the dynamics of a group of particles has become more than necessary.
TrackSegNet is a tool designed for the classification and segmentation of experimental trajectories, specifically those obtained from single-particle tracking microscopy data, into different diffusive states.
To enable the training of the LSTM neural network, synthetic trajectories are initially generated, and the parameters of the generator can be fine-tuned.
Upon completion of the training process, the experimental trajectories are classified at each point using the trained model. Subsequently, the trajectories are segmented and grouped based on their respective diffusive states. In this context, "diffusive states" refer to the distinct modes or patterns observed in the movement of particles.
For each segmented track, the diffusion constant (
) and anomalous exponent (
) are further estimated. This is accomplished by computing the mean squared displacement (MSD), providing valuable insights into the dynamic behavior of the particles within each identified diffusive state.

Installation
Installation with pip
[sudo] pip install tracksegnet
Installation from the GitHub repository and requirements
Clone the repository
git clone https://github.com/hkabbech/TrackSegNet.git cd TrackSegNetEither create and run a docker container
```bash
Build a docker image (Rebuild the image after changing the parameters):
docker compose build
Run the container:
docker compose run tracksegnet-env ```
- Or create a virtual environment and install the packages
Requirement: python={3.8, 3.9, 3.10} and the virtualenv library
```bash
Create the environment:
python -m venv tracksegnet-env # or virtualenv -p /usr/bin/python3 tracksegnet-env
Activate the environment:
source ./tracksegnet-env/bin/activate # Or source ./tracksegnet-env/Scripts/activate for Windows. For PowerShell: .\tracksegnet-env\Scripts\Activate.ps1 (run as administrator)
Install the required python libraries:
pip install -e . # or python -m pip install -r requirements.txt ```
Note for later, to deactivate the virtual environment, type deactivate.
Prepare your data
Data organization
Organize your data in a folder SPT_experiment, each sub-folder should contain a file storing the trajectory coordinates in a MDF or CSV file format.
If CSV format is used, the headers should be: x, y, frame, track_id
bash
.
├── data/
│ └── SPT_experiment/
│ ├── Cell_1
│ │ ├── *.tif
│ │ └── *.mdf
│ ├── Cell_2
│ │ ├── *.tif
│ │ └── *.mdf
│ ├── Cell_3
│ │ ├── *.tif
│ │ └── *.mdf
│ └── ...
│
├── src/
├── tracksegnet-env/
├── parms.csv
├── tracksegnet-main.py
└── ...
Change the main parameters
Tune the main parameters of the training in the params.csv file according to your experiment:
num_statesthe number of diffusive states for the classification(from 2 to 6 states). This number can vary from 2 to 6 states, but it is recommended to choose 2 to 4 states.state_i_diffandstate_i_alphathe approximate motion parameters for each of thediffusive state. The diffusion constant
is dimensionless, and the anomalous exponent value
is ranging from 0 to 2 (
: subdiffusion,
: Brownian motion,
: superdiffusion).
pt_i_jthe probability of transitionning from state i to state j. The total number of probabilities should be.
The remaining parameters are related to the experimental dataset:
data_path, the path of the dataset of trajectories to segment.track_format, the format of the files containing the trajectory coordinates, eitherMDF(seeMTrackJdata file format) orCSVtime_frame, the time interval between two trajectory points in seconds.pixel_size, the dimension of a pixel in.
Note that the program will run on the toy example if the parameters are unchanged.
For updating the parameters of the track simulation and neural network training, please make the changes in the main file tracksegnet-main.py.
Run the program
bash
python tracksegnet-main.py parms.csv
Reference
Kabbech H. et al., (2024). TrackSegNet: a tool for trajectory segmentation into diffusive states using supervised deep learning. Journal of Open Source Software, 9(98), 6157, https://doi.org/10.21105/joss.06157
Yavuz, S., Kabbech, H., van Staalduinen, J., Linder, S., van Cappellen, W.A., Nigg, A.L., Abraham, T.E., Slotman, J.A., Quevedo, M. Poot, R.A., Zwart, W., van Royen, M.E., Grosveld, F.G., Smal, I., Houtsmuller, A.B. (2023). Compartmentalization of androgen receptors at endogenous genes in living cells, Nucleic Acids Research 51(20), https://doi.org/10.1093/nar/gkad803.
Owner
- Name: Hélène Kabbech
- Login: hkabbech
- Kind: user
- Location: Rotterdam, Netherlands
- Company: Erasmus MC
- Repositories: 1
- Profile: https://github.com/hkabbech
JOSS Publication
TrackSegNet: a tool for trajectory segmentation into diffusive states using supervised deep learning
Authors
Tags
single-particle tracking trajectory segmentation supervised deep learning mean squared displacementGitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| hkabbech | h****h@g****m | 122 |
| Maarten Paul | m****l@g****m | 3 |
| dependabot[bot] | 4****] | 2 |
| Kevin Mattheus Moerman | K****n | 1 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 8
- Total pull requests: 19
- Average time to close issues: 28 days
- Average time to close pull requests: about 15 hours
- Total issue authors: 2
- Total pull request authors: 4
- Average comments per issue: 0.88
- Average comments per pull request: 0.11
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- imagejan (4)
- ajasja (3)
Pull Request Authors
- hkabbech (23)
- dependabot[bot] (4)
- Kevin-Mattheus-Moerman (2)
- maartenpaul (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 8 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
pypi.org: tracksegnet
Segmentation of trajectories into diffusive states using supervised LSTM network
- Homepage: https://github.com/hkabbech/TrackSegNet
- Documentation: https://tracksegnet.readthedocs.io/
- License: MIT License
-
Latest release: 1.3.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- docker://openjournals/paperdraft latest composite
- Markdown ==3.4.1
- MarkupSafe ==2.1.2
- Pillow ==9.4.0
- Werkzeug ==2.2.3
- absl-py ==1.4.0
- astunparse ==1.6.3
- cachetools ==5.3.0
- certifi ==2022.12.7
- charset-normalizer ==3.0.1
- contourpy ==1.0.7
- cycler ==0.11.0
- flatbuffers ==23.1.21
- fonttools ==4.38.0
- gast ==0.4.0
- google-auth ==2.16.0
- google-auth-oauthlib ==0.4.6
- google-pasta ==0.2.0
- grpcio ==1.51.1
- h5py ==3.8.0
- idna ==3.4
- importlib-metadata ==6.0.0
- keras ==2.11.0
- kiwisolver ==1.4.4
- libclang ==15.0.6.1
- matplotlib ==3.6.3
- more-itertools ==9.0.0
- numpy ==1.24.1
- oauthlib ==3.2.2
- opt-einsum ==3.3.0
- packaging ==23.0
- pandas ==1.5.3
- protobuf ==3.19.6
- pyasn1 ==0.4.8
- pyasn1-modules ==0.2.8
- pyparsing ==3.0.9
- python-dateutil ==2.8.2
- pytz ==2022.7.1
- requests ==2.28.2
- requests-oauthlib ==1.3.1
- rsa ==4.9
- scipy ==1.10.0
- seaborn ==0.12.2
- six ==1.16.0
- tensorboard ==2.11.2
- tensorboard-data-server ==0.6.1
- tensorboard-plugin-wit ==1.8.1
- tensorflow ==2.11.0
- tensorflow-estimator ==2.11.0
- tensorflow-io-gcs-filesystem ==0.30.0
- termcolor ==2.2.0
- tqdm ==4.64.1
- typing-extensions ==4.4.0
- urllib3 ==1.26.14
- wrapt ==1.14.1
- zipp ==3.11.0
- python 3.8 build
- readthedocs/actions/preview v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
