In order to run an experiment in a Zantiks unit you need to write a script in Zantiks's proprietary software language, zanscript, and then build this script, so that it becomes a .zex file, which you can then upload onto the unit as a service.
Navigate to the Zanscript Directory
The 'Zanscript' link, located at the bottom centre of the Zantiks Control Console page, brings up the Zanscript directory. This page lists all of the zanscripts saved on the unit. The demo scripts and any newly created or uploaded scripts are accessed here.
Explore a test script
While in the Zanscript Directory, click on the 'Edit' button next to the script’s name. This takes you to the Zanscript Online Development environment, where you can make changes to the scripts. Clicking on the script name's hyperlink will open a read-only version of the script. Right click to save it to your device as a .zs file.
The following are examples of a preloaded sample script in the Zanscript Online Development environment, illustrating how demo scripts can be annotated with descriptions of each command. The comments always follow a hash sign and will appear in brown text on this page.
Create a new script from a demo script
When creating a new script, it is often easiest to use parts of scripts from the demo (or sample) scripts we provide. To ensure no permanent changes are made to the demo scripts, copy the text in a demo script into a new script file.
- From the Zanscript directory, click Create New, enter a new file name and click Create file.
- This brings up the Zanscript Online Development page and a scripting box.
- Alternatively, you can write an entirely new script, or copy and paste elements from other demo Zanscripts.
- The script will not autosave as you write. Take care to occasionally click on the Save button at regular intervals.
Once familiar with some of the demo scripts, using amended commands in newly written scripts is recommended. Script amendments can include:
- Trial times: DEFINE commands can be edited to lengthen or shorten trials within the experiment. For example, inter-trial interval times or data collection time bins can be changed.
- Types of stimuli: The colour, shape or style of the stimuli may be edited. For example, a square shape on the built-in screen may be moved to a different location on the screen, changed in size, or replaced with an image.
- Stimulus exposure: The number of times aspects of the experiment can be performed by the system. For example, repeating a stimulus exposure 8 times.
This video illustrates how to write a script, demonstrating the process with the Lights demo script.
Create and load a new service
Once the script is complete, click the Build button. This can be found at both the top and bottom of the page. This saves and compiles the script and brings up the Zanscript Compiler page. The compiler page details any errors or warnings found in the script. It also tells you whether the build is successful or not.
- A "long line warning" will appear if your script has notes. This does not affect the script and can be ignored.
- To go back into the script and make changes, click the Edit/Rebuild link at the bottom of the page.
- If the script has built successfully, navigate to the Home page using the Home link at the bottom of the page.
- To upload a new service, make note of any empty slots, or slots with services that can be overwritten. Navigate to the Settings page from the administration section of the Control Console. The 20 numbered slots below the 'Zanscript shortcuts' heading are used to load scripts to the Home page. In the number box chosen to set the new service, type the script's name ( e.g., aversionlearninggreen) and click Set. Please note: you may need to wait a few minutes to allow the system time to build the zanscript as a .zex file.
- The system will bring up a new page indicating a successful or unsuccessful link.
- Navigate back to the Control Console page, where the new ‘service’ is seen under the relevant slot. The new service is now ready to run!
Assets are bitmap files used to assign detection arenas for tracking or create visual stimuli on the screen. These files need to be uploaded into the Assets directory on the Zantiks unit in order for your script to execute correctly (link to this directory from the Administration section found at the bottom of the Zantiks Control Console page). In a script which tracks animals in more than one arena, an arena asset is needed. To collect data in specified 'zones' within the arena, a detector asset is needed. When tracking one animal within the unit (e.g., 1 adult zebrafish in the AD unit's tank) an arena asset is not necessary as the entire tank is assigned as one arena by default.
Please note that images to be used on the AD unit's side screen need to be adapted as described in the Creating images for the side screen section on the Side screen demo page.
Assets for the AD unit
These assets are specific to zebrafish: A range of assets/bitmap images are included and referenced in the demo scripts for the Zantiks AD unit.
The following images illustrate several different detection setups in the Zantiks AD unit for zebrafish.
operant5hole.bmp, is a detector zone asset which loads 7 distinct zones corresponding to the discrimination inserts supplied with the system. Each colour is mapped against the central colour grid which is read from left to right. starting top left. The system uses these colours to assign detectors a number that will then be used in writing a script. In this example the light blue square references detector1, the red square is detector 2 and so on.
Assets for the MWP unit
Before tracking any model organisms in the MWP unit you need to upload an arena definition file (arena asset) into the MWP's Assets directory. To do this:
- First choose a make of multiwell plate or petri dish that you use regularly in your lab (as each make of plate is produced slightly differently).
- Put the well plate or dish into the MWP unit's chamber, preferably with the lid on. Ensure the plate/dish fits snugly on the stand.
- Click on 'Capture image' at the bottom of the Zantiks Control Console.
- Navigate to the Media directory.
- Download the 'capture.jpg' file and email this this file to us; making sure not to change the format of the file when emailing it.
- We will then send you a .bmp file which you need to upload into the Assets directory.
Edit a service
If at any time you want to change any of the elements in the ‘service’/experiment go back to the Zanscript directory page:
- Click on the Edit button for the relevant experiment's script.
- In the experiment’s Zanscript Online Development page, make the script edits and click on the 'Build' button.
- This will update the Zanscript and the ‘service’, so that when you next run this ‘service’ it will take into account your changes.
Run a service
To run a service go to the Zantiks Control Console.
- Click on the ‘service’ that you would like the unit to run. The name of the service should appear as the ‘Current service’ at the top of the page.
- Click on the ‘Live Video’ button found at the bottom centre of the Control Console page to see a live video of the test environment. The clock at the bottom of the live video screen shows GMT (Greenwich Mean Time). When no service is running in the unit, the bottom centre shows the status of the unit as *IDLE*. See the screenshot (below).
- Click the ‘Run’ button at the bottom right of the Live Video Display page to start the experiment. Note that the system's status notice will read *RUNNING* in a pink bar. A stopwatch on the live video will change to show the running time of the experiment in seconds.
- To stop the experiment at any time, click the ‘Stop’ button at the bottom right of the screen. This terminates the experiment. Clicking ‘Run’ again starts the experiment from the beginning. There is no pause button.
The screenshot above shows the Zantiks Live Video Display page during an experiment.
- The current service is called 'Mariana_memorytask' (ringed in blue oval) and it is 'RUNNING' (see 'RUNNING' is displayed in a pink box).
- The Live video screen shows a live image of the arena - at this point there are zones switched on (see colour blocks) and the unit is tracking a 'fake mouse'.
- The image displayed is small as the camera has been reprogrammed to accommodate a bigger animal, and the camera is taking 15 frames per second (see the line at the bottom of the image 'Target frame rate: 15FPS'. If a smaller animal is being tracked the camera is on its default setting and the live video displays a larger image and the camera takes 30 frames per second.
- The screen is showing the advanced controls - hence the link (ringed in red) says 'Hide advanced controls' - click on this link and you can hide the advanced controls.
- The five advanced controls are marked by the red arrows, if you click on the link boxes you can change the display on both the video recording (if a service is live and programmed to record one), and on the Live video screen accordingly:
Timestamp: click on this and the timestamp will not display.
Lighting: click on this and the overlays (i.e. the visualisations of the detector zones currently programmed) will not appear.
Arenas: click on this and the arena asset will appear.
Zones: click on this and the zone asset will appear.
Reset: click on this and the default settings will display - with timestamp and with overlays appearing when they are programmed to appear.