optoConfig-96 User Guide

optoConfig-96 - Interactive configuration of experiments using the optoPlate-96

User guide for version 1.0.5.

If optoConfig-96 was useful to you, please consider citing the paper:

Thomas, OS, Hörner, M & Weber, W: A graphical user interface to design high-throughput optogenetic experiments with the optoPlate-96. Nat Protoc (2020). https://doi.org/10.1038/s41596-020-0349-x

Installation Instructions

optoConfig-96 is available as a Python package or as standalone bundles for Windows 10 and MacOS 10.15. Installation should not take more than 5 minutes. To upload the generated code to the Arduino Micro controlling optoPlate-96, the Arduino IDE must be installed separately. It is available for Windows, Mac and Linux at the website of the Arduino project.

From PyPI

optoConfig 96 is on PyPI!

  1. Make sure you have Python 3.7 or later installed by running python --version in a terminal.

  2. We strongly recommend to use a Python virtual environment in order prevent compatibility clashes of dependencies. To create one, run python -m venv optoconfig_venv, then activate it:

    1. On Mac/Linux: source optoconfig_venv/scripts/bin/activate
    2. On Windows: optoconfig_venv\Scripts\activate
  3. Install the package in the previously activated virtual environment:

    python -m pip install optoConfig96.

    This will also download and install all necessary dependencies.

  4. In the activated virtual environment, run python -m optoConfig96 to start the application.

Windows 10

  1. Download the windows_optoConfig-96-x.x.x.zip archive from the GitHub Releases page, where x.x.x denotes the current version.
  2. Extract the archive to a location of your choice.
  3. Run optoConfig-96.exe. You may be asked to allow execution of the application.

MacOS

  1. Download the macos_optoConfig-96-x.x.x.dmg disk image from the GitHub Releases page, where x.x.x denotes the current version.
  2. Open the disk image and drag the application to the Applications folder as indicated (or to another location of your choice).
  3. You may be asked to allow execution of a foreign application. To do this, go to System Preferences > Security & Privacy > General and grant optoConfig-96 permission to run. Administrator rights may be required depending on your security settings.

As a Python package

If you do not want to download the package from PyPI, you can download and install it yourself.

  1. Clone the repository by entering:

    git clone https://github.com/WeberSynBioLab/optoConfig-96.git

    in a terminal. Alternatively, download the package from the GitHub Releases page.

    1. If you cloned the repository, you will first have to prepare the package by running python setup.py build sdist in a terminal, in the directory in which the optoConfig-96 setup.py is located.
    2. The package will be created at dist/optoConfig96-x.x.x.tar.gz, where x.x.x denotes the current version.
  2. Make sure you have Python 3.7 or later installed by running python --version in a terminal. Python 3.10 and up is currently not supported.

  3. We strongly recommend to use a Python virtual environment in order prevent compatibility clashes of dependencies. To create one, run python -m venv optoconfig_venv, then activate it:

    1. On Mac/Linux: source optoconfig_venv/scripts/bin/activate
    2. On Windows: optoconfig_venv\Scripts\activate
  4. Install the package in the previously activated virtual environment:

    python -m pip install dist/optoConfig96-x.x.x.tar.gz.

    This will also download and install all necessary dependencies.

  5. In the activated virtual environment, run python -m optoConfig96 to start the application.

Usage

Overview

optoConfig-96 is a program to interactively create protocols for the optoPlate-96 illumination device. It should get you up and running quickly, while providing enough flexibility for complex illumination protocols.

The general workflow to create an illumination protocol looks as follows:

  1. Create Steps. A Step is the basic building block for all subsequent stages and defines illumination parameters for an LED.
  2. Assemble Programs from Steps. One step can be a part of different programs.
  3. Assign programs to LEDs.
  4. Export the code and upload it to the Arduino controlling the optoPlate-96.

Quick Start

This section will briefly explain how to execute the basic workflow.

  1. Upon launching the application, the Plate Configuration dialog will open. Here, you can specify if you want to configure the 1-, 2- or 3-color variant of the optoPlate-96.
  2. Create a new Step in the Step list, or select an existing one. Adjust the Step parameters as desired.
  3. Create a new Program in the Program list, or use an existing one. Select the Program you wish to assign the selected Step to.
  4. Below the Step list, click Assign to add the selected Step to the selected Program. Alternatively, right-click the Step and choose Assign selected to Program…. You can use the same Step multiple times in the same Program, and you can use the same Step in different Programs.
  5. Select the well to which you would like to assign your Program. Below the Program List, select the relevant LED you wish to assign your Program to. Then, click Assign below the Program List. Alternatively, right click the Program and choose Assign program to selected wells…. You can use the same Program for multiple LEDs and wells.
  6. Choose File > Export Code … to generate and display the Arduino code. Copy the code into the Arduino IDE and connect the Arduino controlling the optoPlate to your computer. In the Arduino IDE, choose “Arduino Micro” under Tools > Board, and select the port to which the board is connected under Tools > Port. Then upload by choosing Sketch > Upload. For more help on uploading code to the Arduino, see the Arduino reference.
  7. You are done!

If you identify issues during configurating or running your illumination protocols, please contact us!

Please note that LEDs may light up erratically if power is restored to the Arduino Micro via the optoPlate-96 while it is connected to a computer by a Micro-USB cable. To restore proper functionality, press the reset button on the Arduino, or disconnect the Arduino from your computer and turn the power off and back on again.

Interface

The main application window.

The application window is separated into a few distinct areas:

  1. Step List
  2. Step Editor
  3. Program Editor
  4. Program List
  5. Program Assignment
  6. Well Viewer

Step List

The Step list holds all defined Steps and displays information about them in a tabular format. Steps are the building blocks of Programs. Note that a Step is color-agnostic, i.e. it does not know about the LED it is controlling. Steps have a name and are defined by four parameters (duration, intensity, pulse ON time, pulse OFF time). The time parameters are limited to a resolution of 100 ms and can not be longer than 4294967200 ms (approximately 49 days).

Step Parameters

Table columns

Buttons

Below the Step list, common operations are immediately available.

Context Menu

Right clicking a Step in the list gives additional options.


Step Editor

In the Step Editor, parameters are set for the Step which is currently selected in the Step List.

The Step Editor panel.

Display Settings

These settings do not influence the final Arduino output in any way and only affect how the Step is displayed.

Step Parameters

See the explanation of Step Parameters in the Step List section.


Program Editor

A Program is a collection of Steps which can be assigned to one or multiple LEDs.

The Program Editor panel.

Display Settings

These settings do not influence the final Arduino output in any way and only affect how the Program is displayed.

Program Parameters

A Program is assembled from a sequence of Steps and can be assigned to one or multiple LEDs.


Program List

The Program List holds all defined Programs and displays information about them in a tabular format.

Table columns

Buttons

Below the Program list, common operations are immediately available:

Context Menu

Right clicking a Program in the list gives additional options:


Program Assignment

Here, the Programs which are assigned to the LEDs of a well are displayed.

Cells are colored depending on the LEDs which have a program assigned to them.

The Program Assignment table is formatted like a multi-well plate: Table rows correspond to plate rows, table columns correspond to plate columns.

Each well can hold one Program per LED, but one Program can be assigned to multiple LEDs. The names of all LEDs are shown in each cell, along with the Program assigned to this LED. To facilitate visually distinguishing the assignment patterns, the table cells are colored with muted variations of the LED colors. If more than one LED is in use, a mixed color is used. You can configure the names and colors of LEDs under Configuration > Configure Plate….

To remove Programs from an LED, right click the respective well and choose Clear programs from selected wells.


Well Viewer

The well viewer displays all Programs in a well at once.

The colors that are used for the LEDs can be set under Configuration > Configure Plate… and these are independent from the colors set for the individual Steps.

Display Settings

The display settings are the same as in the Program Editor, with one addition:


Exporting

After defining Steps, creating Programs and assigning them to LEDs, the experimental setup is now ready to be exported to a code file that can be uploaded to the Arduino. To do this, choose File > Export Code …. You can either copy the code and paste it into the Arduino IDE yourself, or choose Open in IDE to launch the Arduino IDE. Connect the Arduino controlling the optoPlate to your computer. In the Arduino IDE, choose “Arduino Micro” under Tools > Board, and select the port to which the board is connected under Tools > Port. Then upload by choosing Sketch > Upload. For more help on uploading code to the Arduino, see the Arduino reference.

Before uploading the code to the Arduino, you may wish to test or inspect your configuration. To do so, choose File > Simulate Experiment ….

Please note that LEDs may light up erratically if power is restored to the Arduino Micro while it is connected to a computer via a Micro-USB cable. To restore proper functionality, press the reset button on the Arduino, or disconnect the Arduino from your computer and turn the power off and back on again.


The File Menu

Simulate Experiment …

Simulate the LED states over the course of an experiment.

The Simulate Experiment dialog.

LEDs are displayed in the style of a heatmap. Each LED takes its color from the Plate Configuration. Colors are saturated based on the intensity of an LED at a given time.

Export Code …

Export the finalized configuration to Arduino code. See also Exporting.

Export Illumination Scheme (csv) …

Export a csv file with tabular information about the illumination protocol.

Exported csv opened in a spreadsheet software

The exported csv has one row for each well, LED type and Step, and columns for Program and Step parameters. The following columns are exported:

The Configuration Menu

Preferences

In the preferences, you can set the path to the Arduino IDE, in order to directly launch it from the Export window.

Configure Plate

The plate configuration allows to set the grouping mode and the characteristics of LED types.

The plate configuration dialog.

Set Fan Speed

You can adjust the fan speed of the fan on the optoPlate from 0 (off) to 255 (maximum speed). The default value is 255. The fan speed needed to provide sufficient cooling will depend on the heat generated by the optoPlate during the protocol, which depends on the number of activated LEDs and their intensities.


The Help Menu

About

Show information about optoConfig-96.

Examples

You can pick from several example files made with optoConfig-96. These mostly replicate the quality control scripts provided with the optoPlate-96. Choosing one will open it.

User Guide

Opens the optoConfig-96 user guide in a browser.


The Status Bar

The status bar displays general information at a glance.

The status bar.