Skip to content

smotsch/analysis_glioma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Analysis glioma

This code reposotory explains the statistical analysis performed in the paper Spatiotemporal analysis of glioma heterogeneity reveals Col1A1 as an actionable 1 target to disrupt tumor mesenchymal differentiation, invasion and malignancy. It includes an example of experimental data to test the various programs. Running any script should take less than a minute except for one script in step 3 step3_zone_create_df.jl (this script is not necessary to run the other scripts).

Step 1: tracking

The tracking of the cells has been done using ImageJ with the plugin TrackMate. We use the DoG detection (Difference of Gaussian) with a radius of 20μm and a threshold of 1. As a result, we obtain two CSV files (see an example and an illustration in the folder data_tracking/step1_data_trackMate/NPA_stich_3) containing the positions $(x,y)$ of the cells (see the file *spots.csv) along with the trajectories (*tracks.csv).

Step 2: smoothing trajectories

We then smooth the trajectories obtained with TrackMate. Smoothing is necessarily to make an estimate of the velocity of each cell at any time. Without smoothing, the trajectories are too noisy. We use a Gaussian kernel as a filter with standard deviation $σ=2$ and a stencil of $9$ points. The implementation has been done in Julia, the script is in the folder src:

	> include("step2_filter_data.jl")

The velocity of the cells ${\bf v}_i(t)$ at a given time $t$ is estimated using the classical formula:

$${\bf v}_i(t) = \frac{{\bf x}_i(t+Δt)-{\bf x}_i(t-Δt)}{2Δt}$$

Thus, we have now an estimation of the positions ${\bf x}_i(t)$ and velocities ${\bf v}_i(t)$ of the cells $i$. From the velocity ${\bf v}_i(t)$, we also deduce the velocity direction $θ_i(t)$. All the trajectories are saved in jld2 file in the folder data_tracking/step2_data_filtered.

Step 3: statistics in zone

We now perform statistical analysis in specific zones of the experiment. These zones are specified manually (see an illustration data_tracking/step3_data_zone/NPA_stich_3/NPA_stich_3_zones.pdf) and store in a json file called coordinates.json. This file is used in the julia following script:

	> include("step3_zone_create_df.jl")

which creates dataframes containing the analysis on each zone. This script has to be run twice to get both the velocities analysis and correlation functions (see the line 13 in the script).

The results of the analysis can be visualized using the two scripts:

	> include("step3_zone_velocity_plot.jl")
	> include("step3_zone_correlation_plot.jl")

Step 4: classification flock/stream/swarm

To classify a zone as a flock, a stream or a swarm, we take the collection of angle $\theta_i$ inside a specific zone and compare the distribution to three distributions. The three distributions are a (wrapped) Gaussian for a flock, a symmetrize Gaussian for a stream and the constant function for a swarm. We use maximum likelihood and Akaike weight to select which distribution matches the best the distribution of $\theta_i$. From a practical point of view, it suffices to run the following R script:

	> source("step4_zone_testing_distribution.r")

Additional remarks

The Julia scripts have been tested using Julia version 1.6.2 (stable) with the following packages:

  • computing: Revise, ProgressMeter, CSV, JSON, DataFrames, FileIO
  • visualization: PyPlot, LaTeXStrings
  • math: LinearAlgebra, Statistics, DSP

The R script requires the library circular.

References

  1. Schindelin, Johannes, et al. Fiji: an open-source platform for biological-image analysis. Nature methods 9.7 (2012): 676-682.
  2. Tinevez, Jean-Yves, et al. TrackMate: An open and extensible platform for single-particle tracking. Methods 115 (2017): 80-90.

Legal notice information

The programs are distributed under the GNU GPL license version 2. More information are available in the file COPYING.txt. For any information or bugs, please contact me at: smotsch[at]asu.edu.

About

Analysis of glioma dataset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published