Plotting Temporal Localization Part 2 - veeninglab/BactMAP GitHub Wiki
Import the data
To make the kymographs, cell towers and trajectory plots, we need the following data:
- TIFF files of the original time-lapse movie of the fluorescence channels with DnaX-GFP (X.tif) & FtsZ-RFP (FTSZ.tif).
- the results of cell segmentation/tracking. I used Oufti to segment the cells, the results are in 20stl.MAT.
- the results of fluorescence tracking (both channels). I tracked the fluorescence with ISBatch’s Single Molecule Biophysics plugin. The results are saved in results_ftsztraj.csv and Resultstraj_dnax.csv.
Find more information on the gathering of the data and the image analysis here.
The TIF files
To import the two TIF files, use BactMAP’s function
extr_OriginalStack(). This function takes the x and y
coordinates of each pixel, together with the intensity value and turns
them into dataframes, one per image.
FTSZ <- extr_OriginalStack("Fig5A-C/FTSZ.TIF")
DNAX <- extr_OriginalStack("Fig5A-C/X.TIF")
The cell outlines
To import the cell outlines I tracked using Oufti,
use extr_Oufti(). This function takes the matlab or csv
output of Oufti and returns a list of dataframes, including the
cellList (a clone of the csv oufti output) and the
mesh (a dataframe describing the cell outlines & dimensions).
For plotting the cell shape and internal localization over time, I need
the mesh dataframe, so I will call for that one directly by
putting $mesh behind my call.
extr_Oufti()takes a .mat or .csv file from Oufti and the argumentmag.magis the magnification converter, or the pixel size of the microscopy image. I saved a few of my most used converters in BactMAP, you can access them with the functiongetPixels2um(). Use the functionaddPixels2um()to add a new conversion factor to the list.
myMesh <- extr_Oufti("Fig5A-C/20stl.mat", mag="100x_DVMolgen")$mesh
The tracked fluorescence
I tracked the fluorescent spots & filaments using the Peak Fitter &
Particle Tracker of the Single Molecule Biophysics ImageJ
Plugin
from ISBatch.
To import the tracks, use the function extr_ISBatch().
This function returns a list of dataframes, including the
cellList (a clone of the csv output of the Peak Fitter)
and the spotframe (a list containing spot identifiers &
coordinates). Since I only need the spotframe, I subset this one by
putting $spotframe behind my call.
tracks_FtsZ <- extr_ISBatch("Fig5A-C/results_ftsztraj.csv")$spotframe
tracks_DnaX <- extr_ISBatch("Fig5A-C/Resultstraj_dnax.csv")$spotframe
Looking at your imported data
I have five datasets loaded into my environment: DNAX, FTSZ,
myMesh, tracks_DnaX and tracks_FtsZ. Explore them using the
commands summary() and View() (see part 3 of the Segmentation Tutorial for examples), and check the data structure documentation of the
mesh dataframe, spot dataframe and imported image lists.**
| :arrow_left: Plotting Temporal Localization Part 1: Before Getting Started | Plotting Temporal Localization Part 3: Making Kymographs :arrow_right: |
|---|