This experimental demo script is an example of how you could write a light, dark locomotion activity monitoring assay for model organisms that are singly housed in a standard multiwell plate.
This demo can be run in both versions of the MWP as it uses the built-in overhead lights common to both.
The demo script below illustrates how you can monitor the locomotion of small model organisms that are singly-housed in a 24-well plate. In this case the script is set up to measure the behaviour with two different stimuli, a light and a dark environment, where the light is provided by the overhead lights.
INCLUDE ZSYS DEFINE ACCLIMATION 5 DEFINE BIN 10 SET(AUTOREF_MODE,1) SET(DETECTOR_THRESHOLD,6) SET(SEARCH_DISTANCE,10) SET(SEARCH_STEP,3) SET(FILTER_RADIUS,3) SET(MAXIMUM_TARGETS,1) SET(COUNTER1,COUNTER_ZERO) LOAD(ARENAS,"arenas_24.bmp")
The first part of the script details:
- INCLUDE ZSYS which must be included in all zanscripts.
- The two DEFINE commands give values for the two terms ACCLIMATION and BIN which are used in the script.
- The six SET commands are necessary for tracking, and vary according to the size of your model organism.
- The COUNTER1 is set at zero.
- The LOAD command tells the unit to track the model organisms in the arenas as set out in the asset "arenas_24w.bmp". This .bmp file must be saved in the Assets directory.
LOGCREATE("TEXT:TIME|TEXT:|TEXT:|TEXT:|TEXT:VARIABLE|TEXT:CONDITION|TEXT:TIME_BIN") LOGAPPEND("TEXT:A1|TEXT:A2|TEXT:A3|TEXT:A4|TEXT:A5|TEXT:A6") LOGAPPEND("TEXT:B1|TEXT:B2|TEXT:B3|TEXT:B4|TEXT:B5|TEXT:B6") LOGAPPEND("TEXT:C1|TEXT:C2|TEXT:C3|TEXT:C4|TEXT:C5|TEXT:C6") LOGAPPEND("TEXT:D1|TEXT:D2|TEXT:D3|TEXT:D4|TEXT:D5|TEXT:D6") LOGRUN()
The second part of the first section details the following instructions for the unit:
- The LOGCREATE (and subsequent LOGAPPEND) commands tell the unit what text to run out consecutively in a line of cells, with the first cell containing the text 'TIME', cells 2,3 and 4 are all empty (as there is nothing written after TEXT:) and the last cell containing the text "B12".
- LOGRUN tells the unit to output all the previous LOGCREATE (and subsequent LOGAPPEND) commands.
ACTION MAIN INVOKE(BRIGHT,1) WAIT(ACCLIMATION) AUTOREFERENCE(1) LIGHTS(ALL,OFF) INVOKE(MMDARK,1) INVOKE(MMBRIGHT,1) INVOKE(MMDARK,1) INVOKE(MMBRIGHT,1) INVOKE(MMDARK,1) COMPLETE
The Action Main commands above detail the overview of the experiment:
- The Action Bright is invoked once.
- The unit waits for the time detailed in the DEFINE command above.
- An Autoreference image is taken.
- The lights all turn off.
- The Action MMDARK is invoked.
- The Action MMBRIGHT is invoked.
- The experiment is then finished (COMPLETE).
ACTION MMDARK INVOKE(DARK,1) SET(COUNTER1,COUNTER_INC) LOGDATA(DATA_SNAPSHOT,"begin" WAIT(BIN) LOGDATA(DATA_SNAPSHOT,"end") LOGDATA(DATA_SELECT,"begin") LOGDATA(DATA_DELTA,"end") LOGCREATE("RUNTIME|TEXT:|TEXT:|TEXT:|TEXT:ARENA_DISTANCES|TEXT:DARK") LOGAPPEND("COUNTER1|ARENA_DISTANCES:*") LOGRUN() COMPLETE
This Action MMDARK tells the unit to:
- Invoke the Action Dark once.
- Set COUNTER1 to start counting incrementally, in this script it will label the data output in numerical order, and the time bins are labeled 1-6.
- DATA_SNAPSHOT records info at the specific time indicated. Here the data at the beginning of the trial is recorded for later comparison with the next SNAPSHOT. You can change the name by editing inside the " ".
- The LOGCREATE (and subsequent LOGAPPEND) command tells the unit to get ready to output values and text for a line of cells. In this case:
- RUNTIME - the first cell will have the time this line of data is outputted by LOGRUN.
- TEXT: - the next three cells are left empty (cells 2-4), then cell 5 has 'ARENA_DISTANCES' written in it, and cell 6 has 'DARK' written in it.
- COUNTER1 - the current value for counter1 outputs in cell 7.
- ARENA_DISTANCES:* - Each cell from cell 8 onwards will contain the arena distance for each well.
- LOGRUN() - tells the unit to output the data detailed in the previous LOGCREATE (and LOGAPPEND).
ACTION MMBRIGHT INVOKE(BRIGHT,1) SET(COUNTER1,COUNTER_INC) LOGDATA(DATA_SNAPSHOT,"begin" WAIT(BIN LOGDATA(DATA_SNAPSHOT,"end") LOGDATA(DATA_SELECT,"begin") LOGDATA(DATA_DELTA,"end") LOGCREATE("RUNTIME|TEXT:|TEXT:|TEXT:|TEXT:ARENA_DISTANCES|TEXT:BRIGHT") LOGAPPEND("COUNTER1|ARENA_DISTANCES:*") LOGRUN() COMPLETE
The commands in Action MMBRIGHT are very similar to MMDARK, except:
- The Action BRIGHT is invoked once.
- The data output for this period is labelled with the text 'BRIGHT'.
ACTION DARK SET(GPO6,0) SET(GPO7,0) SET(GPO8,0) COMPLETE
The Action Dark section turns all the overhead LED lights off.
ACTION BRIGHT SET(GPO6,1) SET(GPO7,1) SET(GPO8,1) COMPLETE
The Action Bright section turns all the overhead LED lights on to form the colour white:
- GP06 is set at 1 (on) turning on the colour red, similarly the colours blue (GP07) and green (GP08) are also turned on.
Here you can download the light dark demo script for the MWP unit as a .zs file. Right click on the download link below and download / save the file as a zanscript file, i.e. in the same format: light_dark_demo_mwp.zs.
Script download: light_dark_demo_mwp.zs
Setting up the service
First of all check the script:
- Make sure the correct arena definition file (e.g. arenas_24w.bmp) is loaded in the unit's Assets directory. [For information on how to obtain one please read the Assets for the MWP section on the Zanscripts & services page.]
- Check the values of the DEFINE section - use small time values when you test the script.
- 'Build' the script again if you make any changes to it. This will update the service too.
Then set up the chamber and start the experiment:
- If you are monitoring zebrafish larvae you are probably using the diffuser stand. Make sure the stand's legs fit inside the recessed area on the bottom of the chamber.
- Wipe the multiwell plate / dish dry and slot it into the stand.
- From the Zantiks Control Console (home page for this unit) click on the service you are using, check that it comes up on the screen as 'Current service'.
- Click on the 'Live video' button so that you can see the camera view of your plate.
- Click 'Run' to start the experiment - you will see a notice on the screen 'Running'
- When the experiment finishes, the notice on the screen will say 'IDLE'.
The results data will now be available as a .csv file:
- Navigate to the Data directory via the home page.
- There will be two new files in the directory, one with the results from your most recent experiment and the other a compilation of the results from your experiments of the day.
- Click on 'download' to download the experiment's results file, this .csv file can then be opened up on your computer.