Plotting Temporal Localization Part 5 - veeninglab/BactMAP GitHub Wiki
Plotting Trajectories: Preparation
Connecting Tracked Fluorescence to Cell Segmentation Data
Another way to display the localization of proteins over time is by
plotting the trajectories of fluorescent objects over time. I used
iSBatch
to track fluorescent spots/filaments and we already imported
them as tracks_DnaX
and tracks_FtsZ
. To prepare this data for
plotting, we need to connect the tracks to the cell outlines. We can do
this using the function
spotsInBox()
.
spotsInBox()
is a function which is useful if your cell outline data comes from a different program than your fluorescence detection data. It’s sister function isobjectsInBox()
. It returns a list of dataframes, of which we will usespots_relative
:
box_DnaX <- spotsInBox(tracks_DnaX, myMesh)$spots_relative
box_FtsZ <- spotsInBox(tracks_FtsZ, myMesh)$spots_relative
Combining FtsZ and DnaX data into one dataset
To plot both DnaX and FtsZ in the same plot, I combine both dataframes
using the function combineDataframes()
. This function
takes the datasets you put in, puts them together and adds a column "condition" and/or "channel"
to the data indicating which data belongs to which condition/channel. The main output of this function
is called finalframe
. In our case, we immediately take out this finalframe
using the $
-operator.
Check the output of the code below using View(combo)
and/or summary(combo)
.
combo <- combineDataframes(listofdataframes=list(box_DnaX, box_FtsZ),
listofchannels = list("DnaX", "FtsZ"))$finalframe
:arrow_left: Plotting Temporal Localization Part 4: Cell Towers | Plotting Temporal Localization Part 6: Plotting Fluorescence Trajectories: One dimension :arrow_right: |
---|