Skip to content

Commit 8767867

Browse files
committed
Improve API documentation #11
1 parent b40fd4a commit 8767867

17 files changed

+352
-94
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before starting, you should read, agree to, and follow this guideline.
1010

1111
### Report bugs
1212

13-
Report bugs at: https://github.com/hkabbech/tracksegnet/issues/new.
13+
Report bugs at: [https://github.com/hkabbech/tracksegnet/issues/new](https://github.com/hkabbech/tracksegnet/issues/new).
1414

1515
When reporting a bug, please include the detailed steps to reproduce the bug.
1616
Where possible, please write a test case.

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
## Purposes
77

8+
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.
89

910
`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.
1011

11-
To enable the training of the LSTM neural network, synthetic trajectories are initially generated, and the parameters of the generator can be fine-tuned.
12+
- To enable the training of the LSTM neural network, synthetic trajectories are initially generated, and the parameters of the generator can be fine-tuned.
1213

13-
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.
14+
- 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.
1415

15-
For each segmented track, the diffusion constant ($D$) and anomalous exponent ($\alpha$) 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.
16+
- For each segmented track, the diffusion constant (![equation](https://latex.codecogs.com/svg.image?\inline&space;D)) and anomalous exponent (![equation](https://latex.codecogs.com/svg.image?\inline&space;\alpha)) 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.
1617

1718

1819
![pipeline](paper/pipeline.png)
@@ -87,22 +88,27 @@ If `CSV` format is used, the headers should be: `x, y, frame, track_id`
8788

8889
### Change the main parameters
8990

90-
Update the main parameters in the `parms.csv` file according to your experiment:
91+
Tune the main parameters of the training in the `params.csv` file according to your experiment:
92+
93+
* `num_states` the 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.
94+
* `state_i_diff` and `state_i_alpha` the approximate motion parameters for each of the ![equation](https://latex.codecogs.com/svg.image?\inline&space;N) diffusive state. The diffusion constant ![equation](https://latex.codecogs.com/svg.image?\inline&space;D) is dimensionless, and the anomalous exponent value ![equation](https://latex.codecogs.com/svg.image?\inline&space;\alpha) is ranging from 0 to 2 (![equation](https://latex.codecogs.com/svg.image?\inline&space;]0-1[): subdiffusion, ![equation](https://latex.codecogs.com/svg.image?\inline&space;1): Brownian motion, ![equation](https://latex.codecogs.com/svg.image?\inline&space;]1-2[): superdiffusion).
95+
* `pt_i_j` the probability of transitionning from state i to state j. The total number of probabilities should be ![equation](https://latex.codecogs.com/svg.image?\inline&space;N^2).
96+
97+
The remaining parameters are related to the experimental dataset:
98+
99+
* `data_path`, the path of the dataset of trajectories to segment.
100+
* `track_format`, the format of the files containing the trajectory coordinates, either `MDF` (see `MTrackJ` data file format) or `CSV`
101+
* `time_frame`, the time interval between two trajectory points in seconds.
102+
* `pixel_size`, the dimension of a pixel in ![equation](https://latex.codecogs.com/svg.image?\inline&space;$\mu m).
91103

92-
- `data_path`: the path containing your data folder `SPT_experiment` to analyze
93-
- `track_format`: The format of the files containing the trajectory coordinates, should be `MDF` or `CSV`
94-
- `time_frame`: the time interval between two trajectory points (in second)
95-
- `pixel_size`: the dimension of a pixel (in µm)
96-
- `num_states`: the number of diffusive states for the classification(from 2 to 6 states)
97-
- `state_X_diff`: The expected diffusion value for state X (in µm^2/s).
98-
- `state_X_alpha`: The expected anomalous exponent α value for state X (from 0 to 2 -- ]0-1[: subdiffusion, 1: Brownian motion, ]1-2[: superdiffusion).
99-
- `pt_i_j`: the probability of transitionning from the state i to the state j. The total number of probabilities should be $N^2$.
100104

101105
Note that the program will run on the toy example if the parameters are unchanged.
102106

103107
For updating the parameters of the track simulation and neural network training, please make the changes in the main file `tracksegnet.py`.
104108

105109

110+
111+
106112
## Reference
107113

108114
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](https://doi.org/10.1093/nar/gkad803).

docs/source/analysis.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
analysis module
2-
===============
1+
analysis
2+
========
33

44
.. automodule:: analysis
55
:members:

docs/source/compute_features.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
compute\_features module
2-
========================
1+
compute\_features
2+
=================
33

44
.. automodule:: compute_features
55
:members:

docs/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
import os
77
import sys
8-
sys.path.insert(0, os.path.abspath('../../src/'))
8+
sys.path.insert(0, os.path.abspath('../..'))
9+
sys.path.insert(0, os.path.abspath('../../src'))
910

1011

1112
# -- Project information -----------------------------------------------------

docs/source/experimental_tracks.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
experimental\_tracks module
2-
===========================
1+
experimental\_tracks
2+
====================
33

44
.. automodule:: experimental_tracks
55
:members:

docs/source/generate_lstm_model.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
generate\_lstm\_model module
2-
============================
1+
generate\_lstm\_model
2+
=====================
33

44
.. automodule:: generate_lstm_model
55
:members:

docs/source/index.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ TrackSegNet's documentation!
1616
:maxdepth: 1
1717
:caption: Modules:
1818

19-
analysis
20-
compute_features
19+
simulate_tracks
2120
experimental_tracks
21+
compute_features
2222
generate_lstm_model
23-
simulate_tracks
23+
analysis
2424
utils
2525

2626
.. toctree::

docs/source/paper/pipeline.png

198 KB
Loading

docs/source/simulate_tracks.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
simulate\_tracks module
2-
=======================
1+
simulate\_tracks
2+
================
33

44
.. automodule:: simulate_tracks
55
:members:

docs/source/utils.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
utils module
2-
============
1+
utils
2+
=====
33

44
.. automodule:: utils
55
:members:

0 commit comments

Comments
 (0)