Using Muliprocessing from Windows - vanTeeffelenLab/ExTrack GitHub Wiki

Muliprocessing can be used from windows (10 or more) using WSL. WSL allows to run Ubuntu from windows (See https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview to install it).

Installing ExTrack on WSL

On the Ubuntu terminal, update ubuntu and install pip:

sudo apt update

sudo apt upgrade (press Y for yes)

sudo apt install python3-pip

Install the dependencies:

pip install numpy lmfit xmltodict matplotlib pandas

Install ExTrack: pip install extrack

Using ExTrack on WSL

Once ExTrack has been installed, one can run a script to perform the parameter fitting. To do so, copy/past the file https://github.com/vanTeeffelenLab/ExTrack/blob/main/Tutorials/automated_fitting.py to a suitable working directory.

NB: On WSL, the User files can be accessed thanks to the path /mnt/c/Users/username. Then your script should be located at a path looking like /mnt/c/Users/username/pathtoyourscript/automated_fitting.py

The script automated_fitting.py aims to analyse multiple replicates, each composed from multiple movies. To do so, we need a folder than contains one or several folders that each represent one replicate and which contain one or multiple files (Each file representing one movie). The zip file https://github.com/vanTeeffelenLab/ExTrack/blob/main/Tutorials/dataset.zip contains such a folder. Unzip it to run the analysis on this folder. The folder dataset contains two folders: Exp1 and Exp2 which contain xml files. Therefore, automated_fitting.py read them using the ExTrack xml reader read_trackmate_xml. This reader can be replaced by another reader such as a scv reader of instance. See the tutorial Tutorials/Tutorial_ExTrack.ipynb for more information on the other readers.

In order to run the script on the example data set, you need to use a text editor to modify the path of your data set (variable datafolder) and your save directory SAVEDIR.

datafolder = '/mnt/c/Users/username/path/dataset' (line 9).

SAVEDIR = '/mnt/c/Users/username/path/Res' (line 10).

Once this is done you can run the script using: python3 /mnt/c/Users/username/path/automated_fitting.py

The number of cores to use can be specified by the variable workers = 5, line 11.