I’m relatively new to R, so it might be trivial for some users but I’m a bit lost.
I did a cell tracking workflow using TrackMate (on ImageJ). I ended up with a table of x and y positions of cells for each time points. I wanted to draw a graph representing the displacement of cells in a centred coordinates grid. (as the Ibidi chemotaxis and cell migration tool).
I first centred the x and Y positions of my cells relative to 0. And ended with a table were “track ID means= the name of 1 path”, “frame=time points”, and X and Y positions. All classified by conditions (CTRL vs siRNA)
I now have some trouble in making the graph, the best that I could get is a scatter plot of all the positions colored by conditions.
here is what I did :
testgraph<-ggscatter(F_NEWPOS, x=“POSITION_XN”, y=“POSITION_YN”, color=“CONDITIONS”,
fill=“CONDITIONS”, palette = c(“black”, “red”), alpha=0.5)+
geom_hline(yintercept = 0, color = “black”) +
geom_vline(xintercept = 0, color = “black”)
What I want thought, is drawing “the path” ie connecting between the points of the same path (ie same Track ID).
I tried by adding lines or changing the plot to ggline but the best that I’m getting is weird point connection between same frames. And if I try changing and filtering by “TRACK_ID” I get the error message :
“Continuous value supplied to discrete scale”
Which I can understand but don’t know what to change.
Hope that some of you will have suggestions
Thank you in advance !