Difference between revisions of "Invasion assay"
|Line 54:||Line 54:|
| --- converter
| --- converter
| --- 1.js
| --- 2.js
| --- …
|Line 64:||Line 64:|
/* Example command:*/
Revision as of 06:41, 15 December 2014
Using light sheet microscopy for screening results in a significant number of data sets with each data set requiring image processing that consists of a sequence of computational steps. Each of these steps is time consuming making the analysis of many data sets by hand ineffective. Inspired by the tutorial from Pavel Tomancak (Registration on cluster) we developed a collection of linux shell scripts for (semi)automation of the analysis. These scripts are not meant to analyse time lapse data. Please keep in mind that these scripts are written in a quick and dirty fashion and do therefore not contain any protection against incorrect entries or a data organisation that differs from the following description. Feel free to adapt these scripts to your needs. Please keep in mind that there is no guarantee for error free function of these scripts and macros generated thereby.
The shell scripts were tested on a linux server (not a cluster) with a fiji installation containing the spim registration plugin. It is assumed that analysis of open spim data by hand works fine. The linux shell scripts must be stored on your linux server in a folder containing a subfolder called macros. In this macro folder the subfolders „converter“, „fuse“ and „register“ have to be present. Later you can find the respective generated fiji macros in these sub folders. Take care to delete macros that are no longer useful in order not to mix them up with newly generated macros. Generation and naming of the macros is done automatically. Therefore names may be identical and macros overwrite one another.
/* Commands to: /* change directory: */ cd /path/to/folder /* show content of current directory: */ ls /* create subfolders: */ mkdir converter fuse register /* delete all data within current directory: */ rm *
Data organisation A prerequisite for effectively using these scripts is the following data organisation: Parent folder (e.g. one folder for each measuring day) containing several subfolders each containing original spim data of only one measurement (e.g. control1, condition1, …). These subfolders should be all on the same level (not further nested). In order not to mix original data with computed ones one has to start a shell script first that creates for each measurement a subfolder named „convert” (see below). This folder is located below the folder of the original spim data.
Usage Beside the script generating the convert folder there are two other types of shell scripts: Ones that produce a list of fiji macros and others executing this list one after the other automatically.
Producer linux scripts Scripts generating macros require two command line parameters: first the complete path and name of the parent data folder and as a second parameter a whole number (integer). The producer scripts will generate one fiji macro per data set named with an ascending order of numbers. This order of numbers start with the second parameter that has been added during the start sequence of the shell script. This allows to generate a list of macros containing more than the macros of only one parent directory. For the second parent directory one should use an integer as command line parameter that is greater than the integer naming the last macro of the first parent directory. All macros are stored in one of the folder „converter“, „fuse“ or „register“ (cf. Preparation).
/* Example commands: */ ./1generate_convert_dir /path/to/data
./2convert_TIFFF_TIF_js /path/to/data 1
--- macros | --- converter | --- 1.js | --- 2.js | --- …
Executer shell scripts In order to keep control over data processing the macros generated by the producer scripts are not executed automatically making a pre-check possible. Executer scripts will start fiji in a headless mode and execute the macros one by one. Therefore executer macros do not require any parameter, they execute all macros stored in the respective folder „converter“, „fuse“ or „register“ (cf. Preparation).
/* Example command:*/ ./3execute_convert_macro_js
Detailed description of the shell scripts
The scripts build on one another meaning that the output of one script is the input or a prerequisite for the next one. Therefore the scripts are marked with ascending numbers to simplify usage.
1generate_convert_dir In order not to mix original data with computed ones we create for each measurement a subfolder named „convert“. This folder will be located in the subfolder containing the original spim data. 1generate_convert_dir automatically generates the „convert“ folders in all folders below the parent folder given as a command line parameter. Specify complete path and name of the parent directory, but not a second parameter.
2convert_TIFFF_TIF_js Shell script generates fiji macros doing the pre-processing of spim data (http://openspim.org/Pre-processing). Specify complete path to data and an integer for each data directory as second parameter (cf. Usage). These macros are stored in the folder „../macros/converter“.
3execute_convert_macro_js Executes the macros generated by the 2convert_TIFFF_TIF_js script. Processed data will be stored in the „convert“ subfolder located under the original data folder.
4generate_register_macros Shell script that generates fiji macros doing registration of spim data (http://openspim.org/Registration). Before using this script you have to adopt the registration parameters to the needs of the respective experiment. Specify complete path to data and an integer for each data directory as second parameter (cf. Usage). These macros are stored in the folder „./macros/register“.
5execute_register_macros Executes the macros generated by the 4generate_register_macros.
6generate_fusion_macros Shell script that generates fiji macros doing fusion of spim data (http://openspim.org/Fusion). Before using this script you have to adopt the fusion parameters to the needs of the respective experiment. Specify complete path to data and an integer for each data directory as second parameter (cf. Usage). These macros are stored in the folder „../macros/fuse“.
7execute_fuse_macros Executes the macros generated by the 7execute_fuse_macros.
Specific analysis of SPIM data – Invasion assay:
SPIM allows for three-dimensional imaging of thick specimens. This can be exploited to analyse invasion of different cell types into tissues, e.g. invasion of mesenchymal stem cells into tumor spheroids. The strategy implemented here involves segmentation, i.e. three-dimensional localisation, of both spheroids and invaded cells and measuring invasion depths. In contrast to the prior image processing steps the following macros are conducted directly within the fiji user interface. This allows firsthand control on the analysis.
8bitconversion_macro Fiji macro converting fused spim data to 8-bit files required for further analysis. The macro imports image sequences out of each “convert” folder and stores 8-bit files into a new output directory. Before using this script you have to adopt the scale parameters to the needs of the respective experiment.
InvasionAnalysis_macro Fiji macros doing analysis of cell invasion depths. Both spheroids and invaded cells are segmented and the shortest distance of each invaded cell to the surface of the spheroid is displayed. Analysis is based on the 3D object counter and 3D manager fiji plugins. Before using this script you have to adopt the threshold parameters for segmentation to the needs of the respective experiment.