Light/Dark locomotion script explanation for larval zebrafish


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.

Top

Script explanation

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.

# define experiment requirements
DEFINE ACCLIMATION 5
DEFINE BIN 10
 
# define the animal model tracking requirements (dependent on animal size) 
SET(TARGET_SIZE,2) 
SET(DETECTOR_THRESHOLD,6)
 
SET(AUTOREF_MODE,MOVEMENT) 
SET(AUTOREF_TIMEOUT,30)
 
SET(COUNTER1,COUNTER_ZERO)
 
# load detector asset
LOAD(ARENAS,"a24.bmp")

The first part of the script details:

  • The two DEFINE commands give values for the two terms ACCLIMATION and BIN which are used in the script.
  • The two 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 "a24.bmp". This .bmp file must be saved in the Assets directory.

Part 2

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:

ACTION MAIN
 
 INVOKE(BRIGHT,1)
 WAIT(ACCLIMATION)
 
 AUTOREFERENCE()
 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:

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:

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:

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:

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.
Top

Setting up the service

Checking the script:

  1. Make sure the correct arena definition file (e.g., arenas_24w.bmp) is loaded in the unit's Assets directory. [See the Calibrating your Zantiks unit page and Asset building in the MWP unit page for details on how to create assets customised to your system.]
  2. Check the values of the DEFINE section - use small time values when testing a script.
  3. '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:

  1. Make sure the diffuser stand's legs fit inside the recessed area on the bottom of the chamber.
  2. Wipe the multiwell plate / dish dry and slot it into the stand.
  3. 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'.
  4. Click on the 'Live video' button so that you can see the camera view of your plate.
  5. Click 'Run' to start the experiment - you will see a notice on the screen 'Running'
  6. When the experiment finishes, the notice on the screen will say 'IDLE'.

The results data will now be available as a .csv file:

  1. Navigate to the Data directory via the home page.
  2. 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.
  3. Click on 'download' to download the experiment's results file, this .csv file can then be opened up on your computer.
Top

Script download

See the featured protocol page, Light/Dark preference test page, for more details on the assay and script downloads to run the assay.


Asset

You will need to upload the asset into the Asset directory on your Zantiks Control Console and ensure the correct asset name is in the LOAD(ARENAS,"name_of_asset") command in the script.

See the Calibrating your Zantiks unit page and Asset building in the MWP unit, Asset building in the AD unit page or Asset building in the LT unit page for details on how to create assets customised to your system.