MARKOV PROCESS

Related Topics


HIDDEN MARKOV PROCESS


SEGMENTED k- MEANS ALGORITHM


OuB Interfaces
QUB INTERFACES – AN INTRODUCTION

An overview of all the different topics covered under this, which may be grouped as follows:

•	The different interfaces of QuB (Acquisition, Modeling, Preprocessing, Simulation)

•	The different window environments in QuB.

•	The various menus like File, View, Interfaces, Options

•	The numerous tasks, which can be performed, related to Simulation, Modeling, Preprocessing, Acquisition, different List and File Operations.


Overview of Interfaces
Article I.	OVERVIEW OF INTERFACES

•	QuB has six main graphical layouts (commonly called ‘Interfaces’) namely Acq, Sim, Pre, Mod, Scripts and Mac which represent the main components of the program. You can customize each of these interfaces by selecting the windows you would like to add from the View drop-down menu. For your convenience, each interface contains a default layout of windows that is useful for performing its titled function (Acquisition, Simulation, Preprocessing, Modeling), but any function can be performed in any interface. You can move between interfaces by selecting the icons on the left border toolbar.

•	We can maximize the screen space by deselecting the Buttons Visible item from the Interface menu.

•	The Additional Layouts option in the Interface menu creates additional interfaces. You can create a maximum of 8 additional interfaces. Each user-defined interface is assigned a button on the left-hand side panel. Each button can be assigned a 6 character button name (which would be displayed on the button) and a descriptive name.

•	We can arrange the windows in any combination of floating or docked formats.

a.	The Floating windows format maximizes our flexibility in adjusting the size and position of each window. Windows can be moved anywhere on the screen and can be placed outside of the bounds of QuB.

b.	Docked layouts sacrifice flexibility to economize space. A window can be placed anywhere on the screen, but its size and shape will be constrained so that all of the windows fit within the borders of QuB. In the docked format, windows that are moved out of the area of QuB will become floating windows.

c.	In either format, we can move any window by holding down the left mouse button while the cursor is over the title bar and the dragging the window to the desired position.

d.	We can resize windows by placing the cursor over the border to move (a resize arrow will appear). Then holding down the left mouse button, drag the border until the window is of the desired size. Many windows have separate components divided by frames. You can resize these components in the same manner.

ACQUISITION INTERFACE

PREPROCESSING INTERFACE

MODELING INTERFACE

SIMULATION INTERFACE

SCRIPTS INTERFACE

MAC INTERFACE


Acquisition Interface - Overview
Article II.	ACQUISITION INTERFACE – OVERVIEW

The Acquisition Interface consists of 3 windows as a default setting:

Data Window

Acquisition Input Window

Acquisition Output Window

The Data window contains the various simulated data files.

The Acquisition Input window is used for recording data from an external source like the sound card or an acquisition board.

The Acquisition Output window helps us output the generated waveforms to different instruments.

The links above explains in detail the different aspects of the Data Window, Acquisition Input and Acquisition Output Windows.

Left click on the Acq button located on the left border toolbar to reach this interface.

You can change the layout of the windows in the Acq interface at any time. In the beginning the windows would be in docked format but can be moved about and resized to our preference. The layout will be saved when we exit QUB.


Article III.	PREPROCESSING INTERFACE – OVERVIEW

To preprocess data, it is most important to be able to view the data. The “Pre” interface is formatted with only the ‘Data’ and ‘Report’ windows – you may wish to resize the ‘Data’ window to optimize your view of the data. However, you can perform preprocessing functions in any interface using the Preprocessing toolbar located on the right border of QuB or right clicking in the ‘Data’ window.


Modeling Interface - Overview
Article IV.	MODELING INTERFACE – OVERVIEW

For single channel idealization and kinetic analysis, the Results, Model, Data, and Report windows will be more helpful in serving our purpose. So, for convenience, the default setting of the Mod interface consists of these four windows:

•	Model window, which contains the model builder for the graphical design of models, as well as setting and adjusting rate constants and state parameters.

•	Data window, which displays simulated single channel current data.

•	Report window, which conveys information about tasks that are running or have been completed. We may find this information useful, although it is not necessary to run a simulation.

•	Result window, which displays the different histograms, gives detailed information about the segments in the data and also helps to select segments or clusters with similar characteristics.

Left click on the Mod button located on the left border toolbar to reach this interface.

You can change the layout of the windows in the Mod interface any time. In the beginning the windows would be tiled but can be moved about and resized to our preference. The layout will be saved when we exit QUB.


Simulation Interface - Overview
Article V.	SIMULATION INTERFACE – OVERVIEW

•	We can start the Sim session by clicking the Sim icon located on the QuB’s left border toolbar. Although we will only need the Model builder and the Data display windows to simulate data, the default layout of the Sim interface consists of three windows (see Figure)

a)	Model window, which contains the model builder for the graphical design of models, as well as setting and adjusting rate constants and state parameters.

b)	Data window, which displays simulated single channel current data.

c)	Report window, which conveys information about tasks that are running or have been completed. We may find this information useful, although it is not necessary to run a simulation.

•	Although not part of the Sim layout, the Simulate window allows you to set parameters for a specific Model, the Simulation Parameters, or the display of single channel Data. We can access this window by right-clicking the “Sim” button on QuB’s right border toolbar.

•	When we first open the Sim interface, the Data, Model, and Report windows will be tiled. These windows can be moved and resized to suit our preferences. The Sim layout we design will be saved when we close QuB.

For that matter, any layout, on exiting, will be saved as the default layout.

•	When Sim first opens there will be a two state, two class model automatically loaded into the Model window. This occurs because, by default, there is a check next to ‘New Model’ under the Options drop-down menu. The screen should now consist of a blank Data window, a basic model in the Model window, and a blank Report window.

•	To use a new model at any time, we can erase the current model or create a new model.

To erase the current model, either right-click inside the window and select Delete. We can also delete a single state in the model. For this, select the state by moving the mouse pointer over it and hit the Delete key.

To create a new model, click the New Model icon on the toolbar or select New Model from the File pull-down menu. Sim automatically names the file “noname#.mdl” where the "#" represents a running count of the models unnamed during the current session. You can access a previous model from the current session by selecting its name in the Files list at the right of the Model window


Article VI.	SCRIPTS INTERFACE – OVERVIEW

The Scripts interface is used mainly for writing python scripts and kinetic scripts. The defaults layout of the scripts interface consists of 3 windows:

a)	Python Scripts window, which is used for writing scripts in python. You can add features to QuB using these scripts.

b)	Kinetic Scripts window, which is used to write kinetic scripts. These scripts were mainly used to generate shapes such as pulse, ramp etc. which were applied as stimulus to the data.

But this can now be done through the acquisition protocol window and is the preferred approach to applying stimulus to the data.

To read about the Kinetic Scripts window, click here SCRIPTING LANGUAGE – OVERVIEW

To read about the Acquisition Protocol window, click here ACQUISITION PROTOCOL WINDOW – OVERVIEW

c)	Report window, which conveys information about tasks that are running or have been completed.

You can change the layout of the windows in the Scripts interface any time. In the beginning the windows would be tiled but can be moved about and resized to our preference. The layout will be saved when we exit QUB.


Results Interface - Overview
Article VII.	RESULTS INTERFACE – OVERVIEW

The Results interface is similar to the modeling (Mod) interface. It has the

Data window

Model window

Report window

Result window

The main aspect of the Results interface is the Results window. Left-click on the Results button located on the left border toolbar to reach this interface.

As the name suggests, the result window displays the results of various operations such as

•	Amplitude Estimation (AMP)

•	Idealization (SKM and Half-Amplitude) and

•	Model Optimization (MIL, MIP, Mac, MPL).

The results are displayed as

•	Segments – This gives a detailed description of each segment in the data file. The different variables listed for each segment varies with each operation as mentioned above.

•	Models – This gives the various rates in the model before and after optimization.

•	Histograms – This gives the histograms after idealization and rate estimation. The model should be designed in a way to make the histogram curve fit best.

•	Select – This provides graphs of the variables of each segment with respect to Start time or Index of segments and also as histograms. Each dot represents either a data segment or a cluster, depending on whether normal data or idealized data was chopped. ‘Criteria’ provides ways to automatically locate segments/clusters with desired characteristics without manually selecting them.

The Data, Model, Report and Result windows are explained in detail under Windows in the help file.

As mentioned in previous topics, the layout of the windows can be changed, by dragging them, to suit the user.


Macroscopic Interface - Overview
Article VIII.	MACROSCOPIC INTERFACE – OVERVIEW

For macroscopic currents optimization and analysis, the Results, Model, Data Overlap, and Report windows will be most helpful in serving our purpose. So, for convenience, the default setting of the Mac interface consists of these four windows:

•	Model window, which contains the model builder for the graphical design of models, as well as setting and adjusting rate constants and state parameters. Follow the link to read more on the features of the window.

•	Data Overlap window, which displays simulated multiple channel macroscopic current data. Follow the link to read more on the features of the window.

•	Report window, which conveys information about tasks that are running or have been completed. We may find this information useful, although it is not necessary to run a simulation. Follow the link to read more on the features of the window.

•	Result window, which displays the different histograms, gives detailed information about the segments in the data and also helps to select segments or clusters with similar characteristics. Follow the link to read more on the features of the window.

Left click on the Mac button located on the left border toolbar to reach this interface.

You can change the layout of the windows in the Mac interface any time. In the beginning the windows would be tiled but can be moved about and resized to our preference. The layout will be saved when we exit QUB.


File Menu - Data
Article IX.	OVERVIEW OF ‘FILE’ MENU – OPEN DATA

The file menu consists of various items, which are mainly concerned with opening and saving various files such as normal and idealized data files and model files. The keyboard shortcut for file menu is ALT + F.

The various items and their explanations are listed below:

New Data

This item is used to open a new data file. Selecting this item opens a window called ‘New Data File’. In this, we can select the output file format amongst the various choices. The data file can be renamed from the default name noname# to anything we want. Also, we can select the location where we want to save the file in through this window by clicking the … button. This opens a Save as window where we can select the file name in the Save in text box.

In addition to this, we can change the properties of the data like sampling rate, scaling and also the AD channel count.

Open Data

This item helps us open a saved data file. Clicking this item opens an OPEN window from which we can select the data file we wish to open.

Reopen Data

This item provides us a drop-down list of data files which had been recently used. In other words, it gives a list of the last few data files which had been opened in the program. The basic function is to provide an easy access to frequently used data files.

Next


Article X.	OVERVIEW OF ‘FILE’ MENU– SAVE & CLOSE DATA

Save Data

We use this item for saving our data files. This item is highlighted only when we have opened a NEW data file and are saving it for the first time and also when a saved data file is altered in some way.

Save Data as

This item is also used to save data. This is generally used when we need to rename and save a file. Selecting this opens a SAVE DATA FILE AS window, where we can rename the data file and also select an alternative directory to save it.

Close Data

This item is used for closing the currently used data file.

Close All Data

This item closes all the data files which have been opened. The set of data files which are open can be seen in the data window under the column named ‘Files’.

Idealized Data

Load Idealized Data: This is used for opening data files which have already been idealized and saved. The idealized files are of *.dwt format. Make sure that the data file corresponding to the idealized data file is already open and selected in the Data window. Loading ‘idealized data’ simply overwrites any idealization present in the data file currently open and selected in the data window

Save Idealized Data: This item helps in saving the data which has been idealized by the user. The idealized trace is saved as a .dwt file.

Save Idealized Data as ASCII: This item helps in saving the idealized data as an ASCII text file instead of the native .dwt format. The ASCII file does not hold segmentation information. The values in the output text file are class numbers for each data point instead of amplitude values.

(NOTE: Even though the classes are numbered 1,2,3… the class numbers in the ASCII text file are numbered as 0,1,2… So 0 -> 1; 1 -> 2 and so on.)

Next


File Menu - Models
Article XI.	OVERVIEW OF ‘FILE’ MENU – MODELS

New Model

This item is for creating a new model. A window named ‘New Model File’ opens where we can provide the name of the model file and also the file format. We have a choice between QMF and MDL with the latter being the default format. The default model consists of 2 states one open and one closed.

Open Model

This is used for opening a saved model file.

Reopen Model

This item provides us a drop-down list of model files which have been recently used. The basic function is to provide a shortcut to frequently used model files.

Save Model

This is used to save a model file. The operation is similar to saving a Data file as explained above.

Save Model as

The basic function is to save the model file which is currently opened in the Model window. This is mainly used when we need to rename an existing model file and save it in a different directory.

Close Model

This closes the current model opened in the Model window.

Close All Models

This closes all the model files which have been opened in the Model window. The set of files which are open can be seen in the Model window under the column named ‘Files’.

Next


File Menu  Acquisition
Article XII.	OVERVIEW OF ‘FILE’ MENU–DATA ACQUISITION

New Data for Input Acquisition

This item helps in acquiring new data for input acquisition. In other words, a blank data file is opened for recording data such as single channel data from a sound card or an acquisition board (National Instruments) etc.

Open Data for Input Acquisition

This item is used for opening the previously recorded and saved data from, say, an acquisition board, for Input acquisition.

Assign Data for Input Acquisition

Using this item we can assign the data to be used for input acquisition out of all the different data opened.

New Data for Output Acquisition

This item is used for writing data to instruments/cards. A blank data file is opened for recording data and the stimulus applied.

Open Data for Output Acquisition

This item is used for opening the previously recorded and saved data for Output acquisition.

Assign Data for Output Acquisition

Using this item we can assign the data to be used for output acquisition out of all the different data opened.

Next


Article XIII.	OVERVIEW OF ‘FILE’ MENU

Exit

This is used for exiting the program. The program will prompt you to save any unsaved files when you exit.

Back


Overview Of View Menu
Article XIV.	OVERVIEW OF ‘VIEW’ MENU

The VIEW menu consists of various items which are mainly used for displaying the different windows viz. Data, Data Notes, Data Overlap windows, Model window, Report, Histogram, Scripts, Acquisition Input/Output, Acquisition Manual Control (SShot), Acquisition Protocol windows.

There are some other items QUB Servers and Tasks. All of these items will be discussed and explained as follows:

Data

This item is used for opening the Data window

Data Notes

This item is used for opening the Data Notes window

Data Overlap

This item is used for opening the Data Overlap window

Model

This item is used for opening the Model window

Acquisition Input

This item is used for opening the Acquisition Input window

Acquisition Output

This item is used for opening the Acquisition Output window

Acquisition Protocol

This item is used for opening the Acquisition Protocol window

Report

This item is used for opening the Report window

Results

This item is used for opening the Results window

Histograms

This item is used for opening the Histogram window

Scripts

This item is used for opening the Scripts window

Python Scripts

This item is used for opening the Python Scripts window


Overview Of View menu
Article XV.	OVERVIEW OF ‘VIEW’ MENU

Tasks

This item opens the Tasks View window which shows the various tasks being executed by the program at the present time and also the status of each task. The window also provides us the option of selecting a task and terminating it. This is done by the Stop button.


Overview of Interface Menu
OVERVIEW OF ’INTERFACE’ MENU

The various items in the INTERFACE menu are the following:

Acquisition

This item is used for opening the Acquisition Interface. By ‘Interface’ we refer to the graphical layouts of the various windows in QUB. There is a default layout for each interface.

Click to read about Acquisition Interface.

Simulation

This item is used for opening the Simulation Interface.

Click to read about Acquisition Interface.

Preprocessing

This item is used for opening the Preprocessing Interface.

Clickto read about Preprocessing Interface.

Modeling

This item is used for opening the Modeling Interface.

Clickto read about Modeling Interface.

Scripts

This item is used for opening the Scripts Interface.

Clickto read about Scripts Interface.

Restore Interface Defaults

As mentioned earlier, every Interface has a default layout of certain windows which help in serving the purpose of that function of the program in a more efficient way.

This item helps in restoring the default layout in all the interfaces.

Restore Defaults In All

This item is used to restore defaults throughout the program, that is, in each and every aspect of it. For example, clicking this item will substitute all the parameters in the program (which might have been changed by the user) to the default ones. Also interface defaults are restored.

Floating Windows

This item makes all the windows in the present interface as ‘Floating’. The windows are in the docked format by default. In the floating format, we can move and resize the windows however we want to without any restrictions. More

Buttons Visible

This item toggles the buttons on the left corner of QUB. These buttons are ACQ, SIM, PRE, MOD, Scripts buttons which are used to open the respective interfaces. In fact, these buttons act as shortcuts to those in the Interface menu.

Additional Layouts

The Additional Layouts option in the Interface menu creates additional interfaces. You can create a maximum of 8 additional interfaces. On selecting this item, an ‘Additional Layouts’ window pops-up. Each user-defined interface is assigned a button on the left-hand side panel. Each button can be assigned a 6 character button name ‘button text’ (which would be displayed on the button) and a descriptive name.


Options Menu - An Overview
OVERVIEW OF ’OPTIONS’ MENU

The OPTIONS menu of QUB consists of the following items:

Acquisition Hardware

This item is used to Add/Remove any software associated with the hardware used for Acquisition. Clicking this item opens a ‘QuB Hardware Configuration’ window. This window consists of 2-3 tabs. The first tab is for configuring the hardware; the third tab is for configuring the channels associated with the hardware. The second tab is active only when the acquisition device is a card (an NI card for example). The third tab is also accessible through Acquisition Channels option in the OPTIONS menu.

Acquisition Channels

This item is used for configuring the channels associated with the hardware used for Acquisition. Clicking this item opens the third tab in the ‘QuB Hardware Configuration’ window.

The Acquisition Channels and Acquisition Hardware menu items will be discussed in detail in the next topic

Open Last Data

Selecting this option results in defaulting the opening of the data file (which was last used by the user before exiting), when the program is started again.

Open Last Model

Selecting this option opens the last model used (before exiting the program) when the program is started again.

New Model

When this option is checked, a two state model, open – closed model, is opened by default every time a new model file is created (File menu -> New Model)

Next Topic


Acquisition Hardware and Channels Configuration
’OPTIONS’ MENU

ACQUISITION HARDWARE & CHANNELS CONFIGURATION

The ‘QuB Hardware Configuration’ window consists of three tabs:

Hardware Configure

This tab is used for configuring any hardware required for Acquisition. There are 3 sections under this tab selection:

•	QuB Configured Hardware

This section provides a list of all the hardware already configured by QuB. There is an entry in the table for all the configured hardware. Each entry lists

o	The hardware type (as QuB recognizes it)

o	Device name

o	Input resolution, Polarity and Range

o	Output resolution, Polarity and Range

•	Hardware Configuration

This section is used to edit the settings associated with a hardware (as listed above) which is already configured by QuB. For editing the settings for a hardware, select its entry in the ‘Configured Hardware’ section and click Edit. Edit the required parameter settings like Input and Output Range, polarity and resolution. Click Save to save the changed settings. These settings are then displayed in the ‘Configured Hardware’ section against the hardware entry.

•	New Hardware Setup

This section is used to find and setup any new hardware attached to your computer for data acquisition. For setting up new hardware with QuB, follow the steps given below:

i.	Click on the Search button. Any newly discovered hardware will appear in the list to the right.

ii.	Select the desired card from the list.

iii.	Click Setup button to configure the selected card with QuB.

iv.	A window will pop-up, with information about the parameter settings for the card. Click OK to continue with the settings or cancel to cancel the card setup.

v.	The hardware is configured with 2 analog input and output channels with default settings.

vi.	The tab setting changes to ‘Channels Configure’ showing the channels configured for the selected hardware.

National Instrument Card Setup

This second tab in the ‘QuB Hardware Configuration’ window appears when you select a new National Instruments device on the ‘Hardware Configure’ tab and click on the [Setup] button.  This tab will display some default settings if QUB has settings for your specific card.  When you save the card configuration it will create the new device and some simple I/O channels for you to later modify.  If your card is unknown, you can still setup your card, but you will not receive warnings for incorrect values.

Effective 6/1/2004, QUB will recognize the following National Instruments E-Series cards : 6011,6020,6023,6024,6025,6030,6031,6032,6033,6034,6035,6036,6040,6052,6062,6070,6071.

Note : If your card supports a hardware gain of 0.5, the National Instruments setup software ‘NI-MAX’ will report the maximum range, for example [-10, 10].  In QUB you will need the range at gain of 1, [-5, 5].

Input Range: Select the bipolar or unipolar option and range based on a gain of 1.  Bipolar, 5 would correspond to a range of [-5, 5].  Unipolar, 10 would correspond to a range of [0,10].  Bipolar 5 and Bipolar 10 are the most common settings.

Output Range: Similar to Input Range.  Bipolar, 10 is the most common setting.

Resolution Bits: Most cards use either 12 or 16 bits for input and 0,12 or 16 bits for output.

Channel Initialization:	QUB will create some initial channel configurations for you based on the settings in this box.  Select 0 channels if you do not want QUB to create any channels.  The channels will be created with gain and scaling values of 1.0 and will need further configuration prior to use.

Channels Configure

This tab is used for configuring all the I/O channels associated with a configured hardware device. The types of channels are

•	Analog Input and Output and

•	Digital Input and Output

Note: You need to configure the hardware devices using the ‘Hardware Configure’ tab prior to configuring the I/O Channels.

At the top of the form there is a list of existing I/O channels.  The configured channels are grouped in the list by function: Analog Input, Analog Output, Digital Input and Digital Output. At the bottom of the form are controls for displaying or changing the settings for one channel.  There are two modes of operation for this form, view and modify.

In the view mode, the list of channels is enabled and the controls are used to display settings for whichever channel you select from the list.  Selecting a channel in the list will populate the controls at the bottom of the form.  The controls visible depend on the type of channel selected.

In the modify mode the list is disabled and the controls are used to change settings for the I/O channel. The Edit/Delete/New buttons will be hidden and Save/Cancel buttons will appear when in modify mode.

Edit: Select an I/O channel in the list then click on [Edit] to enter modify mode and change settings for that channel.  Fill in the settings for the new channel and select [Save], or select [Cancel] to return to view mode.

Delete:	Select an I/O channel in the list then click on [Delete] to remove the channel.  A [Yes] [No] prompt will appear to confirm removal of the I/O channel.

New: Click on [New] to enter modify mode and create settings for a new I/O channel.  To copy settings from an existing I/O channel that is similar to the new channel, select that channel prior to clicking [New].  Fill in the settings for the new channel and select [Save], or select [Cancel] to return to view mode.

I/O Type: This drop down box determines the I/O channel type.  Changing the selection will also change which other settings are visible, as appropriate to the I/O type selected.

Name:	A descriptive name for the channel.  This has no effect on the operation of the channel.

Units: Analog Input/Analog output only. Descriptive name for the channel units, such as ‘V’ for volts or ‘pA’ for pico amps.  This has no effect on the operation of the channel.

I/O Channel #: The channel number for the hardware device.  A typical card might have 2, 8,16, or 64 Analog Inputs; 0 or 2 Analog outputs; 0 or 8 digital inputs; 0 or 8 digital outputs.   The channel number is 0 based, so 2 analog outputs would be references as channel 0 and 1.

Update: Acquisition Input / Digital Input only.  On the ‘Acquisition Manual Control’ view, channels which have been set for update will continuously update.  This can be distracting in some cases and limits the utility of manual control, so it is recommended that this not be set unless specifically needed.

Value (edit): Analog Output only. The default output value for the channel.

Value (checkbox): Digital Output only.  The default output state for the channel.

Calibration Factor __ volts/unit: Analog Input/Analog output only.  This is used to convert the voltages read by the card (generally +/-5 volts or +/- 10) volts to desired units.  The calibration factor is set based on a hardware gain of 1.0.  When gains other than 1.0 are used, the Calibration factor is adjusted to compensate.

Hdw Gain: Analog Input only.  Hardware gain is applied to the analog input signal prior to the conversion to digital units.  The allowable gain settings are determined by your hardware.  For example, a National Instruments E-Series card might allow gains of {0.5, 1, 10, 100} or {0.5, 1, 2, 5, 10, 20, 50, 100} or others, dependent on the card.  A sound card will allow a gain of 1 only.  If you do not know the allowed gain settings, a default of 1 should be used.

Setting a hardware gain can increase the precision of your acquisition where signals do not match the full range of the card.  For example, if your card accepts a range of [-5, 5] volts and your signal is within a [-0.5, 0.5] range, setting the gain to 10.0 will increase the resolution within that range and is recommended.  If your signal exceeds the range of your card, for example [-10, 10] setting the gain to 0.5 can bring the signal within the card range and avoid clipping (i.e. limiting the input to the cards range).

Increment: Analog Output only.  On the ‘Acquisition Manual Control’ view, the ‘+’ and ‘-‘ keys can be used to increment or decrement the output value.  The Increment setting determines the amount by which this value changes with each key press.

Device: Select the hardware device to which this channel belongs.  If no devices are listed, you need to create a device on the ‘ Hardware Configure’tab prior to creating channels.


Actions Menu - An Overview
OVERVIEW OF ’ACTIONS’ MENU

The ACTIONS menu of QUB is exactly similar to the right-hand side toolbar in QuB. It simply provides an additional means of accessing the various tasks categorized under Simulation, Modeling, Pre-processing, List Operations and Scripts. This menu is useful when you want to increase the screen area by removing the right-hand side toolbar. This can be done using the ‘Show Buttons’ item in the Actions Menu.

Small Buttons

This item displays only the acronym for the task over the task button on the Task toolbar on the right-hand side in QuB. For example, Idl, IB, Mac, MIL etc. stand for Idealization, Idealize with Baseline correction, Macroscopic Currents Optimization, Maximum Interval Likelihood model optimization.

The description on the task buttons can be changed to Idealize, Idl/base, Mac Rates, MIL Rates etc. by unchecking this item in the Actions Menu. Each button occupies more space but gives a better description of its assigned task.

Edit Buttons

Clicking this item opens a '’Button Settings’ window. This window lists all the tasks under their broad categories/Groups like Simulation, Modeling etc. Select the Task Buttons you need in each layout by putting an X mark against it. The different layouts (ACQ, SIM, PRE, MAC, RESULTS, SCRIPTS and user-defined layouts/interfaces) available can be accessed using the left-hand side Layout toolbar in QuB.

Click Save to save the changes and Restore Defaults to default to the original settings.

The Restore Defaults button is same as the ‘Restore Button Defaults’ item in the Actions Menu.


OVERVIEW OF DATA WINDOW

‘Data’ window displays simulated single channel current data. It consists of two panels: a low-resolution window and a high-resolution window.

The window shows several “traces” of data (each line is referred to as a “trace”) in the low-resolution window (the upper panel of the ‘Data’ window). Any data selected in the low-res window will be displayed in the high-resolution window, which displays a single line of data.

For selecting data, hold down the left mouse button and scroll over a selection of data. The highlighted data will change color and the high-resolution window will be refreshed instantly. You can resize the display windows by placing the cursor on the border between them and dragging it up or down while the holding down the left mouse button. Browsing through the data can be done using either the scroll bar and the mouse, or the keyboard. The data file can be edited just like a word document. On the pop-up menu (which you get by right-clicking anywhere in the data window or double-clicking any data file in the Files column), you will find commands such as Cut, Copy, Paste, Delete, and Undo which should all be familiar. A chart outlining all of the browsing and selecting commands is included here.

Details of the right-click or pop-up menu are given in a later topic. Click here

Hold the mouse arrow over data in either the high-resolution or the low-resolution window and a yellow ‘Tips Window’ will appear with information about data that is selected within the frame. The following information is displayed:

Start (s or ms): the start time of the segment in seconds or milliseconds

Length (s or ms): the length of the segment in seconds or milliseconds

Avg: the mean amplitude

Std: the standard deviation of the mean amplitude

Points: the number of points and the location of the selection (in points)

Segment: the segment number over the total number of segments

The ‘Properties Window’ contains additional functions for altering the display and data properties. To access this window, right click in the ‘Data’ window and select Properties from the pop-up menu. (You can also press [Ctrl] + [P] on the keyboard to open this window). The properties window will be discussed in detail in a later topic. Click here

The data window also has four columns or panels at the right hand side: Files, Results, Selection Lists and Selections. Each of these panels will be explained in the topics below.

SELECTIONS AND LISTS COLUMN

FILES AND RESULTS COLUMN


DATA FILE FORMATS & READING A DATA FILE

Data File Formats

QuB can read several file formats; each format has its own limitations:

 .ldt: This is a binary format used by QuB. Segmented data can be stored in these files, but only one data channel can be saved.

.dat: Binary format used by pClamp and other programs including QuB. Multiple channels can be stored in this format, but segmented data cannot.

.abf: Binary format developed by Axon instruments and used by pClamp and other programs. This format is read only. QuB correctly opens ABF floating point data now.

.wav: Windows format used for music files. Up to two data channels can be stored in this format, but not segmented data.

.qdf: QuB binary format which can store several channels of segmented data.

.pul: HEKA pulse format.  Read only.  Must be accompanied by a *.dat file.

.evl: AXON event list file. This format dates back to Pclamp 6.0 version. If QuB doesn’t open this format satisfactorily, please report at mailto:contact@www.qub.buffalo.edu

Reading a Data File

1.	To open a data file, select Open data from the File drop-down menu – the ‘Open’ window appears.

2.	Use the ‘Look in’ box to locate folder that contains the file you would like to open.

3.	Highlight the file you would like to open so that its name appears in the ‘File name’ box and left click ‘Open.’  The data should appear in the ‘Data’ window according to the display parameters you have set.

Note: Only file formats that are listed in the ‘Files of type’ box will be displayed in the ‘Open’ window. If you have trouble finding your file, make sure that the appropriate file format is listed. To change the file type(s) listed in the box, left click the down arrow on the right side of the ‘Files of type’ box and left click the appropriate file format.

4.	Although several data files can be opened simultaneously, only one can be seen at a time. View an open file simply by left clicking its name in the Files column in the upper right corner of the ‘Data’ window.


DATA WINDOW - RIGHT CLICK MENU

The right-click menu or the pop-up menu in the data window consists of various control buttons for data focusing, baseline correction, data editing and data window properties.

Expand and Un-Expand

Any data selected in the low-resolution window will be displayed in the high-resolution window. Expand and Un-Expand work in the high-resolution window only. Select (or highlight) a part of the data in the high-resolution window and click ‘expand’ from the right-click menu to zoom in/ focus on it. ‘Un-expand’ is for zooming out on the data in the high-resolution window but works only one level backwards. The Hotkeys for ‘Expand’ and ‘Un-expand’ are H and U respectively.

Baseline

Baseline correction attempts to eliminate drift and fluctuations in the data recording. You specify a number of baseline nodes that correspond to inflexion points in the time course of the experimental record. At each node the amount of deviation from the ideal baseline is determined, and between nodes the correction is obtained from a linear interpolation.

Set Baseline

Select a portion of the data which you think best fits as the baseline and click ‘Set Baseline’ from the right-click menu. This shifts the entire data up or down according to the new baseline. Shortcut key for this is B.

In other words, this button offsets the whole file by the average selected current. This offset occurs whether or not "Bline apply" is checked. "Set baseline" also defines the "Baseline selection" (list), which is used to "Erase" a selection of data.

Baseline Nodes

Select a portion of baseline. Open the ‘Data’ window pop-up menu and click Add a baseline node (or use the shortcut key [Ctrl]+[n]). A baseline node will be generated in the middle of the selection. (Note that Draw baseline nodes in the ‘Properties’ window must be checked for you to view baseline nodes.) Continue this process at each point where you see an inflection in the baseline until you have applied nodes throughout the file.

Check the Bline apply checkbox in the toolbar (or check Baseline On in ‘Data’ panel of the ‘Properties’ window). At each node, the baseline will have its DC offset corrected and brought to zero. Segments in between nodes will be corrected by linear interpolation. Alternatively, if these boxes are checked while you are adding nodes, the baseline will be adjusted every time you add a node.

Check the baseline correction. Additional nodes may be added, in the same way. If necessary, all the nodes within a highlighted selection may be deleted, by selecting BaselineDelete selected nodes from the ‘Data’ window pop-up menu. Alternately, all the nodes can be deleted by selecting BaselineDelete all nodes.

Markers

A marker is a horizontal line which acts as a reference for an amplitude level. You can add or remove a marker using ‘Add a Marker’ or ‘Delete a Marker’ tabs on the Right-Click menu. The marker is visible only in the High-resolution Data window.

Curve-Fitting

This menu option is visible only in the high-resolution window. This tab brings up the Curve-Fitting window. It helps to decide and fit a curve which best describes the selected data.

‘Delete Fit’ deletes the fitted curve.

Editing Data

The data file can be edited just like a word document. On the pop-up menu, you will find the following commands that should all be familiar: Cut, Copy, Paste, Delete, and Undo. Erase allows you to replace a selection of data with baseline. This feature is useful for removing transients or short glitches from the baseline without affecting the time constants between openings.  Break segment allows you divide a segment into two at a specified point. The number of Undo levels is unlimited, but once a file is saved, the edit options cannot be undone.

Each of these commands can also be accessed through the classic Windows edit keyboard shortcuts given here

Holding down the [Shift] key while invoking the pop-up menu or pressing one of the shortcut keys will make the command apply to the entire segment. (i.e., Cut segment, Copy segment, Paste as segment, Delete segment)

Delete and Join Idealized Trace

Select a portion of the data and click ‘Delete Idl’ to delete the idealized trace in that portion. ‘Join Idl’ is used to extend the idealized trace from one point to another. It modifies the idealized trace in the selected portion to be same as that at the start of the portion.

To erase some dwells by joining them with the previous dwell, select them, right-click, and choose "Join Idl".

Properties

This opens the ‘Properties’ Window which contains additional functions for altering the display and data properties. The next few sections discuss features and functions of the Properties window


PROPERTIES WINDOW - OVERVIEW

The ‘Properties’ Window contains additional functions for altering the display and data properties. To access this window, right click in the ‘Data’ window and select Properties from the pop-up menu. (You can also press [P] on the keyboard to open this window.) There are four panels in this window: Colors, Display, Data and Info (outlined in the following sections). The buttons at the bottom of the window perform the same functions in all three panels:

OK: updates the display and closes the ‘Properties’ window.

Apply: updates the data without closing the ‘Properties’ window.

Reset: restores all the properties to the values they had before any changes were made or the Set as Default button was clicked.

Set as Default: stores the properties with their current values into the Windows registry – they will apply to any newly opened file. This includes the dead time also.

Cancel: closes the ‘Properties’ window without updating the display.

Links to the sections on the different panels of the Properties Window.

Color	Display	Data	Info


PROPERTIES – COLORS

The Colors Panel is used to change the color of any component of the display. Components like background, data selected, cursor, baseline, baseline nodes, idealized trace, frame and panel can be given different suitable colors to aid in better viewing of the data.

You can change the color of any component of the window by left clicking on the color bar you would like to change and selecting a new color from the ‘Color’ window. Click Set as Default to have the settings apply to subsequent files Click OK to apply the change and close the window.


PROPERTIES - DISPLAY

The Display Panel allows you to change display parameters.

Traces per page and Points per trace

These affect the resolution of the low-res window.

Cache size:

This represents the amount of data points, per data channel, that are loaded into memory at a time. A larger value will allow for less frequent disk accesses, but longer access time, while a smaller value will have the opposite effect. A warning will appear if you try to close the ‘Properties’ window without setting this value high enough to at least accommodate a single frame of the display (i.e., you would like to display several traces, each containing many data points).

Change trace on break

This tells QuB to begin each segment at a new trace

Overlap channels

QuB will display the multiple data channels as overlapped

Overlap traces

QuB will display the different traces as overlapped for comparison.

Draw points

When very short segments of data are highlighted, the individual data points will appear in the high-resolution window if this box is checked.

Draw inverted

QuB will invert the data.

Draw baseline

The baseline is displayed over the data.

Draw baseline nodes

When correcting the baseline, baseline nodes will appear over the data.

Draw idealized

QuB will display the idealization superimposed on the data.

Above data: idealization will be displayed above the data.

Colored: each conductance class in the idealization will be represented by its color in the model.

(The Draw idealized and above data functions can also be performed using the toolbar by checking the Idl show and above boxes, respectively.)

Margins

This allows you to change the size of the borders around the ‘Data’ windows.


PROPERTIES - DATA

The Data Panel contains additional display parameters as well as two data parameters that can be customized. All changes that are made in this panel will only affect the data channel that is indicated in the Channel index box. If you typically only analyze a single data channel, the default value of zero is appropriate.

Display Parameters:

Auto scale: the min and max “Y” values for the traces in the file will automatically be scaled to fit the single channel amplitude. "Auto" display scaling now uses the processed data (baseline, filter).

Data Y Min, Data Y Max: allows you to scale the “Y” values to view your single channel data in each trace.

Filter On: the data are low-pass filtered using the user-input cut-off frequency, and then displayed. Note that only the display is affected; the content of the file remains unchanged. (Can also be done by typing a value for the frequency in the toolbar Filter box and then checking the Filter checkbox)

Note: when the filter is set well below the maximum (low cut-off frequency), processing time may increase significantly. For efficiency, the incoming data should be sampled near the Nyquist limit.

Moving average: This enables / disables the moving average filter. This gives a fast but rough filter estimate.

Moving average points: The number of points decide how well the moving average filter works

Frequency: allows you to set the frequency (in kHz) to filter to.

Baseline On: applies the baseline correction. (Can also be done by checking the Bline apply box on the toolbar.)

Data Parameters:

Sampling: The rate at which data is acquired / simulated – affects the time scale of your simulated data.

Scaling: The conversion factor between A/D units (used by the acquisition card) and the actual value of the current. A large scaling means better resolution, but too large a value may result in overflow.

Display buttons on the toolbar: On the toolbar you can use the following buttons to alter the display.

Auto: automatically fits the data on the Y-axis.

+, -: increases (+) or decreases (-) the size of the data on the Y-axis.

Up arrow, down arrow: moves the level of the data up or down (respectively)

? : fits the data to on the Y-axis based on the max amplitude of a highlighted segment.

Each channel in a data file has a Name, Units and Scaling. For data stored as integers:

         x (V)     = intval / ADScaling     [ADScaling = 2^bits / range (V)]

         y (Units) = x (V) / Scaling

The name, units and scaling values change with channel number.


PROPERTIES - INFO

Experimental Conditions

Different experimental parameters can be added or deleted by using the Add Delete buttons. To give names and values to the new parameters, click the box under the respective column. When the box is outlined, type the corresponding entry.

NOTE: dead time (tdead) is placed at upper-right corner of QuB.


SELECTIONS & SELECTION LISTS PANEL

A selection list allows you to group several data selections for a later program action (i.e., data extraction, analysis, etc.). Any selection list can be extracted from the original data file. An advantage is that the memory is not wasted by storing the actual data, but only a list of start-end references. In addition, the extraction moment can be delayed until the selection list has been double-checked, and the original file remains unaffected.

‘Lists’ and ‘Selections’ panels

When you create a selection list, the list name is displayed in the ‘Lists’ panel – this allows you switch between multiple active lists that pertain to the active data file. Switch between lists by clicking the name of the list you want to view. The ‘Selections’ panel will display the selections (in points) of the highlighted list. Clicking on a selection will highlight it; double-clicking a selection from a list, the display will automatically select that part, which in turn is displayed into the high-resolution window

Selection lists can be generated either manually using the List Menu or by using Chop IDL or Data Chopper

Right-clicking anywhere in the selection list panel gives the option to load an existing list. An open list can be renamed, saved or deleted by right-clicking on it in the panel.

A Selection can be labeled by right-clicking  Properties. A comment can also be added for each selection.

Data in the current selection list is highlighted. To turn off the highlight or customize the color, right-click the data, choose Properties)

Each selection in a list can have a label and a comment:

•	right click a selection to edit its label

•	right-click the AddS (add selection) button to add a labeled selection.

When you idealize a selection or list, it no longer clears the idealization in the rest of the file.

NOTE: "List show" checkbox at upper right corner of QuB.


FILES AND RESULTS PANEL

Files

The files currently opened in the data window are listed here. Double-clicking the file name here opens the data window properties for that file. This is same as Right-clickProperties on a file name. Right-clicking also gives an option to enable / disable the tips window for that file.

Results

A results entry is generated for each operation on the data file like Idealization, MIL, MIP, MAC, IB etc. This panel lists these different results. Results are listed with their data file, above selection lists. They will persist across QUB sessions.

•	Session info (idealization, baseline, results) is preserved if you edit data but don't save changes.

•	Results are listed (to the right of data) by name and data source

•	To clear out a bunch of old Results, shift- or control-click to multi-select, then right-click and choose Delete.

•	Right-click a point in Results: Select to see its "segment number". Also the segment is highlighted in the data window.

•	Only recent results are kept (totally 7 recent most files). To keep a result indefinitely, right-click its entry in the data window and choose ‘Hold Results’.


OVERVIEW OF DATA NOTES WINDOW

The Data Notes window helps to keep notes and updates about a particular data file for future reference. It is just like a normal text file with the advantage that it need not be saved separately. The data notes window information is saved along with the data file. Changing data files from the ‘Files’ column in the data window, instantly changes the data notes information to the corresponding data file.


OVERVIEW OF MODEL WINDOW

The ‘Model’ window contains a model builder for the graphical design of models, as well as setting and adjusting rate constants and state parameters. When QuB first opens there will be a two-state, two-class model automatically loaded into the Model window. This occurs because, by default, there is a check next to New Model under the Options drop-down menu.

To create a new model, select New Model from the File drop-down menu. When a new file is created, Sim automatically generates a file called “noname#.mdl” where the "#" represents a running count of the models unnamed during the current session. You can access a previous model from the current session by selecting its name in the ‘Files’ column at the right of the ‘Model’ window.

The different aspects of Model building and model window will be covered as follows:

Building a model

Setting rate constants

Model window right-click menu

Model window properties

State and Class properties


BUILDING A MODEL

There are a few basic steps involved in creating a model. These are outlines below:

Create New Model toolbar button:

On selecting this button, the ‘New model file’ window will pop-up, allowing you to: name the new model, select the file type (.mdl or .qmf), and select its location. Clicking the ‘…’ button to the right of the ‘File name’ window will allow you to browse for the desired file location. Click OK, and a simple 2-state, 2-class model will appear in the ‘Model’ window. If multiple model files are open they are listed in the ‘Files’ column of the ‘Model’ window. To remove other models, right-click on a file name and select Close.

Add a state to a model:

Left click anywhere within the ‘Model’ window. A new state numbered "3" should appear with the default class color (Class 0, black).

Note: the ‘Model’ window must first be active (by clicking inside it) for this to occur.

Drawing a connection between states:

Position the mouse pointer over one state, hold down the right mouse button while dragging a line to the other state. When over the 2nd state release the mouse button and a connection line with 2 new rate constants (default value is 1000) should appear.

Changing the class of a state:

To change classes, simply double-click the left mouse button on a state or else right-click on a state, go to the ‘Properties’ window, and select a different color. If you make a mistake, you can delete a state by right clicking on it and selecting Delete state. (You can also delete a state by placing the mouse arrow over it and pressing [Delete].

Add State Amplitudes and Standard Deviations:

Position the mouse pointer over any state – a pop-up window appears which lists the state values: pr0 for the probability of starting in that state, amp for amplitude of the current passing through the channel at that state, and std for standard deviation of the current. (grp is reserved for future use, and will not be discussed here.) To change these values, Right-Click on the state and select Properties: a ‘State and class properties’ window appears. Add the initial probabilities of the classes here. The default value for Standard Deviation for class 0 (black) is "0.1". The default value for other colors is > 0.1 and can be changed. Note that changing the Class properties of a state will automatically change all other states of the same class in the model.

Moving the model around in the ‘Model’ window:

Position the pointer over any state. Hold down the left mouse button and drag the state to anywhere in the ‘Model’ window until you are comfortable with the position (the connection lines will follow). When you are comfortable with the positioning of the model, continue on.


SETTING RATE CONSTANTS IN THE MODEL

Position and hold the pointer over any of the rate constants. A help window pops up with the default settings for the rate constants. There are two sets of rate constants for each connected pair of states in the model window: The Forward rate constant and the Backward rate constant. For example, consider states 1 and 2. From state 1’s perspective rate 12 is forward and rate 21 is backward.

Double click the rate constant on the each side of the arrow to change the rate constants. The ‘Rate properties’ window appears.

For a rate which is neither voltage nor ligand dependent just Change k0 and click OK to return to the model builder. Notice that the rate constant value has changed.

For a rate which is voltage or concentration dependent,  check either box: P, ligand; or Q, voltage. When modeling voltage dependence, be sure to set the k1 value to a non-zero number.

Click Apply – the symbol (“p” or “q”) corresponding to the variable you selected will appear in the model next to the rate. This signifies that MIL or any other model optimization algorithm will consider the rate dependent on the specified variable when the model is fit to the data. Click OK to set this change.

Note: The dependence of every rate in the model is defined by the equation displayed in the ‘Rate properties’ window (and discussed in part C of Tutorial I). For rates that are not dependent on either concentration (P) or voltage (Q), it can be said that these terms have values of 1 and 0, respectively. Then K = k0. If you set a rate as concentration dependent, this rate changes by a factor of the ligand concentration. Likewise, a voltage dependent rate is assumed to be an exponential function of the voltage.

Also go through Tutorial 3 – part C


RIGHT-CLICK MENU OF MODEL WINDOW

The right-click menu of the model window has the following controls:

P Equilibrium

Calculates the entry probability for each state at equilibrium, given the rate constants. You have the option of just calculating the various parameters like A matrix, Q matrix, P equilibrium, eigen values etc. or calculating and assigning the probabilities to the model.

Cut, Copy, Paste

These controls are used for copying, deleting and pasting the entire model. The delete key works only with the highlighted state.

Grab

The ‘Grab all Amps increasing’ and ‘Grab all Amps decreasing’ tabs are used for assigning average amplitude and std. deviation values to the classes of the model. First select a small piece of data containing all conductance levels. Choose ‘Grab all Amps increasing’ if Open state is UP and ‘Grab all Amps decreasing’ if Open state is DOWN.

Properties

This button opens the Properties window of the Model window. This window has 5 panels or tabs viz. Colors, Display, Model, Kinetic Constraints, Amplitude Constraints. Each of these panels will be explained in the later sections. The buttons at the bottom of the window perform the same functions in all the panels:

OK: updates the display and closes the ‘Properties’ window.

Apply: updates the data without closing the ‘Properties’ window.

Reset: restores all the properties to the values they had before any changes were made or the Set as Default button was clicked.

Set as Default: stores the properties with their current values into the Windows registry – they will apply to any newly opened file.

Cancel: closes the ‘Properties’ window without updating the display.

We will now see in detail the different panels of the properties window

NOTE:  removed right-clickdelete model feature present in earlier versions.


PROPERTIES OF MODEL WINDOW

This window can be accessed by right-clicking anywhere in the model window and selecting Properties. The keyboard shortcut is [ctrl]+[P].

The different tabs at the top of the window are explained as follows:

Colors Panel:

The Colors Panel is used to change the color of any component of the display. Components like background, rate lines, rate panels, Class, frame and panel can be given different suitable colors to aid in better viewing.

You can change the color of any component of the window by left clicking on the color bar you would like to change and selecting a new color from the ‘Color’ window. Click Set as Default to have the settings apply to subsequent files Click OK to apply the change and close the window.

Display Panel:

State panel Size:

This varies the size of the panel of the states. The value can be between 10 and 100.

Rates Line Width:

This varies the width of the rates lines. Value varies between 0 and 20.

Margins:

This allows you to change the size of the borders around the ‘Data’ windows.

Model Panel:

Channel Count: this decides the number of data channels in the data simulated by SIM. The 'Channel Count' in the model and the file list reflect each other.


STATE AND CLASS PROPERTIES

The state and class properties window for any state can be accessed by right-clicking that state and selecting properties. The buttons at the side of the window perform the same functions as before:

OK: updates the display and closes the ‘Properties’ window.

Apply: updates the data without closing the ‘Properties’ window.

Reset: restores all the properties to the values they had before any changes were made or the Set as Default button was clicked.

Set as Default: stores the properties with their current values into the Windows registry – they will apply to any newly opened file.

Cancel: closes the ‘Properties’ window without updating the display.

Grab: this is used for assigning average amplitude and std. dev. from the data selected in the data window.

Starting Probabilities:

Gives the starting probability of the state i.e. the probability that the system starts from this state.

Class:

Denotes the type of class of the state. The panel colors are single colored for classes till 10 and are a combination of colors from 10 onwards.

Amplitude and St Dev.:

This gives the amplitude and standard deviation associated with that particular CLASS (not state). When a adapt portion is selected in the data window and then its avg. amplitude and Stdev values are grabbed to this state, then the amplitude and Stdev values are automatically updated.


Acquisition Input Window
ACQ INPUT WINDOW - OVERVIEW

The Acquisition Input window is mainly used for recording data from an external hardware source like the sound card or an acquisition board. We will explain in this section the various aspects of the Acquisition Input Window in detail.

It basically functions as a VCR with similar control buttons as Play, Stop, Pause and Record. When we have set up the input hardware device as mentioned above, we can start recording the data from it.

A green marker in the lower part of the window indicates a warning. It is either that the hardware device is not configured with QuB or that a data file for input acquisition is not assigned.

To configure hardware, click Options -> Acquisition Hardware from the QuB menu. A window named ‘QuB Hardware Configuration’ opens where you can configure the hardware. For more information on hardware configuration with QuB, click here. Hit ‘Back’ on the help window to return to this topic.

Part of the window is like an oscilloscope where we can see the activity coming in through the hardware. The number of dark red lights illuminated below this oscilloscope gives the number of bits required to represent the data recorded.

We will next explain the various control buttons and how to use them to acquire data.


ACQ Window Control Buttons
CONTROL BUTTONS

The various control buttons in the Acquisition Input window are basically used for displaying and recording the data coming in from the hardware device such as a National Instruments acquisition board.

The control buttons are the following:

Channels

This button is used to specify the channel Acquisition Input channel from which data should be recorded. A window pops-up when this button is clicked; select the desired input channel in this window.

Play

When everything is set up properly, pressing this button initializes the hardware and starts it.

Record

This button is used to begin the recording of the data coming in from the associated hardware. We can observe the data being recorded in the Data window at regular times depending on the buffer length setting.

Stop

This button stops both the display and the recording process.

Pause

This button stops the recording process only.

If the recording process is stopped and then started again, the data being recorded starts in a new segment. In addition, the recording can be done in three ways as explained below.

Note: To save the data recorded, stop the display and the recording process by pressing the ‘stop’ button. Pressing just the ‘pause’ ( || ) button will not allow you to save data.

Continuous

When this option is checked, the recording is done in a continuous way and we can stop the recording process as and when we want by pressing the Pause or Stop button.

Time (H:M:S)

With this option selected, the recording is done for a fixed amount of time given by H (Hours), M (Minutes), S (Seconds). This option is particularly useful when we cannot be in front of the program for a long time during the recording process.

Points

When this option is checked, the program records data for a fixed number of data points which can be set by the user.

The more commonly used option is the Continuous recording option.

Sampling

This gives the rate at which the incoming data from the hardware device is sampled. For example, this value is set to 44.1 kHz in case of sound cards.

Scaling

The value of scaling is calculated from the parameter values of DAQ Range, DAQ bits, DAQ gain, Data gain and DAQ +/-.

Buffer Length

This value gives the time in ms (milliseconds) for which the data is recorded before being transferred to the data window for recording the next set of data. In other words, data coming in is buffered for the specified amount of time before being displayed in the data window. This value defaults to 1000 and should not be set too high or too low.

Data

We can specify the data file in which the acquired data should be recorded by selecting a file from this drop-down menu. Only opened data files are displayed in this menu as options.

We will now go through the Oscilloscope Properties of the ACQ Input window.


ACQ Window Oscilloscope Properties
ACQ INPUT – OSCILLOSCOPE PROPERTIES

The various options in this window are for altering the display properties of the data coming from the associated external hardware.

Channel Index and Offset

If there are more than one A/D channels, then we might want to give a different offset to each channel for better viewing of the data from the various channels. The different A/D channels are represented by their respective channel index. We can hence associate an offset for each channel index using these options.

Visible

This option toggles the display/visibility of incoming data in the oscilloscope window. This option can also be varied for each A/D channel if more than one.

[ * The above four parameters are all used for better viewing of the different data when there are more than one A/D channels]

Time Resolution

This parameter gives the refresh rate of the displayed data in seconds and also the width of the oscilloscope display. For example, the data display is refreshed every x seconds where x is the value entered by the user. Also the oscilloscope width will be of x seconds.

Show Min/Max

This option when checked shows two pairs of lines denoting the maximum and minimum amplitude of the incoming data respectively. One pair is for Min/Max since the play button was pressed and the other pair is for each refresh.

RMS

This option when checked shows a line denoting the RMS (Root Mean Square) amplitude of the incoming data for each refresh.

Draw All Points

This option is used for displaying all the points being recorded. It slows down the display.

Filter (points)

Checking this option applies a moving average filter to the displayed data. In the data box next to the check box, we can provide the number of data points to be averaged at a time. The more the number of points, the lower is the low pass frequency of the filter which leads to more filtering of noise.

Colors

Here we can set the colors for various aspects of the Acquisition Input window like the Background, Frame, Panel, Data etc. For selecting a different color for a particular aspect, just click on the color. This brings up a Color window where we can select the color of our choice.

Ok, Apply

These buttons are used for applying the changes made in the window. Ok button also closes the window.

Set as Default

This button sets the values of the various parameters in the window as the default values.

Reset

This button resets the changes made in the window to the preset default values.

Cancel

This button negates all the changes made and closes the window.


ACQUISITION INPUT PROPERTIES

NOTE: NOT INCLUDED AS OF 5/23/04

The various elements of the properties of acquisition input are enlisted as follows:

Data Channel and DAQ channel

The data file may have more than one data channel. Also there may be many A/D channels coming in from the hardware. Using the above two options, we can associate a data channel with a A/D channel.

Between these two options there is an arrow () which denotes the mapping.

DAQ Range

This factor depends on the hardware used and varies with it. It gives the total range of amplitude of the data displayed. For example, if the hardware range is ±10V, then the DAQ Range is = 20V.

Data Gain

This is the gain of transformation between the measured quantity and the recorded quantity.

DAQ Gain

This is the gain provided by the hardware device.

DAQ Bits

This value also depends on the hardware device used. For example, if we use a 16 bit sound card, then this value will automatically be set at 16.

Sampling

This gives the rate at which the incoming data from the hardware device is sampled. For example, this value is set to 44.1 kHz in case of sound cards.

Scaling

The value of scaling is calculated from the parameter values of DAQ Range, DAQ bits, DAQ gain, Data gain and DAQ +/-.

Buffer Length

This value gives the time in ms (milliseconds) for which the data is recorded before being transferred to the data window for recording the next set of data. In other words, data coming in is buffered for the specified amount of time before being displayed in the data window. This value defaults to 1000 and should not be set too high or too low.

Hardware

This specifies a class of devices. We can have more than one class. For example, an acquisition board from National Instruments is a class and sound cards are a different class. We may have more than one device for every class of hardware. If more than one hardware types are added through the Acquisition Hardware tab in the Options menu, then we can select one class using the drop down menu.

DAQ device

This denotes the Data AcQuisition device. If more than one external device is added for every class of hardware, then we get a scroll down menu in this, from which we can select the required device. For example, we can have two or three NI acquisition boards connected for Data Acquisition. These will form different devices even though they are from the same class of hardware.

DAQ +/-

This option is checked if the hardware range is of ± type (e.g. ± 10V). This should be unchecked if the range provided by the hardware is of type 0 to some number. The user should know the type of range the hardware provides.


Acquisition Output Window - Overview
OVERVIEW OF ACQ OUTPUT WINDOW

The Acquisition Output window is mainly used for applying impulses/stimulus to an amplifier or any other external instrumentation. It is used in conjunction with the ‘Acquisition Protocol’ window. The ‘Acquisition Protocol’ window is used for generating waveforms like pulses, ramps and sine waves, which are used for applying stimulus. We will explain in this section the various aspects of the Acquisition Output Window in detail.

It basically has two parts:

1.	The Scripts window.

2.	Send window

The play button ‘applies’ the generated waveform to the external instrumentation. The stop button stops this application process. These buttons are located in both the ‘Scripts’ and ‘Send’ window.

A green marker in the lower part of the window indicates a warning. It is either that the hardware device is not configured with QuB or that a data file for output acquisition is not assigned. All these are similar to that explained in the Acquisition Input window overview.

Refer Acquisition Protocol Window

Next – Scripts Window Overview


ACQ Output Window - Scripts
ACQUISITION OUTPUT WINDOW - SCRIPTS

The Scripts window is used for writing kinetic scripts. Here, programming is done to generate shapes like pulses, ramps etc. for applying to an amplifier or other instrument.

Shapes can be generated using the Acquisitin Protocol window and is now the preferred method.

Refer Kinetic Scripts

We will next discuss the control buttons in the ‘Send’ window in detail.


ACQ Output Window - Send
SEND WINDOW - CONTROL BUTTONS

These buttons are for applying the generated waveforms.

Play

This button is used for applying the waveform generated by the scripts to the external instruments like an amplifier.

Stop

This button is used to stop the waveform application.

Channels

This button is used to specify the channel Acquisition Output channel to which data should be recorded. A window pops-up when this button is clicked; select the desired output channel in this window.

Continuous

When this option is checked, the writing of the generated data points (waveform application) is done in a continuous way. By clicking the Run button in the scripts section, we can generate as much data as we want and then apply it to the external amplifier in a continuous way.

Time (H:M:S)

With this option selected, the writing of data is done for a fixed amount of time given by H (Hours), M (Minutes), S (Seconds).

Points

When this option is checked, the program writes a fixed number of data points, which the user can set.

For both time and points options, the available data is reused if necessary.

Once

This option applies the entire generated waveform just once.

Sampling

This gives the rate at which the analog data generated by the scripts is sampled. In other words, it is the rate at which the hardware output voltage is updated / refreshed.

Digital sampling

This gives the rate at which digital data is sampled. It is different from the analog sampling rate. The cards we tested while developing Acquisition did not have support for buffered-mode digital output. So we had to use an alternative but less efficient way.

The digital component of the output waveform is stored in the same format as idealized data.

Buffer Length

This value gives the time in ms (milliseconds) for which the data is collected before being applied to the external hardware. In other words, waveform generated by the scripts is displayed in the Data window and is buffered for the specified amount of time before being applied to the hardware. This value defaults to 1000.

Data

We can specify the data file from which the stimulus data should be applied by selecting a file from this drop-down menu. Only opened data files are displayed in this menu as options.

The stimulus data is sent to this data file from the Acquisition protocol Window by pressing [image].


ACQUISITION OUTPUT PROPERTIES

NOTE: NOT INCLUDED AS OF 5/23/04

The various elements of the properties of acquisition output are enlisted as follows:

Data Channel and DAQ channel

The data file may have more than one data channel (e.g. one for each applied stimulus/controlled instrument). Since the hardware may have several A/D channels, a mapping between data and A/D channel is necessary. Using the above two options, a data channel is associated with an A/D channel.

Between these two options there is an arrow () which denotes the mapping.

DAQ Range

This factor depends on the hardware used. It specifies the excursion of the hardware output voltage. For example, the usual hardware output range of ±10V corresponds to a DAQ Range (in QuB) of 20.

Data Gain

This is the transformation factor between the hardware output voltage and the quantity applied on the instrument. For example, the command voltage of an AXON patch clamp amplifier is reduced by a factor of 50. Thus, the ±10V range of the DAQ card is converted to ±200mV, which is applied on the cell.

DAQ Gain

This is the gain provided by the hardware device (e.g. amplifier). This value is usually 1 and is fixed for most cards.

DAQ Bits

This value also depends on the hardware device used. For example, if we use a 16 bit sound card, then this value will automatically be set at 16. In case of acquisition cards (e.g. NI cards), most are of 12 bits with some being 16 bits.

Sampling

This gives the rate at which the analog data generated by the scripts is sampled. In other words, it is the rate at which the hardware output voltage is updated / refreshed.

Scaling

The value of scaling is automatically calculated by QuB from the parameter values of DAQ Range, DAQ bits, DAQ gain, Data gain and DAQ +/-.

Buffer Length

This value gives the time in ms (milliseconds) for which the data is collected before being applied to the external hardware. In other words, waveform generated by the scripts is displayed in the Data window and is buffered for the specified amount of time before being applied to the hardware. This value defaults to 1000.

Hardware

This specifies a class of devices. We can have more than one class. For example, an acquisition board from National Instruments is a class and sound cards are a different class. We may have more than one device for every class of hardware. If more than one hardware types are added through the Acquisition Hardware tab in the Options menu, then we can select one class using the drop down menu.

DAQ device

This denotes the Data AcQuisition device. If more than one external device is added for every class of hardware, then we get a scroll down menu in this, from which we can select the required device. For example, we can have two or three NI acquisition boards connected for Data Acquisition. These will form different devices even though they are from the same class of hardware.

DAQ +/-

This option is checked if the hardware range is of ± type (e.g. ± 10V). This should be unchecked if the range provided by the hardware is of type 0 to some number. The user should know the type of range the hardware provides.

Digital sampling

This gives the rate at which digital data is sampled. It is different from the analog sampling rate. The cards we tested while developing Acquisition did not have support for buffered-mode digital output. So we had to use an alternative but less efficient way.

The digital component of the output waveform is stored in the same format as idealized data.


OVERVIEW OF REPORT WINDOW

The report window is a very integral part of the QuB software and is a part of almost all of the QuB interfaces (ACQ, SIM, PRE, MOD, Results, and Scripts).

It displays the status of every operation performed in QuB. For example:

Operations on data file

Results of model optimization algorithms like MIL and MIP

Results of SKM

Results of pre-processing operations and

Results of ‘List’ and ‘SIM’ operations

You can cut, copy, paste and delete text from the report window like any MS word document using shortcut keys.

Cut – CTRL + X; Copy - CTRL + C; Paste - CTRL + V; Delete - DEL

Right Click Menu

Clear

Clears the entire report window

Properties

This window is basically like the color tab / panel of the Data and Model windows. We can set different colors for the text, warning messages, error messages and the background of the window.

Checking ‘Black and White’ makes the background white and the text black.

Max Lines specifies the total number of lines of text that can be fit in the window. If the report is scrolling too slowly, try a smaller value.


OVERVIEW OF SCRIPT WINDOW

NOTE: To generate a pulse or other common shapes, Please refer to the Acquisition Protocol Window

The scripts window is used for writing Kinetic Scripts. These scripts are primarily used to generate waveforms which are applied as impulses to an external hardware.

(See acquisition output window – scripts)

The kinetic scripting language is explained in detail in another section. Click here

The script window has 2 parts: a general edit window for entering scripts for generating waveforms and a top panel.

These will be discussed in detail in the following sections.


SCRIPT WINDOW – CONTROL BUTTONS

The top panel consists of the following control buttons:

Open a source file

Any source file has a *.kin extension.  This button is used for opening kinetic scripts source files.

Save a source file

This is used for saving scripts files. This opens a save as window and we can name/rename the current file, chose a suitable location for the file and save it.

Compile

This is used for compiling the kinetic scripts code written

Run

Used for executing the entire program code.

Run to cursor

This is used for executing loops step by step. The cursor stops when it comes across a control loop structures and every press of this button executes an iteration of the loop.

Step

This is used for executing the program step by step. Clicking this button first highlights the next step in the code and then executes the step and this continues through the entire code.

Pause/ Suspend

This suspends the execution of the code.

Stop

This stops the code execution.

Watch an expression

This is used for debugging the program when we don’t get the requisite results. This button opens a window ‘watch’ where we can enter the expression in the code we want to watch for errors. Any errors, if occurred, would be reported in the watch | value part of the scripts window.


SCRIPT WINDOW – COMMANDS FOR WAVEFORM GENERATION

There are special commands for generating basic waveforms like a pulse and a ramp in kinetic scripts. These are explained with examples in section:  pulse waveform and ramp waveform.


PYTHON SCRIPTS WINDOW

The python scripts window provides a prompt for writing python scripts to customize and add features to QuB. For details see http://www.qub.buffalo.edu/qubdoc/


RESULT WINDOW - OVERVIEW

The result window displays the results of various operations such as Amplitude Estimation (AMP), Idealization (SKM and Half-Amplitude) and Model Optimization (MIL, MIP, Mac, MPL).

The front panel of Result window consists of the following:

Reports Button

This button is used to create customized MS Word reports documenting the results of different tasks performed by QuB. MS office 2000 or newer is required to generate the Word reports. The ‘MS word’ file generated, contains the results according to the options set in the ‘New Report’ window. The display of data segments in the report is based on the parameters set in the ‘Copy Image’ dialogue box in the right-click menu in data window.

Refer Word Reports for more information on generating reports.

Popup Window Button

This button creates a separate floating result window, which can be maximized for easy viewing of results. The changes in the display in the new window, affects the display in the docked result window. Segments highlighted in ‘Select’ will be highlighted in both windows.

Many instances of the Result window can be created using this button.

‘Files’ Column

The ‘Result’ files open are shown on the right hand extreme in the window. The file name consists of 2 parts – (i) the algorithm name which created that result and (ii) the name of the data file.

For example, ‘MIL’ was used to optimize a model for the data file ‘sample’. The results file created will be named “MIL sample.qrf”.

There are five tabs which describe the different results generated. Detailed discussions of each tab are given below:

•	Select – This provides graphs of the variables of each segment with respect to Start time or Index of segments and also as histograms. Each dot represents either a data segment or a cluster, depending on whether normal data or idealized data was chopped. See below for an explanation of different variable terms.

•	Criteria – This provides ways to automatically locate segments/clusters with desired characteristics without manually selecting them.

•	Segments – This gives a detailed description of each segment in the data file. Different operations (like AMP, IDL, and MIL) give different sets of variables describing each segment. See the explanation on ‘Segments’ given below.

•	Histograms – This outputs the histograms after each idealization and after every model optimization. Results window displays this tab by default after IDL or MIL operation. The model should be designed in a way to make the histogram curve fit best.

•	Models – This gives the various rates in the model before and after optimization. This tab is useful only after model optimization. Also, all the models obtained after running Model Search are listed under this tab.

•	Summary – This shows numbers like overall likelihood and amplitudes.

The different aspects of the Result Window will now be discussed in detail.

Variable Terms

Select & Criteria

Segments

Models

Histograms

Other Properties


Variable terms In result window
EXPLANATION OF VARIABLE TERMS

USED IN THE RESULTS WINDOW

Bounds:

For multi-segmented data, this term gives the starting and ending data point for each segment, i.e. the range of the segment.

Nevent x:

The number of events in class x. x can be 1, 2, 3 depending on the number of classes in the model.

Dwell Count:

The total number of dwells in ALL classes is the dwell count for each segment. Total dwells equals the total number of events in all classes together.

Amp x:

Average amplitude of class x.

Index:

Gives the index of the various segments, i.e. 1/2/3 for a 3 segment data.

Length:

Total length of each segment in ms.

Note: Idealization using SKM sometimes gives variable length segments if the “drop first/last event” box is checked. This is only important if segments of set length are only idealized.

Lifetime x:

The average time a segment spends in class x OR the average dwell time for class x events. This is obtained by dividing the total time spent in class x by the total number of events in class x.

Occupancy x:

This gives the percentage of the time spent by the segment in class x.

Start:

This gives the start times of each segment. If segment are extracted from another file, the star time’s are preserved. This term is especially useful in time-dependent channels (channels for which the kinetics change with time.)

LL:

This gives the log likelihood values for each segment in the data. LL per event gives the average log likelihood per event for each segment. (LL / # of events)

Iterations:

The number of iterations MIL takes for each segment if segments are used separately. If all the segments are taken together for rate estimation, then this value is 0.

Sd x:

This gives the standard deviation of class x.

Gradient x:

This gives the gradient of parameter x.

Error code:

This term gives a value if some errors occurred while optimizing the model. If the value is zero, then no errors occurred. For any value, check the Report window for explanation of the error.


Segments Tab - Result Window
SEGMENTS TAB

This tab gives a detailed description of all the segments present in the data. The result is in tabular form. The terms are the same as in Select.

The variables enlisted in the table differ for AMP, SKM / Half-Amplitude and MIL.

The “Segments Table” in Results for different operations on a 3-segment data using a 2 state model is given below:

Segments Table for MIL

Segment	Bounds	Dwell Count	Gradient 1	Gradient 2	Index	Initial LL	Iterations	LL	LL per event	start
1
2
3
Segments Table for SKM / Half-Amplitude

Segment	Bounds	Amp 1	Amp 2	Dwell Count	Index	Length	Lifetime 1	Lifetime 2	Nevent1	Nevent2
1
2
3
Occupancy 1	Occupancy 2	Sd 1	Sd 2	Start

Segments Table for AMP

Segment	Bounds	Amp 1	Amp 2	Index	Length	LL	Sd 1	Sd 2	Start
1
2
3


Model Tab - Result Window
MODELS TAB

This tab displays the kinetic rates (K0 & K1) for the initial and final models after MIL has been used for model optimization.

Clicking any of the models in this tab brings it up in the Model window.

When segments are analyzed separately, then final models for each segment is given; i.e. Final 1 for segment 1, Final 2 for segment 2 and so on.


Extract; Extract to excel; Copy image; Components visible; Curve Fitting
HISTOGRAMS TAB

This tab gives the histograms of the time constants for each class after rate estimation using MIL.

When segments are used separately, we get histograms for each class for each segment. The histograms for different segments can be viewed using the scroll bar on top of it.

Right Click Properties:

•	Extract – Saves the histogram data as a text file for use in other graphing programs like Excel, Origin etc.

•	Extract To Excel – Extracts the histogram data as an Excel worksheet.

•	Copy Image – Copies the image to the clipboard.

•	Components Visible – The final histogram curve function is generally a sum of many exponential functions. These individual components are shown in gray color if this option is checked.

•	Curve Fitting – Click here


Select and Criteria - Result Window
SELECT AND CRITERIA

Data heterogeneity is common in single-channel recordings and usually poses problems, especially when kinetic modeling is the ultimate goal. The SELECT tab allows the user to identify and group different types of segments by coloring them.

This tab gives the graphs of all the different variables of each segment as given in the Segments tab. The graphs are plotted with respect to the index of the segments, the start times of the segments or as histograms.

The “Show Var…” drop down menu lists the different variables available. ‘All’ shows the graphs of all the variables. ‘None’ clears the window. To see only the desired graphs, clear the window and then choose the required variables one by one. The overall mean and an integer number of standard deviations are superimposed as horizontal lines on each plot.

To select segments, click the data points in any graph. To highlight the corresponding segment in the data window, right-click the data point and select ‘Show Segment’. The color bar on the left side of the window is used to color the segment data points. This is useful to select segments with similar properties (variable values). The main function of the Select tab is to help in identifying similar segments.

By default, all the segments are selected and are denoted by red color. The color of unselected segments defaults to black. K-means algorithm identifies other segments similar to the selected ones. The following options are available when Select button is clicked:

All – select all segments.

None – un-select all segments.

K Means – apply algorithm once.

K Means x 5 – apply 5 iterations of the algorithm.

Trim – deselects any segments outside the SD lines for the displayed variables. The standard deviation value can be varied using the slider on the top right corner of the window.

The K-Means and Trim functions only affect the open graphs, allowing the user to identify the variables to be considered.

Using k-means and trim:

K-means can quickly classify all segments by example.  To use it, start with all segments black (Select -> None).  Color one segment from each group with a different color, then Select -> K Means. Each segment is given the color of that example point which matches it best on the visible graphs (charts). Repeat K Means until the colors don’t change, then Trim to discard outliers.

Analyzing just the red segments:

If you are looking at SKM results, the data window should have a selection list named “SKM Results,” containing segments of the chosen color.  Choose it, and then try changing colors in Select. To run MIL on the red segments, set Data Source to “list,” choose the “SKM Results” list, choose red, then click MIL.  You can also ‘Extract’ this list into a new data file.

Analyzing segments by color:

You can perform SELECT operations by right-clicking the color tabs on the left-hand-side of the results window. For extracting segments corresponding to a particular color, right-click on the color tab and select ‘Extract Segments’.

A ‘results’ file named ‘ABC file’, where ABC represents the name of the task performed (like MIL, SKM, MPL), is generated in the ‘Results’ column of the data window. Also, a selection list containing the corresponding segments is generated under ‘Lists’ column in the data window.

You can create a list of segments based on color instead of extracting segments to a file. Right-click the required color and select ‘New Selection List…’ Specify the name of the list in the pop-up window and click OK.

Custom Variable Plots:

You can effectively analyze segments in SELECT using custom plots wherein you can plot any two variables (from the available variable set) against each other. From the ‘Show Var…’ drop-down menu, choose Custom. A ‘Create versus plot’ window pops up. Select the variables to plot from the drop down menus. {Plot X versus Y, where X & Y are the variables}. The window also shows the ‘recent’ plot selections made by the user.

Select Right-Click Properties:

Right-click on the graphs in Select gives the following options:

•	By Index, By Start Time, As Histogram

The segment data points in each graph can be arranged by the segment index or the start time of the segments respectively, by selecting the options in the right-click menu.

Choose the ‘As Histogram’ option to view the graphs as histograms.

•	Log Y Axis

Changes the Y-axis to log axis when checked and vice versa.

•	Copy Image

Copies graph to clipboard to paste on any drawing tool like Paint or Photoshop.

•	Extract To Excel

Extracts the graph data and figure to an Excel worksheet.

•	Curve - Fitting

Click Here

Criteria Tab:

The segments can be selected either manually by clicking the data points or automatically by using the Criteria tab.

The criteria tab is used to change the color of segments based on certain conditions on variables. The color can be selected from the color bar located at the bottom in the Criteria tab.

For example:

Select segments with variable1 < x

Select segments with variable1 > y

Select segments with variable2 < z

All the conditions are logically ANDed.

When the “Change Color” button is hit, the focus shifts to the select tab and the selected segments are highlighted using the indicated color.


WORD REPORTS

Report:

This button is located on the top left corner of the Result window. It is used to create MS Word reports of the results of different tasks like SKM, MIL etc. Clicking this button gives a drop-down menu with 3 options:

•	Generate NEW word report format.

•	Select one of  the existing formats (previously created) for creating the report

•	Edit an existing word report format

Generate NEW word report format

This tab brings up the ‘Report’ window. Each option in the ‘Options’ list on the right-hand side maps to a section of the word report. To build a custom report, select the required options from the right and hit the  button to add them to the new list. The order in which the options are displayed in the report can be changed using the ? and ? buttons. Give a suitable name and click ‘Save’ to save the word report format. Hit ‘Run’ to generate the word report.

Select an existing format

The Report drop-down menu lists all the previously created formats. Click any one of them to create your word report.

Edit existing word report formats

Click ‘Edit Reports’ to bring up the ‘Edit Reports’ window. This window lists the existing word report formats. Select the report to edit and click ‘Edit’. This brings up the ‘Report’ window with selected options. Make the necessary changes and click ‘Save’.  You can also save the changes under a different name.

If you are not sure about the different options listed, select all of them and create a sample report. This would give you an idea of what the different options map to in the final report.

You can program new options for the reports in Python (for examples, look at the second half of WordReport.py)

Note: When adding options in a new report format, you cannot add more than one option at a time.


CURVE FITTING

The curve-fitting window helps to decide and fit a curve which best describes our data or histogram. The ‘curve-fitting’ option is available in 5 places as part of the right click menu.

1.	The high-resolution window of the data window.

2.	The Histogram tab of result window.

3.	The Select tab of result window.

4.	The Histogram Window

5.	The high-resolution window of the data-overlap window.

The Curve Fitting window has the following options:

Curve Type

This gives a drop down menu of different types of curves like Gaussian, Lorentzian, Exponential, Exponential (log10 x) and Linear Regression. From this, we select the basic type of curve to fit the data. Also, we can define our own curve by selecting ‘Custom’. In this case, we can specify the curve equation, in programming language syntax, under the ‘Options Button’.

Components

Here we input the number of components which together comprise the final curve. For very difficult data, we might need a few components for a better fit. Increase the number of components if you find a better fit with more components.

Baseline

This offsets the curve by the specified value.

Options

This button gives the various algorithms which can be used for curve fitting. The default setting is ‘Marquardt algorithm’. If one algorithm doesn’t work satisfactorily, try using another algorithm.

When a user defined curve is to be used for fitting, we can specify the curve equation in the ‘y = f(x)’ box.

Maximum Iterations

The maximum number of iterations allowed by the algorithm to fit the curve is specified here.

Precision

It is a convergence criterion. It should be somewhat close to the amplitude of the curve.

Residual

This value helps us decide the quality of the curve fit. The lower the value, the better is the fit.

Curve Properties

The curve equation for each curve is given with the different parameter names specified. The different parameters in the curve equation like mean, standard deviation, tau, amplitude are given below that. The parameters are modified by single clicking them and typing in the alternate values.

After the fitting, we can hide the curve by selecting ‘Hide Curves’, below the ‘Curve Fitting' option, from the right-click menu.

NOTE: Curve-Fitting works best with fewer than 1000 points. If selection has more than 1000 points, and curve-fitting doesn’t work properly, extract, resample and then try to curve-fit it.

Back to Histograms

Back to Select


Acquisition Protocol Window - Overview
ACQUISITION PROTOCOL WINDOW – OVERVIEW

The acquisition protocol window provides a graphical user interface for creating stimuli. The stimuli are applied as impulses to an external hardware.

The acquisition protocol window can be divided into 4 parts for the sake of simplicity:

•	The top panel. This consists of buttons to create various shapes like a pulse, ramp, sine wave and hold

•	The display window. This shows the various shapes created. The + and – buttons are used for zooming the curves displayed. The zooming takes effect across all stages. The slider < - > is used to scroll through the different shapes in the stage.

•	The Properties Column. This shows the different parameters that define the shape selected in the display window. To select a shape, just click on it in the display window; the color of the selected shape turns to red and the remaining shapes remain blue. This column is present in the left-hand-side of the acquisition protocol window.

•	The Files and Stages Column. This displays the names of the protocol files (files with extension .qpf) and the stages within each file. Each stage consists of a one or more shapes concatenated together. There can be one or more stages in a file.

A pictorial layout of the Acquisition protocol Window

Each of these will be discussed in detail in the following topics.

Next – Control Buttons

Related Topics

Acquisition Output Window – scripts

Kinetic Scripting Language

Note: Sample acquisition protocols are provided in QUB\Sample Protocols directory. Click the second icon in the top panel in Acquisition Protocol window


LAYOUT OF ACQUISITION PROTOCOL WINDOW

A protocol file (QPF) consists of one or more stages and each stage comprises of one or more shapes as shown below. A shape is either a pre-defined one or a user-defined one based on a function.


Acquisition Protocol Window - Control Buttons
ACQUISITION PROTOCOL WINDOW – CONTROL BUTTONS

The top panel consists of the following control buttons:

Create new protocol file

This button creates an empty protocol file with the name noname.qpf containing a single stage – Stage 1. The display window has a gray shaded area. Various shapes are dragged onto this area to create a stimulation protocol.

Open a protocol file

This button is used to open an existing protocol file (.qpf). Clicking this button opens the location where QuB is installed.

Save protocol file

This is used for saving protocol files. This opens a save as window and we can name/rename the current file, chose a suitable location for the file and save it.

D/A Channels

This denotes the number of acquisition channels needed. Corresponding to the number of acquisition channels specified, the display window is divided into that many parts. Each part has its own set of shapes.

Run

This button generates data for output acquisition and displays it in the corresponding data file in the data window. (A data file should be specified for output acquisition using ‘New Data for Output Acquisition’)

‘Shapes’ Button

There are 4 buttons representing the different shapes of Hold (—), Ramp ( / ), Step (_?_) and Sine wave. To create a shape, just click and drag the corresponding button onto the display window.

‘Custom’ Button

This button is used to create customized shapes. Clicking this button creates a curve based on the function f(x, i). The default is set to x*x. You can set the starting and ending value of x in the function using ‘x from’ and ‘x to’ parameters. The ‘duration’ parameter sets the time-duration of the curve. The ‘i’ parameter in the function is the index of the current repetition. ‘i’ takes values from 0 to number of repetitions - 1.

This value is set using the ‘Repeat Stage’ option below the displayed curve.

A pictorial layout of the Acquisition protocol Window

Next – Parameters of Shapes


Acquisition Protocol Window - Data Shapes
ACQUISITION PROTOCOL WINDOW – PARAMETERS OF SHAPES

There are 4 different pre-defined shapes which can be created using the protocol window; hold, ramp, sine wave, step. Each shape has a set of parameters defining it. Also customized shapes based on functions can be generated using the ‘Custom’ button

HOLD Shape

Duration: This time denotes the duration of the shape. The value is in seconds.

Duration Incr.: This denotes the amount by which the duration changes during each repetition. This is useful only if the stage is repeated two or more number of times.

Duration Factor: In every successive repetition, the duration of the previous iteration is multiplied by this number.

Amp: This denotes the amplitude level at which the hold is applied. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

Amp Incr.: This denotes the amount by which the amplitude level changes during each repetition. This is useful only if the stage is repeated two or more number of times.

Amp Factor: This is useful only if the stage is repeated two or more number of times. In every successive repetition, the amplitude of the previous iteration is multiplied by this number.

Ramp Shape

Duration: This time denotes the duration of the ramp. The value is in seconds.

Duration Incr.: This denotes the amount by which the duration changes during each repetition. This is useful only if the stage is repeated two or more number of times.

Duration Factor: In every successive repetition, the duration of the previous iteration is multiplied by this number.

FromAmp and ToAmp: This denotes the starting and ending amplitude level of the ramp. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

ToAmp – FromAmp Incr and factor: These parameters have the same meaning as the Amp Incr and Amp Factor as explained above applied respectively to ‘ToAmp’ and ‘FromAmp’.

Sine Wave Shape

Duration: This time denotes the duration of the ramp. The value is in seconds.

Duration Incr.: This denotes the amount by which the duration changes during each repetition. This is useful only if the stage is repeated two or more number of times.

Duration Factor: In every successive repetition, the duration of the previous iteration is multiplied by this number.

Amp: This denotes the amplitude level of the sine wave. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

Amp Incr.: This denotes the amount by which the amplitude level of the sine wave increases during each repetition. This is useful only if the stage is repeated two or more number of times.

Amp Factor: This is useful only if the stage is repeated two or more number of times. In every successive repetition, the amplitude of the sine wave is multiplied by this number.

Freq: This denotes the frequency of the sine wave in Hz.

Freq Incr: This denotes the amount by which the frequency of the sine wave increases during each repetition. This is useful only if the stage is repeated two or more number of times.

Freq Factor: In every successive repetition, the frequency of the sine wave is multiplied by this number.

Phase: This denotes the phase of the sine wave in radians.

Phase Incr: This denotes the amount by which the phase value of the sine wave changes during each repetition. This is useful only if the stage is repeated two or more number of times.

Phase Factor: In every successive repetition, the phase of the sine wave of the previous iteration is multiplied by this number.

Offset: This denotes the offset amplitude of the sine wave. The units are the same as for Amp.

Offset Incr: This denotes the amount by which the offset amplitude of the sine wave increases during each repetition. This is useful only if the stage is repeated two or more number of times.

Offset Factor: In every successive repetition, the offset of the sine wave of the previous iteration is multiplied by this number.

Step Shape

The step shape is divided into 3 parts: Pre-Pulse, Pulse, Post-Pulse.

Pre-Duration: This time denotes the duration of the Pre-Pulse. The value is in seconds.

Pre-Amp: This denotes the amplitude level of the Pre-Pulse. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

Duration: This time denotes the duration of the Pulse. The value is in seconds.

Amp: This denotes the amplitude level of the Pulse. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

Post-Duration: This time denotes the duration of the Post-Pulse. The value is in seconds.

Post-Amp: This denotes the amplitude level of the Post-Pulse. The units depend on the acquisition output channel selected. The settings for each acquisition input/output channel can be modified in Options--> Acquisition Channels.

Duration Incr., Pre-Duration Incr. and Post-Duration Incr.:

This denotes the amount by which the pre and post durations change during each repetition. This is useful only if the stage is repeated two or more number of times.

Duration Factor, Pre-Duration Factor and Post-Duration Factor:

In every successive repetition, the duration of the previous iteration is multiplied by this number. This is useful only if the stage is repeated two or more number of times.

Amp Factor, Pre-Amp Factor and Post-Amp Factor and Increments:

These parameters have the same meaning as the Amp Incr and Amp Factor as explained above applied respectively to the amplitudes of pulse, pre-pulse and post-pulse.

A pictorial layout of the Acquisition protocol Window

Next – Files and Stages Section


Acquisition Protocol Window - Files and Stages
ACQUISITION PROTOCOL WINDOW – FILES AND STAGES COLUMN

Files Column

This lists all the protocol files opened in the acquisition protocol window. To close a file, right-click on the filename and select ‘close’. ‘Properties’ option doesn’t work at this time.

Stages Column

This lists all the stages in a stimulation protocol file. To select a stage, click on the stage name in the stages column. The protocol window cycles through the stages in a file in numerical order, while generating data for Output Acquisition.

The number of time a stage is repeated is specified by ‘Repeat Stage’.

Also, the time to pause before a stage can be specified using ‘Pause Stage’. But, this is under development and for future use only.

A pictorial layout of the Acquisition protocol Window


DATA OVERLAP WINDOW - OVERVIEW

Data Overlap Window is helpful in the analysis of various segments in a data file. The ‘Files’ column in the right-hand-side of the window lists the files open in the data window. The ‘Lists’ column has a drop-down menu which lists the selection lists associated with the data file selected. Only segments of a particular selection list can be compared and analyzed.

This window consists of two panels: (similar to the data window)

•	A low-resolution window with the overlapped segments of the selected list

•	A high resolution window. All segments selected in the low-resolution window will be displayed in this window.

For selecting data segments, hold down the left mouse button and scroll over a selection of segments in the low-resolution window. The selection is marked by a blue-colored rectangle. For selecting all segments, right-click anywhere in the low-resolution window and click ‘Select All’. The selected data is visible in the high-resolution window. You can also select a segment by just clicking on it in either window, though this would be very difficult to do in the low-resolution window. In the high-resolution window, zoom into the data and select the appropriate segment.

If the same data file is opened in both the data window and data overlap window, the selected segment (from the ‘Selections’ column) in the data window corresponds to the segment highlighted in ‘RED’ in the data overlap window and vice versa.

We will now discuss the arrangement of the files and their selection lists in the data overlap window and the properties of the high-resolution window in detail in the following topics.

List and Files Column

Properties of High-Resolution Window


Data Overlap Window - Lists and Files Column
DATA OVERLAP WINDOW– LIST AND FILES COLUMN

Data Overlap Window is helpful in the analysis of various segments in a data file. The ‘Files’ column in the right-hand side of the window lists all the data files open in the Data window. To select a data file, click on its name in the ‘Files’ column. You can select file name in the ‘Files’ column to view it in the Data window. In other words, selections are reflected in both the Data window and the Data overlap window. Double-clicking the file name in the ‘Files’ column opens the ‘Properties’ window of the Data window.

The ‘Lists’ section gives a drop-down menu of all the selection lists associated with the selected data file. When a list is selected from the drop-down menu, the segments in the list are listed according to their position in the data file. The check mark next to a segment entry means that it is selected. You can uncheck the entry to de-select the segment. The de-selected segment will be marked in gray color in the low-resolution window.

Also, if you select a set of segments in the low-resolution window, the check mark will appear only next to those segment entries (in the ‘Lists’ column) that are selected. The selection would be visible in the high-resolution window.

To make a selection list of only the selection visible in the high-resolution window, right-click in the high-resolution window and select ‘New List of Selected’. Enter a name for the selection list in the window that pops up. This list can then be accessed later through the ‘Lists’ section drop-down menu in the Data Overlap window and the ‘Lists’ column in the Data window.

We will now discuss the properties of the high-resolution window in detail in the following topic.

Properties of High-Resolution Window


Data Overlap Window - Properties of High-Resolution window
DATA OVERLAP –PROPERTIES OF HIGH-RESOLUTION WINDOW

The high-resolution window gives a magnified view of the selection in the low-resolution window. This window has advanced properties which can be accessed by right-clicking anywhere in the high-resolution window. The different options in the right-click menu are discussed below:

Overlap

This is the default option in the right-click menu. This shows the segments selected in the low-resolution window as overlapped.

Average

This gives an average of the selection of segments. The average trace is viewed in black and the other selections are visible in gray in the high-resolution window. We then have the option of appending the averaged trace to the data file - Right-click -> Append to Data.

We can also fit a curve to the averaged trace using Curve-Fitting. Use Clear Fit-Curve to delete the fitted curve.

Function

We can provide custom functions to operate on the selected traces in the high-resolution window. On selecting this option, a ‘Custom Function’ window pops-up. Enter the function definition in the blank space provided. An example of a function would be “trace1 + trace2 - trace3”. Trace 1, 2, 3… are the list of selection entries in the ‘Lists’ column in the order they are listed.

Zoom Out

A selection in the low -resolution window is visible in the high-resolution window magnified. This selection can be still zoomed into. To do this, hold down the left mouse button and scroll over a selection of segments in the high-resolution window. The selection is marked by a blue-colored rectangle in the low-resolution window and its expanded in the high-resolution window. We can retrace back to the original range of the selections in the high-resolution window by clicking ‘Zoom Out’ repeatedly (the number of times you repeatedly zoomed in).

Note: The high-resolution window shows only the active channel in case of multi-channel data.


Overview of Tasks (SIM, MOD, PRE, ACQ)
OVERVIEW OF TASKS

We will be discussing in this section the various tasks performed using QuB and the varied applications to which it can be applied.

We will start with ‘SIM’ which is short for simulate. This component of QuB is used to display simulated current data from single or multiple ion channels and also to set and change simulation parameters.

Next, we will be discussing the modeling component in QuB, MOD, which is closely related with Sim. Since one of the central goals of single channel kinetic analysis is to provide a description of the kinetic behavior of the ion channel, including estimation of the transition rate constants we construct a Markov model to simulate single channel kinetics. The model describes the conformational states in which a channel can exist.

Under this, we will also discuss the various optimization techniques viz. MIL and MPL idealization of data and estimation of amplitude.

Then we will introduce you to the preprocessing and acquisition components of which are known as PRE and ACQ respectively.

The Preprocessing interface in QuB serves different functions. The essential functions are:

Reading data files 	Resampling data

Viewing data at different resolutions	Filtering data

Baseline correction and subtraction 	Extracting data

Selecting and segmentation data 	Writing data files

We will then take into account the various operations on the files, lists, selections and segments in QuB.


OVERVIEW OF SIMULATION PARAMETERS

As mentioned before, the SIM component of QuB is used for simulating and displaying the simulated current data from single or multiple ion channels. SIM consists of

•	A graphical based model design interface and

•	A command window for simulation parameter settings.

After a model is built and simulation parameters are set, Sim generates dwell times in states using exponentially distributed random numbers.

We can simulate the data simply by left clicking the “Sim” button on QuB’s right border toolbar. The default settings are adequate to simulate single-channel data. But for changing the simulation parameters, we right click the Sim button.

Sim button Left click options

In this section we will mainly be discussing the various simulation parameters and different aspects of the command window, which helps us in setting the simulation parameters. We will individually deal with each of the aspects like

Data	Model	   Simulation	   Parameters	   Baseline


Data Tab - Sim
DATA TAB

When we right click the “Sim” button, the Simulate window will open. Select the Data tab.

The unit for the Segment size value is in points, allowing us to modify the size of the data file by the segment size and number of segments separately. Example

For the first simulation, Sim will automatically open a New data file, and this option is automatically checked. For subsequent simulations using the same model, we will have the option of replacing the open data file (Replace data) or adding more points to the open data file (Append data). Note that Sim will automatically replace the open data file unless we recheck the New data file box. Checking this box allows us to view new data files before deciding to erase the original file.

The Randomize box should in general be checked. This option causes a new random number seed to be generated each time you run a simulation. The currents will be different each time you run a simulation. If this box is not checked, you can enter a seed value (an integer) in the associated text box, and each run will use that value as the seed. If nothing is entered, a default seed is used.

The Idealize Data box is not checked by default.

If checked, then Output specifies either


For example, the Segment count is set to “20”, and the Segment size is set to “20000” (this is a good compromise between speed and accuracy).


Model Tab - Sim
MODEL TAB

Right click on the Sim button on the right hand border of QuB to get the Simulate window. Select the Model tab.

The channel count is decided depending on the number of channels in the simulation. If the simulation consists of a single channel, then set the Channel count to "1".

The ‘Parameters’ section lists the parameters (like voltage and concentration), associated with the model selected in the model window. Select the parameter in this section and assign a value and data channel to it using ‘Value’ and ‘Data channel’. A different data channel should be assigned to a different parameter.


Simulation Tab - Sim
SIMULATION TAB

Right click on the Sim button on the right hand border of QuB to get the Simulate window. Under the Simulation tab, we can choose to model macroscopic current (without noise), and can write scripts that allow you to simulate the response of an ion channel (either macroscopic or microscopic currents) to a stimulus (i.e. Ligand, P, or Voltage, Q).

To provide stimulus to the data, check File or Script option under Stimulation. If you check File, select a stimulation file from the drop-down menu to the right. The menu lists the data files currently open in the data window. If you check Script, then write the script in the ‘Stimulation Script’ section or open a script file by clicking the first icon (Open source file) in the ‘Stimulation Script’ window.

Note: Macroscopic response is the average of a very large number of microscopic channel responses. Microscopic response is a single instance.


Parameters Tab - SIm
PARAMETERS TAB

Right click on the Sim button on the right hand border of QuB to get the Simulate window.

If we have designated any rates as voltage or concentration dependent we can alter the effect of voltage and/or ligand concentration under the Parameters tab. Other than the voltage and ligand parameters, if we want the rates t be dependent on some other parameter, we can simply add it by clicking the ADD button.

When the ADD button is clicked, a default name for the parameter will be assigned like Parameter #, which we can change to what we want.

We can also set a value for the parameter and also the number of Data channels, which in turn will affect the rate if it is dependent on the parameter.

We can set rates as concentration or voltage dependent, by double clicking on the desired rate in the Model window and checking the appropriate box: P, ligand or Q, voltage.


Baseline Tab - Sim
BASELINE TAB

Right click on the Sim button on the right hand border of QuB to get the Simulate window. Select the Baseline tab. This tab allows you to add baseline noise to simulated data.

We can set and change the various parameters of the baseline noise such as Random Fluctuations, Periodic Components, Jumps and Exponential Recovery, Linear Drifts etc.

We can also model the baseline noise as a Linear Gaussian Model or a 2 state model. All of this can be done, by checking the respective boxes adjacent to the parameter ‘s name.


Other Controls - Sim
CONTROLS

The other controls in the Simulate window are Simulate, Close and Help.

The Close button closes the window. The Help button gives the help topics related to the window.

Clicking the Simulate button is same as left clicking the Sim button on the left hand border in QuB. A New data file window will open. Here you can specify the file name and its folder, and set the parameters of the data.

The AD Channel count value gives the number of variables to be stored in the data (i.e. single channel current, holding voltage, etc.) QuB can be used to simulate the response of a single channel to a pulse of agonist. Two AD channels would be needed in this case – one to store the response, and one to store the stimulus.

The AD Data Size gives the size of the data in bytes. We can choose between 2 and 4 bytes.

The Sampling value refers to the rate at which data is acquired/ simulated and affects the time-scale of your simulated data. This value should match the sampling rate typically used for acquiring data if we want the appearance of your simulated data to match that of your experimental data. To change the sampling rate, we may enter either the sampling frequency (kHz) or the sampling time (msec) – the other value will be updated automatically.

The Scaling value is the conversion factor between A/D units (used by the acquisition card) and the actual value of the current. A large scaling means better resolution, but too large a value may result in overflow. For simulation, the scaling should be chosen based on the maximum amplitude for an open state and the number of channels in the patch to be simulated. For example, if the amplitude of the open state is 10 pA and the number of channels is 1 (or a small number), the default scaling (320) is okay. However, if the number of channels is 1000 (as for a whole cell simulation), the scaling should be reduced accordingly (to ~1). These parameters will be saved under the Data tab of the Properties window.

To select a file format, check the box next to the format we would like to use. The .ldt file format can store only one AD channel. The .qdf format can be used to save multiple channels of data, but is currently under development. We can further select among DAT, ASC and WAV formats.

It may be convenient to save this data file in the Example Models folder we created earlier. To do this, left click the button (…) to the right of the File name box. Locate and open the Example Models folder. Click Save and then you will return back to the New data file window. Click OK to save the data file.


OVERVIEW OF PREPROCESSING

The various preprocessing tasks which can be performed using QuB will be described in this section.

Baseline nodes and the application of baseline to data segments are discussed under ‘APPLYING BASELINE’. Also, some methods for generating baseline nodes are discussed.

Selections, selection lists and their extraction from the given data file, are discussed in detail under ‘EXTRACT SELECTIONS’.

APPLYING BASELINE

EXTRACT SELECTIONS

CHOP DATA

CHOP IDEALIZED DATA


Applying Baseline - Overview
APPLYING BASELINE – AN OVERVIEW

We can generate baseline nodes either manually or by two automated methods.

Manual generation of baselines can be done from the Data Window Properties tab.

The two automated methods are the Adaptive windowed mean method and the Linear segments method. Both methods share several properties.

For accessing and setting the various parameters of the two automated methods, open the ‘Apply baseline’ window by right clicking on the Base button (on the ‘Preprocessing’ toolbar).

The following topics will describe in detail the various aspects of the Apply baseline window.

Data Source & Channel index

Data Processing

Adaptive Window

Linear Segments

Client/ Server

Other Controls


DATA SOURCE AND CHANNEL INDEX

This part is similar to that in the Idealize Data window.


DATA PROCESSING

This part is similar to that in the Idealize Data window.


Adaptive Window - Baseline
ADAPTIVE WINDOW MEANS

The Adaptive Windowed Mean Method extracts from an initial baseline selection the level and noise (standard deviation) of the ideal baseline. A box of a specified width and height slides along the data, forwards and backwards and at each position calculates the average of the points, which fall inside the box. If this average departs from the average of the previous box by more than a specified threshold (the Min difference value), a node is created.

When you check the Adaptive window option, a list of properties appears in the box below.

Window width, Window height:

Set appropriate values for the width and height of the window or box which slides along the data as mentioned above.

If the width is too long, the baseline corrector will less reliably follow rapid drifts in the baseline.

If the box is too short, the starting samples may become unreliable and inclusion of part of the edge of a channel opening/closing might cause an inappropriate shift of the baseline.

If the box is too high (accepting a wide range of amplitudes), it may make errors by including a significant number of points on the rising and falling phases of channel openings.

Min difference:

This quantity specifies the threshold value based on which a baseline node is created.

The baseline nodes will appear superimposed on the data when you click OK.

Check Bline apply on the toolbar to run the baseline correction.


Linear Segments - Baseline
LINEAR SEGMENTS

The Linear Segments Method also uses the initial piece of baseline to extract the level and noise of the ideal baseline. The basic idea is to identify segments of data that can be fitted by a line. The segments fulfilling some criteria are assumed to be baseline, and their ends make for nodes. Therefore, each segment adds two nodes to the list.

When you check the Linear Segments circle, a list of properties appears in the box below.

Change the appropriate parameters.

The baseline nodes will appear superimposed on the data when you click OK.

Check Bline apply on the toolbar to run the baseline correction.


CLIENT / SERVERS

Client/Server box:

Allows you to increase the rate of analysis by sending segmented data in threads to a dual processor or a server.


OTHER CONTROLS

Correct DC offset:

Both the automated methods (Adaptive Windowed Mean Method & Linear Segments Method) will correct the DC offset of the data if this box is checked (in the ‘Apply baseline’ window).

OK:

Clicking this button applies the changes made in the Apply Baseline window to the data.

Cancel:

This button cancels the changes made.

Clear Nodes:

We can remove or clear all the baseline nodes added to the data segment using this button.


Extracting Lists - Overview
EXTRACTING SELECTIONS – AN OVERVIEW

This window is used mainly to extract desired selections and/or selection lists to another data file. Also the whole file can be extracted with the baseline corrections applied and saved as a new file. The output filename is provided at the top and there is an option to open the file immediately after extraction. The data can also be processed (resampling, filtering, baseline application) before extraction. This window can be accessed by either right-clicking or left-clicking the Ext button in the preprocessing toolbar located in the right hand side.

The following topics will describe in detail the various aspects of the Extract Selections window.

Data Source

Data Processing

Output Format

Operation

Function

Other Options

Control Buttons


DATA SOURCE

This part is similar to that in the Idealize Data window.


Data Processing - EXT
DATA PROCESSING

Data can be processed optionally before extraction. Check ‘None’ if preprocessing is not required.

Processing options are:

Filter:

The data is extracted with the filtering as done in the data window. The filter is selected from the front top panel in QuB and a suitable filtering frequency is specified.

Baseline:

The data is extracted with the baseline corrections.

Resample Data

The data to be extracted may be optionally re-sampled. A re-sampling factor (> 1) may be specified, or, alternatively, a re-sampling frequency may be given.

Process Only Active Channel

In case of multiple channel data, enabling this option will only process the active channel data according to the processing options set. These options are described above.


Output Formats - EXT
OUTPUT FORMATS

The format of the output file is specified.

QDF, LDT or DAT is chosen if the data file is extracted with some changes and after it is processed in some way. DAT format does not save any file information and can be opened by many types of software. LDT format can be used for single channel data but QDF should be selected if the data has multiple channels.

WAV format is associated with music files. When a music file is processed and extracted, the output format must be WAV.

DWT format is specified if only the idealized trace is extracted.

ASC stands for ASCII format. The output is a text file, if ASC is checked. The output in the text file depends on the selections of x and Fit.

•	If both ‘x’ and ‘Fit’ are unchecked, the amplitude of each data point in the data source is outputted to the text file in a single column.

•	If ‘x’ is checked and ‘Fit’ is unchecked, the time and amplitude values for each data point in the data source is outputted to the text file. The first column is the time value and the second column is the amplitude.

•	If both ‘x’ and ‘Fit’ are checked, the time value and the amplitude values for the data point and the fitting curve point is outputted to the text file. The first column is the time value and the second column is the amplitude of the data points and the third column is the amplitude of the corresponding fitting curve points.

For detailed information of different file types associated with QUB, click here.


OPERATIONS

This is mainly useful with pulse data. Many data segments can be added, subtracted, averaged or scaled as required.

NONE: No operation is performed on the processed data.

ADD: Adds all the data segments together and outputs one segment.

SUB: Subtracts the first selection/segments from each of the remaining selections.

AVG: Averages all the segments.

STD: Each data point in the output segment has a standard deviation which is based on the standard deviations of the corresponding data points in all the segments in the source data file.

SCALE: Scales each segment by the factor provided in the ‘f:’ box. The factor can be a positive/negative value.


Functions - EXT
FUNCTIONS

Drift:

This provides a linear drift to the data according to the equation y = a*x + b. The values of ‘a’ and ‘b’ can be input.

Sine:

This function adds a sine wave to the selection/list/file. The values of the frequency, amplitude and phase of the sine wave can be input by the user.

Digitize Using Half-Amp Threshold:

This function digitizes the segments according to the value of the threshold ‘Thr’. If the amplitude at a point is greater than Thr’, its value is set to Max and if the amplitude is less than Thr’, its value is set to Min.


OTHER OPTIONS

There are extra options available in addition to processing the data. These include:

•	All A/D channels: Extracting all the A/D channel data from the source file.

•	Active channel: Extracting only the active channel data from the source file.

•	Specific channel: Extracting the data segments from the channel number specified.

•	Join segments: The extracted file has the data with all the segments joined into one.

•	Drop First/Last event: While extracting only the idealized trace (DWT), the first and last event per segment can be dropped.


CONTROL BUTTONS

The other control buttons are OK, Cancel, Help and Simple/Advanced.

OK: Clicking this button finalizes the changes made in this window.

Cancel: This cancels the changes made.

Simple/Advanced:  This button toggles the presence of Functions and Operations in the window.


Data chopper
CHOPPING DATA INTO SEGMENTS

The Data Chopper (Chop button on Data Toolbar) allows you to automatically segment the data in successive segments of equal size or to extract different sections of a pulse from repeated pulse-protocol experiments.

a.	Left click Chop button on the ‘Data’ toolbar – the ‘Chop data’ window opens.

b.	You must provide values (in either points or msec) for three parameters: Skip, Get, and again Skip. The method works by skipping the first n points (pre-pulse), taking the next n points (pulse), and then again skipping n points (post-pulse). If you just want to chop the data in segments of equal size without skipping any points, set both skips to zero, and enter only the desired number of points per segment in the Get box.

c.	Other options: If Once per segment is checked, the chopper will apply the treatment (skip – get – skip) only once for a segment, and then it will jump to the beginning of the next segment. If Ignore segments is checked, the Chopper will “see” the data file as one big segment.

d.	Name the selection list in the Output list box. The default name is “Chopped segments.”

e.	Click OK. A selection list will be generated immediately.

Now consider the following example:

You have a number of pulse-protocol traces, recorded in pClamp, each 8192 points. The first 2000 points is the pre-pulse, and the next 5000 the pulse. Therefore you will have to chop your data according to the following parameters: Skip(1) = 2000, Get = 5000 and Skip(2) = 1192. You will also want the Once per segment box checked.

Together, all these parameters and options make Chop a quite flexible tool. The result of the Chop operation is a list of all the chopped parts. The list name may be specified, or the default name may be used.

Important Note


Note: Chop function does not actually split the data into required segments... it just creates lists of groups of points (or creates chops).

We extract the file in order to turn the ‘Chops’ into ‘Segments’.


CHOP IDEALIZED DATA INTO SEGMENTS

The “Chop Idl” button allows you to periods clusters of activity based on the following criteria:

•	The time between clusters (Burst terminator)

o	If the time between 2 clusters is greater than ‘x’ ms then the idealized data is chopped at that point excluding the long dwell. The “longer than” option is selected in this case.

o	The “shorter than” option is used to remove spikes of very short duration which may occur within the desired cluster.

o	There is an option to select the “Dwell in class” 0/1/2… depending on the number channels or sublevels the data has.

•	The number of events as input by the user. Chops data after every x events.

•	Bursts can be discarded based on:

o	Their Total length (ms)

o	Number of events “Fewer than”

o	The occurrence of dwells in a particular class. This can be used to eliminate clusters of overlapping channels.

But we must first idealize the data. With data idealized, left click the ‘Chop Idl’ button on the ‘Preprocessing’ toolbar – the chop idealized data window opens. This allows you to modify the parameters listed above and extract the desired periods of activity. Click OK to get the list of all the desired clusters. The list appears in the Lists section of the Data window as ‘ChopIdl Results’. A results file is also created in the Results window. It enlists various properties of the clusters extracted in Select and also gives the amplitude histograms of each.

Selecting ‘Compute Stats’ computes the statistics associated with the data file. This dramatically slows down QuB’s speed. Its operation is similar to the ‘Stat’ task button on the left-hand side of QuB. The ‘Stat’ button is used to compute the statistics associated with the idealized file. This is particularly useful when you modify the segments in the idealized data (as in the case of ‘Chop Idl’). You can simply click ‘Stat’ to just compute the statistics instead of using ‘SKM’ to re-idealize the data.


GOTO

This button is located on the left border of QuB in the ‘Data’ toolbar. It is used for taking the cursor in the data window to a particular point or time. Left- click the GoTo button – a window called ‘Go To’ pops up. We can set the point or time (in ms) where we want the cursor to be. Click OK to apply the change.


Model optimization and Idealization - Overview
MODEL OPTIMIZATIONS && IDEALIZATION – AN OVERVIEW

In the following sections, various model optimization (or Rate Estimation) techniques will be discussed in detail. The different techniques are:

•	MIL (Maximum Interval Likelihood Rate Estimation)

•	MPL (Maximum Point Likelihood Rate Estimation)

•	MIP (Maximum Idealized Point Likelihood Rate Estimation)

•	Mac (Macroscopic Currents Optimization)

‘msrch’ or MIL model search is a powerful component in modeling. It is used to find an approximate model to fit the data using MIL and other parameters.

MIL and MIP algorithms require idealized data as the input. So data is first idealized using ‘Idl’ and ‘IB’ before rate estimation. Idl uses either Half-Amplitude or Segmented K-means algorithms for idealization. ‘IB’ also corrects baseline drift in addition to idealizing the data.

AMP is another feature which is useful in estimating amplitudes which can be directly used for Idl.

IDEALIZE DATA

MIL MODEL OPTIMIZATION

AMPLITUDE ESTIMATION

MPL MODEL OPTIMIZATION

MIP MODEL OPTIMIZATION

MAC

MIL Model Search


Idealize Data
IDEALIZE DATA – AN OVERVIEW

The Idl button is used to idealize data. For idealizing a segment of data or the whole file, select the portion of data and left-click the Idl button on the modeling toolbar.

The idealized trace can be viewed by checking the Idl show box on the front toolbar. We can also view the idealized trace above the simulated data by checking the Idl show above box on the front toolbar.

Right clicking the Idl button opens the Idealize data window. There are several functions of this window, which will be explained in the following sections.

Data Source & Channel Index

Data Processing

Client/Server

Idealization Method

Control Buttons


Data Source and Channel Index - IDL
DATA SOURCE & DATA CHANNEL INDEX

Data Channel Index: Allows you to choose the AD channel to be analyzed.

Data source box: Here you can tell SKM to idealize an entire file, a selection list, or a single selection, by checking the appropriate box.


DATA PROCESSING

Process data box:

None: 	SKM will idealize all data points no matter what is displayed.

As displayed: 	SKM idealizes the segments as they are displayed in the Data window.

As such: 	SKM idealizes the segments according to the inputs your specifications.


CLIENT/SERVER

Client/Server box:

Allows you to increase the rate of analysis by using multiple processors.


Idealization Method - IDL
IDEALIZATION METHOD

Hist bin count:

Here, we can change the number of bins in the amplitude histogram.

Half amplitude, SKM:

IDL uses either the Half-amplitude or SKM algorithms to idealize the specified data, based on the box checked.

With Half-Amplitude, we have an option of computing statistics like amp, std, occupancy, lifetime (ms), n-event for each class by checking ‘Compute Stats’. The idealization speeds up if this is unchecked.

When using SKM, we have several options for customizing the idealization:

LL conv: (Log Likelihood convergence)

Tells SKM to stop re-estimating the model parameters when the likelihood changes by less than the entered value

Max iter: (Maximum iterations)

Tells SKM to stop after a running after the set number of iterations (re-estimations)

Drop First/Last:

If we check the Drop First/Last box, we can specify whether SKM should drop any event at the beginning or end of each segment, or whether only events of a certain class should be dropped. (For example, if we segment a continuous data file by eye, a short section of baseline – or otherwise unwanted data – will usually precede and follow the segment intended for analysis by SKM. Prevent these intervals from being included in the idealized data by checking this box)

Re-estimation Method:

After you click Run, QuB estimates the most likely state sequence given the starting parameters that you set in the model (i.e. amp and Std) using the Viterbi algorithm. Then SKM re-estimates the model parameters (mean and standard deviation of the amplitude), and the transition probabilities (known as the A matrix). The following boxes allow you to modify the re-estimation method.

•	If ‘Don’t Re-estimate’ is checked, SKM does not re-estimate the model parameters.

•	‘Fix Kinetics’ fixes the model rate constants.

•	‘Fix Amp’ and ‘Fix Std’ fix the amplitude and standard deviation, respectively – use these options if SKM re-estimates these parameters incorrectly. To use the Fix Amp and Fix Std options, you must specify the current class for which you wish to fix the Amp and/or Std.

Note: SKM sometimes has trouble idealizing multi-channel data, because overlapping channel openings are considered as a separate conductance class (which does not by definition have amplitude equal to twice the single channel amplitude). Therefore, to fix the amplitude of overlapped channel openings, you must also treat these amplitudes as separate conductance classes. For example, to fix the amplitude of two channels opening at the same time fix the amplitude of Class 2.

Apply Dead Time:

Allows you to set a dead time


CONTROL BUTTONS

Run:

For running the idealization i.e. to idealize the data/file selected.

This button performs the same operation as left clicking the Idl button on the modeling toolbar on the left hand border of QuB outlay.

Close:

This button closes the Idealize Data window.

Clear:

This button clears the idealization operation performed on the data selection.


MIL - OVERVIEW

MIL stands for Maximum Interval Likelihood.

MIL optimizes the rate constants (with error limits) of a User-defined kinetic model according to the interval durations in ASCII *.dwt files created by SKM (or some other program). The kinetic model will typically have more than one state for each conductance class. A correction is made for 'missed events', which is valid for both single-level and multi-channel data.

The parameters of the model may be constrained according to detailed balance, fixed rate constants, and proportionality of rate constants. Multiple *.dwt files, derived from data obtained at different voltages or concentrations can be analyzed by MIL simultaneously to estimate the voltage or concentration dependence (with error estimates) of all rate constants.

Other output from MIL includes event duration histograms for each state, the predicted probability density function (PDF) for the event durations, and the log likelihood for the model.

MIL works with .qmf and .mdl model files.

Data Channel Index & Data Source

Parameters

Control Buttons


DATA CHANNEL INDEX & DATA SOURCE

Data Channel Index: Allows you to choose the AD channel to be analyzed.

Data source box: Here you can tell MIL to analyze an entire file, a single selection, a selection list or a File List by checking the appropriate box. (The File List was previously called the MIL Input List and was accessible through the edit button.)

MIL can be used to fit a single model to a group of records obtained under different experimental conditions. Using the new File List, MIL can now fit globally (across files) using models with one or more concentration parameters.

Checking File List option under Data Source gives you a list of all the data files currently open in the Data window. Check the files you want to use for optimization by placing a check mark under the Use column.

 (Note: Because MIL is used to analyze idealized data, your file list must consist of files which have been idealized using either SKM or IB)

Set the Voltage or Concentration used in the experiment, the dead time, and the number of active channels in the record and other parameters. To do this, click in the box of the value that you would like to change; when a dashed line outlines the box, type in the new value.

(Note: The defaults for voltage & ligand values and channel count can be set in the Model window properties. The default for dead time can be set in the Data window properties.)


MIL Parameters
PARAMETERS

Hist bin count:

Allows you to change the number of bins in the histogram

LL conv: (Log Likelihood convergence)

Tells MIL to stop re-estimating the model parameters when the likelihood changes by less than the entered value

Grad conv:

Tells MIL to stop when all gradients are less than the entered value

Max iter:

In this box, you can set the maximum number of iterations.

Search limit:

This sets the range of parameter values to be considered. In addition, you can have QuB automatically restart the optimization if the maximum number of iterations is exceeded. This can be done, by setting the number of times Mil should restart the optimization under Restarts. Each rate X is kept within [ X/S , X*S ], where S is the search limit.

Run mode:

Under Run mode, check the Check Model circle to get the log likelihood histograms and time-constants using the current rates for a data set. This could be used to distinguish between segments of data based on kinetic activity, if the Separately circle is checked. Checking the Optimize circle will result in MIL performing an optimization.

Use Segments:

Under this, check the Separately circle, if you would like MIL to analyze each segment individually and check the Together circle, if you want all the segments to be analyzed at once.

Show Iterations:

When this box is checked, the log likelihood (LL) and Gradient values will be displayed for all iterations while the optimization is running. When unchecked, only the final result (rates and Time-constants) is displayed in the Report Window.

Join Segments:

When this box is checked, MIL analyzes all segments as a single segment.

T dead:

Dead time can be specified in ms or as a factor of the sampling time. It is the longest time for which an event can go unnoticed. If dead time is made large, then short events might be ignored.

Restarts:

Sometimes MIL does not converge in the maximum number of iterations specified and we need to stop and restart MIL again. This can be automated by specifying an integer here. MIL will restart, if it has not converged, after the maximum number of iterations allowed.

Max Step:

Max step is the change in the rates as a percentage of the gradient, in one iteration by MIL. 1 is a good value for MIL. If the value is very small, then MIL might not converge in the maximum number of iterations allowed. If, after a few iterations, some rates become zero or very large, try a smaller value of max step.


CONTROL BUTTONS

Run:

This button is used to begin the optimization.

Close:

Click this button to close the MIL model optimize window.


AMP - OVERVIEW

The Amplitude Estimator uses the Baum-Welch algorithm to calculate the amplitude and standard deviation of each current class in the model, and will automatically set the respective properties for each class. This function can be used instead of assigning class amplitudes using the Grab feature in the model window.

•	The amplitude estimator (Amp) works similarly to SKM, except that you do not have to assign amplitude levels to each current class. Simply draw a model that contains at least one state for every current class in the data record.

•	Right click the Amp button on the Modeling toolbar to open the Estimate conductance parameters window. The options here are similar to those in the Idealize data window. You will have to specify the data source (Whole file, Selection List, Selection), and whether or not the data should be processed before the analysis (None, As Displayed, As Such). If you would like to analyze only a segment of data, you first must highlight a representative portion of data, containing each current class.

•	Click Run. QuB will display the amplitude and standard deviation in the Report window, and will automatically set the properties of each current class in the model. If your data source contains several segments, each will be analyzed separately, with the average of all segments calculated at the end.

•	The estimated amplitudes should be similar to the parameters you used to simulate the data (Class 0: amp = 0, std = 0.1; Class 1: amp = 1.0; std = 0.15).

Data Channel Index:

Allows you to choose the AD channel to be analyzed.

Parameters


PARAMETERS

Show Idealized:

Amp will idealize the data using the Viterbi algorithm.

Quiet Output:

Only the average amplitude of each current class will be displayed in the ‘Report’ window if this box is checked.

Hist Bin Count:

Allows you to change the number of bins in the histogram

Auto Init:

When this is checked Amp will use the high and low points of the data set as initial amplitude estimates. We can set the Open state to be either UP or Down.


DATA SOURCE AND PREPROCESSING

Data source box: Here you can tell AMP to idealize an entire file, a selection list, or a single selection, by checking the appropriate box.

Process data box:

None: 	AMP will idealize all data points no matter what is displayed.

As displayed: 	AMP idealizes the segments as they are displayed in the Data window.

As such: 	AMP idealizes the segments according to the inputs your specifications.


MPL - OVERVIEW

MPL stands for Maximum Point Likelihood.

This is a program that maximizes the likelihood of the data at every data point instead of every interval. The advantage is that very busy data can be analyzed (there are no missed events in this approach) and the penalty is that it takes longer than working with idealized data. We recommend using the program for busy data and not for long files.

Before you run MPL, make sure that you have grabbed ALL AMPS using ‘grab all AMPS increasing’ or ‘grab all AMPS decreasing’.

The kinetic model will typically have more than one state for each conductance class. The parameters of the model may be constrained according to detailed balance, fixed rate constants, and proportionality of rate constants.

Other output from MPL includes duration histograms for each state, the predicted probability density function (PDF) for the event durations, and the log likelihood for the model. The log likelihood values for all iterations are displayed. These numbers have no absolute value of their own, but can be used to compare models. Those with the higher likelihood are more likely to be correct.

MPL works with .qmf and .mdl model files.

NOTE: A limitation of the current program is that every segment must have at least one instance of each state. This is usually only a problem with multi-channel records in which the number of active channels in each segment may change.

Parameters


PARAMETERS

Quiet output:

When this box is checked, only the log likelihood (LL) and Gradients will be displayed while the optimization is running.

The other parameters such as those given below are same as those explained under the MIL Optimization. Click on the links below for further description.

Max iter

LL conv. (Log Likelihood convergence)

Grad conv

Search limit

Max Step


DATA SOURCE AND PRE-PROCESSING

Data source box: This is exactly same as in MIL. Data source

Process data box:

None: 	MPL will idealize all data points no matter what is displayed.

As displayed: 	MPL idealizes the segments as they are displayed in the Data window.

As such: 	MPL idealizes the segments according to the inputs your specifications.


Mac Optimization
MACROSCOPIC CURRENTS OPTIMIZATION (Mac) – OVERVIEW

Mac is used to optimize the kinetics of the model and optionally, estimate the channel count from macroscopic currents using Hidden Markov Models (HMM). Operation of Mac is very similar to that of MIL, MIP etc.

Mac has the advantage that it can be used in case of multi-channel data. Data need not be idealized before using Mac. This button is located in the Modeling toolbar on the extreme right hand side.

Left-click starts the optimization. Right-click opens the ‘Macroscopic Currents Optimization’ window wherein parameters can be set for rates and channel count estimation.

The various aspects of Mac will be discussed in the following topics.

DATA SOURCE

DATA PROCESSING

OPTIMIZATION OPTIONS

ESTIMATE OPTIONS


Mac – DATA SOURCE AND CHANNEL INDEX

Data Channel Index gives the option to choose the AD channel to be analyzed.

Data Source gives the option to apply Mac to a selection/ selection list/ whole file in the currently opened file.

Also, Mac can be used to fit a single model to a group of records obtained under different experimental conditions. Preparing Mac to fit a model across different parameters requires creating a File list, specifying the experimental conditions used to generate the record.

In the ‘Mac’ window, check the File list button under the Data Source. All the QuB data files opened are available in the list. Select the ones necessary by clicking the Use box next to it.

For more details see the topic on MIL file list


Mac – DATA PROCESSING

None: Mac will use all data points no matter what is displayed.

As Displayed: Mac will use all the displayed data points.

As Such: Data can be either filtered and/or baseline corrected before Mac is used for rate estimation.


Mac - Optimization Options
Mac –  OPTIMIZATION OPTIONS

LL conv: (Log Likelihood convergence)

Mac stops re-estimating the model parameters when the likelihood changes by less than the set value.

Grad conv: (Gradient Convergence)

Mac stops re-estimating the model parameters when the gradient changes by less than the defined value.

Max iterations:

In this box, you can set the maximum number of iterations.

 Max Step:

This sets the max step value for the next iteration in Mac.

Run Mode:

•	Optimize: This option is checked to optimize the model using Mac for the data considered.

•	Check Model: Runs one iteration to check how the given model fits the data. This is used to mainly compare different models for the same data.

Optimize Segments:

•	Together: Different segments in the data are taken together while optimizing the model.

•	In Groups Of: Segments can be taken in groups of one or more, this results in a model for each group.

Skip:

This feature skips the specified time at the beginning of the data which might contain some errors due to capacitance effect.

Show Fitting Curve:

Shows the fitting curve after optimization

Identical Chunks:

If the data segments are obtained from the same patch and conditions and are of the same length, then this option can be checked to speed up the optimization. The difference in this case is that Mac does not perform certain intermediate calculations between segments as the conditions are the same.

Quiet Output:

This option gives just the final output in the result window. All intermediate results of each iteration are not printed in the report window.


Mac - Estimate Options
Mac – ESTIMATE OPTIONS

Here the different parameters to be optimized by Mac can be selected.

Rate Constants:

This option is always checked as rate estimation is the primary concern.

Channel Count:

This option is checked if the number of channels in the data is to be estimated. The ‘Use Variance’ option is to be checked for estimating the channel counts.

Use Variance:

If unchecked, the sum of squares is used to calculate the cost function.

If checked, the LL (Log-Likelihood) is used to calculate the cost function.

Initial Probabilities:

•	Fixed: The initial probabilities of the states remains as fixed by the user.

•	Conditioning Equilibrium: This is useful when the model rates are voltage (Q) or concentration (P) dependent. When we have a conditioning pulse followed by a test pulse, and we want to consider only the test region for analysis, then the state initial probabilities are calculated as the equilibrium probabilities of the conditioning pulse.


MIP - Overview
MIP – OVERVIEW

MIP is used to optimize the kinetics of the model using Hidden Markov Models (HMM). Operation of MIP is very similar to that of MIL, Mac etc. MIP works for one channel at present and would be extended for more number of channels in the future.

Data should be idealized before using MIP. This button is located in the Modeling toolbar on the extreme right hand side.

Left-click starts the optimization. Right-click opens the ‘Maximized Idealized Point Optimization’ window where parameters can be set for rates estimation.

The various aspects of MIP will be discussed in the following topics.

DATA SOURCE

OPTIMIZATION OPTIONS

ESTIMATE OPTIONS


MIP - Data source and channel index
MIP – DATA SOURCE AND CHANNEL INDEX

Data Channel Index gives the option to choose the AD channel to be analyzed.

Data Source gives the option to apply MIP to a selection/selection list/whole file in the currently opened file. Current file is checked in this case.

Also, MIP can be used to fit a single model to a group of records obtained under different experimental conditions. Preparing MIP to fit a model across different parameters requires creating a File list, specifying the experimental conditions used to generate the record.

In the ‘MIP’ window, check the File list button under the Data Source. All the QuB data files opened are available in the list. Select the ones necessary by clicking the Use box next to it.

For more details see the topic on MIL file list


MIP Optimization Options
MIP – OPTIMIZATION OPTIONS

LL conv: (Log Likelihood convergence)

MIP stops re-estimating the model parameters when the likelihood changes by less than the set value.

Grad conv: (Gradient Convergence)

MIP stops re-estimating the model parameters when the gradient changes by less than the defined value.

Max iterations:

In this box, you can set the maximum number of iterations.

Max Step:

This sets the max step value for the next iteration in MIP.

Max Power:

This value is set as high as possible so that numerical errors don’t occur. This increases the speed of operation.

Run Mode:

•	Optimize: This option is checked to optimize the model using Mac for the data considered.

•	Check Model: Runs one iteration to check how the given model fits the data. This is used to mainly compare different models for the same data.

Quiet Output:

This option gives just the final output in the result window. All intermediate results of each iteration are not printed in the report window.


MIP - Estimate Options
MIP – ESTIMATE OPTIONS

Initial Probabilities:

•	Fixed: The initial probabilities of the states remains as fixed by the user.

•	Equilibrium: The initial state probabilities are calculated as the equilibrium probabilities based on the conditions at the beginning of the data.

•	Conditioning Equilibrium: This is useful when the model rates are voltage (Q) or concentration (P) dependent. When we have a conditioning pulse followed by a test pulse, and we want to consider only the test region for analysis, then the state initial probabilities are calculated as the equilibrium probabilities of the conditioning pulse.


IB - Overview
IB – OVERVIEW

IB stands for “Idealize with Baseline Correction”.  It is used for idealizing data with baseline correction. It is also useful in estimating the rates of the kinetic model describing the data.

In essence, IB combines the tasks of Preprocessing (correcting and applying baseline), Idealization and Modeling (model rate estimation) in one window.

IB provides an option of using either SKM or Baum-Welch for idealizing data with re-estimation. Baseline drift is tracked and corrected using Forward and Backward Kalman filters.

This button is located in the Modeling toolbar on the extreme right hand side. Right-click opens the ‘Idealize Data with Baseline Correction’ window where parameters can be set for baseline correction, idealization and rate estimation.


IB – DATA SOURCE AND CHANNEL INDEX

Data Channel Index gives the option to choose the AD channel to be analyzed.

Data Source gives the option to apply IB to a selection or selection list or whole file in the currently opened file.


IB – DATA PROCESSING

None: IB will use all data points no matter what is displayed.

As Displayed: IB will use all the displayed data points.

As Such: Data can be either filtered and/or baseline corrected before IB is used for rate estimation.


IB - Idealization Options
IB – IDEALIZATION OPTIONS

RE-ESTIMATION AND MOST LIKELY SEQUENCE

After you click Run, QuB estimates the most likely state sequence given the starting parameters that you set in the model (i.e. amp and Std). Then the model parameters (mean and standard deviation of the amplitude) and the transition probabilities (known as the A matrix) are re-estimated. There are 3 algorithms for estimating the most likely sequence:

1.	The Viterbi algorithm.

2.	Gamma algorithm.

3.	Forward-Viterbi algorithm.

These are used when no re-estimation method is selected.

The model parameters are re-estimated using either SKM or Baum-Welch algorithm. SKM automatically uses Viterbi algorithm and Baum-Welch uses Gamma algorithm for estimating most likely sequence. So, if you check one of these re-estimation methods, then the ‘most likely sequence’ box is shaded.

SKM is fast but not so accurate. Baum-Welch is accurate but is a bit slower. Between Viterbi and Gamma algorithms, Viterbi is twice as fast as Gamma. If the data is good, convergence rate is almost the same for BW and SKM.

A –> Q

This is used for calculating the model rates, given by the Q matrix. The Q matrix is calculated from the A matrix (explained above). Check “Every Iteration” to calculate the Q matrix for each iteration.

FIX

The following boxes allow you to modify the re-estimation method.

•	‘Fix Kinetics’ fixes the model rate constants. Currently, rates of all the classes are fixed together.

•	‘Fix Amp’ fixes the amplitude.

Use these options if these parameters are re-estimated incorrectly.

•	‘Fix Noise’ fixes the noise in the data.

OPTIMIZATION

Here we can specify the maximum number of iterations allowed for IB and also the convergence criteria – If LL (Log Likelihood) changes by less than the specified value, then stop optimization.

BASELINE

This part of the IB window is used to track and correct the baseline variations in the data.

Track:

Check this box to track baseline changes.

“Std” is the mean expected baseline drift per sample. A good estimate is 0.01 per pA of the difference between open and closed states. If this value is too big, it might track an opening. If baseline is good, a lower value can be used.

Correct:

Check this box to correct baseline changes by adding baseline nodes.

“Min dy" is an integer which decides the resolution of the baseline nodes and number of baseline nodes added for correction. A high number is used for rough correction.

The other options are explained below along with the baseline correction procedure.

For each iteration,

1.	The baseline is initialized using Forward Kalman filter. Back Kalman filter is used optionally if the box ‘Back Kalman’ is checked. The F-K Count parameter is used in both cases.

2.	The baseline is updated until F-B-K Count is reached. Parameters are re-estimated optionally, if the ‘Reest params’ box is checked.

REPLACE IDEALIZATION

If this box is checked, IB replaces any previously existing idealized trace in the data analyzed.

QUIET OUTPUT

If this box is checked, no result is displayed in the Report window.

If this box is unchecked, results for each iteration for every segment are displayed in the report window.

In both cases, IB outputs the final histogram curves in the result window.

Note: When transitions are not crisp and IB tracks states as baseline, then do the following.

Baseline nodes are not cleared when you delete or otherwise edit the data. Saved baseline nodes include the sampling rate, so you can

•	extract the whole file, re-sampled down

•	correct the baseline of the re-sampled file

•	save the baseline nodes

•	go to the original data and load the baseline nodes


Model Search using MIL - Overview
MODEL SEARCH USING MIL – AN OVERVIEW

MIL model search is a powerful component in modeling. It is used to find an approximate model to fit the data using MIL and other parameters. It is very useful in the case where the model has a lot of states.

This task can be accessed from the left-hand side panel under Modeling. Left-clicking the ‘msrch’ button runs MIL model search using the default parameters. Right-click the ‘msrch’ button to change the default settings. This opens the ‘MIL model search’ window. This window consists of three sections:

•	Data source

•	MIL parameters

•	Search parameters

The ‘Data source’ section is similar to the Data source section in MIL. Click here to read about the ‘Data source’ section. (Note: Use the back button on the top panel to return to this page).

The parameter settings in the ‘MIL Params’ tab is used by MIL for model optimization. These parameters are similar to those in the MIL Model Optimization window. Click here to read about the ‘MIL optimization parameters’ section.

The next section will deal with model ‘Search’ parameters in detail.

Next - Model Search Parameters


Model Search Parameters
MIL MODEL SEARCH  – PARAMETERS

Model search parameters can be accessed through the ‘Search Params’ tab in the MIL model search window. The parameters are explained below:

INITIAL RATES (K0 AND K1)

This denotes the starting rate values for a model.

RANDOM RATES

If this box is checked, then MIL randomly selects a starting rate value depending on the range ‘From x’ to ‘To y’. The range from which MIL picks a starting rate value is [ (x times initial value) , (y times initial value) ]

TRIALS PER MODEL

This denotes the number of times MIL optimizes a particular model combination.

For every trial,

•	MIL changes the different starting rate values if ‘Random Rates’ is checked and then optimizes the model.

•	If ‘Random Rates’ is not checked, MIL optimizes the model again with the same starting rate value as specified.

NO LOOPS

If this box is checked, ‘model search’ does not consider model combinations with closed loops. The ‘MIL model search’ window shows the number of possible model combinations even before running ‘model search’. The number of model combinations without loops is shown in brackets ().

MAX CONNECTIONS

This denotes the maximum number of connections in all, in the possible model combination.

MAX EXIT RATES PER STATE

This denotes the maximum number of connections which can be made to a single state in the possible model combinations.

MODEL FILTER

This is used to filter out certain model combinations from the total number of possible model combinations.


Perturb Rates using MIL - Overview
PERTURB RATES USING MIL

Perturb Rates task can be accessed using the ‘Prtb’ button under the Modeling panel on the left-hand side toolbar in QuB. The main function of ‘Prtb’ is:

i.	To perturb the rates of a model by a percentage value specified by user and

ii.	Comparing the new models to the initial model using the Results window.

Right-clicking the ‘Prtb’ button opens the Perturb MIL Properties window.

Specify the range of rate perturbation in the Percent Perturbation box. If the value is x, then each rate is first decreased by x% to get a new model and then increased by x% to get another new model. This process is repeated for all the rates in the initial model.

(Note: A new model is defined as a model with a different starting rate than the initial model).

There are two main modes of operation of ‘Prtb’.

•	OPTIMIZE

This mode optimizes each of the new models obtained by Rate Perturbation as described above, using MIL. The output results file called ‘Perturb MIL’ lists the initial model and the different perturbed models. Under the optimize mode, each of these models are optimized using MIL and the final LL values, gradient values and rate values of the optimized models are displayed under models tab in the Results window. To view the different optimized models, click the corresponding row for a model in the results window under models tab. You can view them in the ‘Model Window’.

•	EVALUATE

This mode does not optimize the models. It simply calculates the Log-Likelihood (LL) values for the different models obtained from Rate perturbation as described above. The results file called ‘Perturb MIL’ shows the initial LL values of each of the new models, the gradient values and the perturbed rates. The initial model is also shown for comparison. Under this mode, ‘Prtb’ also creates a results file for each of the new models called ‘MIL File’. This mode is mainly used to compare the different models, with the different perturbed rates, using the LL values.


List Operations
OVERVIEW – LIST OPERATIONS

A selection list allows you to group several data selections for a later program action (i.e., data extraction, analysis, etc.). Any selection list can be extracted from the original data file. An advantage is that the memory is not wasted by storing the actual data, but only a list of start-end references. In addition, the extraction moment can be delayed until the selection list has been double-checked, and the original file remains unaffected.

You can create a selection list manually, or use the Data Chopper (Chop) tool.

The Chop Idl (previously called Event processor) is used to chop idealized data into segments based on specified conditions.

The ‘Lists’ and ‘Selections’ panels: When you create a selection list, the list name is displayed in the ‘Lists’ panel – this allows you switch between multiple active lists that pertain to the active data file. Switch between lists by clicking the name of the list you want to view. The ‘Selections’ panel will display the selections (in points) of the highlighted list. Clicking on a selection will highlight it; double-clicking a selection from a list, the display will automatically select that part, which in turn is displayed into the high-resolution window.


ADDING LIST OF SEGMENTS

The button AllS is used for creating a list of all the segments in a data file.


ADDING LIST OF IDEALISED SEGMENTS

The button IdlS is used for creating a list of all the idealized segments in the data file.


ADDING AND DELETING SELECTION LISTS

The buttons AddL and DelL are used for manual generation of a selection list. They are located on the right side border toolbar titled Data.

To create a new selection list manually, click the AddL button in the toolbox. If you left click this button, the new list will automatically be titled “Selection list #,” where “#” corresponds to the number of new selection lists that have been created for the active file. If you right click this button, you can name the new selection list.

The newly created list appears in the panel below the opened file list in the Data window. If more selection lists were created, click the one whose content you wish to see, and it will become the active list.

To delete the active list you may either click DelL button or press Delete key while the lists panel has focus and the list you wish to delete is highlighted (active). Only the active list can be deleted.


ADDING AND DELETING SELECTIONS

The buttons AddS and DelS are used for adding and deleting selections respectively. They are located below the AddL and DelL buttons.

The button AddS adds a selection to the active list. You can also use the shortcut key: [Ctrl]+[s]. A reference to the start and end points of the selection is created, and the information appears as an item in the ‘Selections’ panel.

The selection is always added to the active list, if any. If you wish to add it to a different list, then you must activate that list, by simply clicking on the corresponding item.

The button DelS deletes the highlighted selection. You can also use the Delete key if the ‘Selections’ panel has the focus and the selection you wish to delete is highlighted (active). Only the active selection can be deleted.

Now based on the above two topics, we can consider the following scenarios and use them as exercises.

1.	Suppose your data has activity clusters that you wish to analyze without the rest of the file. To do so, you first must create a list – you might call it, for example, “Clusters.” Then scroll through the data file, and add any good clusters (typical, clean, etc.) to the list. You can now extract these clusters to a new file or analyze them without considering the rest of the data.

2.	While analyzing your data, you may find that there are two types of clusters: one with high open probability (HPo) and one with low open probability (LPo). Since you want to analyze them separately, you have to create two lists first: “Clusters type I” and “Clusters type II”, for example. Then browse through the data file. Whenever you see a cluster that appears to be of type I, activate “Clusters type I” list and add the cluster to that list; similarly, add type II clusters to the “Clusters type II” list. After you scanned the whole data file, you can proceed further: extract the two lists in two separate files and analyze the kinetics of each type of cluster, etc.


Overview of Sim (Tutorial)
Tutorial I: Simulating Single Channel Data

A.	Overview and Description of Sim

This tutorial will introduce you to some basic features of the QuB Suite and teach you how to build a model, set simulation parameters, and display simulated current data from single or multiple ion channels using the “Sim” component of QuB.

Click here to see an Overview on Simulation

B.	Open Sim session and become familiar with interface

QuB has four interface layouts (Acq, Sim, Pre, Mod).

Read Overview of Interfaces and Overview of Simulation Interface for further details.

Next Step


Model Building (Tutorial)
Tutorial I: Simulating Single Channel Data

C.	How to Build a Model

This lesson will serve as a reference for model building because the model builder interface is constant within QuB. The next section describes the underlying considerations used in Model Design. You may follow along in Sim if you like. Don't worry if you don't understand everything now – following this discussion, there are specific tutorial's to teach you how to use the software.

General Considerations for Model Design:

A central goal of single channel kinetic analysis is to provide a description of the kinetic behavior of the ion channel, including estimation of transition rate constants. Single-channel kinetics are simulated by constructing a Markov model, which describes the conformational states in which the channel can exist. Each state belongs to a class, which is defined by its amplitude, such as closed or open. For example, if a certain channel has a closed state, an open state, and another closed state (e.g., inactivated), then the channel consists of two classes - closed and open, and three states- closed1, open2, and closed3. Each colored box represents a state, and the color of the box indicates its class. There can be multiple states with the same class. The program automatically numbers states in the order in which they are added to the model. The color (class) of a state may be altered by either double-clicking the left mouse button while positioned over the state, or by right-clicking on a state, clicking Properties, and selecting a color from the State and class properties window (try this in Sim Interface).

One of the goals in creating the model builder interface is to make model design as easy as possible without limiting the ability to create complex models with elaborate experimental conditions. In order to ease the generation of models that have rate constants that vary with drug concentration and/or voltage, only the intrinsic properties of the rate constants are assigned to the model. Properties that vary with experimental conditions, such as voltage (V), force (F), and concentration (C) are not associated with the model. The intrinsic properties of the model are defined by the transition Rate properties menu (right-click over a transition rate and select Properties from the pop-up menu). The formal expression representing the transition rate between states i and j (qij) is: , where ì and í represent the parameters that are intrinsic to the model. To simplify adding these parameters to the model, we use the expression: ,where P represents ligand concentration and Q represents voltage (displayed in the Rate properties window). The rate constant, k0, is defined as the transition rate at unity concentration and zero voltage. The k1 term is more complicated and is defined as:

where z is the unit charge, δ ?is the electrical distance from the energy well to the barrier peak, kb is Boltzman's constant, and T is the absolute temperature (kT/e is ~ 24 mV at 20?°C). For example, the value of k1 is ~ 20 V-1 when z = +1 and δ = 0.5. This value is entered into the Rate properties window only for rates that are voltage sensitive. The experimental variables, e.g. P and Q, are entered in a separate window (under Parameters within the Simulate window) and kept separate from the model. This allows you to fit a single model to data obtained at multiple experimental conditions.

After creating the graphical model and assigning the correct rate properties, the next step depends on the program. In Sim, the simulation parameters are then assigned; in SKM, the correct amplitudes and standard deviations are selected for each class; and in MIL, the correct class numbering must be added. The next lesson will illustrate the complete model building procedure within Sim. For reference, a summary of Mouse actions using the model builder in any analysis program is given below:

Summary of Mouse actions in Model Builder:

•	?Left Clicking on the background introduces a new state (the numbering of which is automatic and sequential)

•	?By positioning the mouse pointer over a state and holding down the left button, you can move a state around the Model window.

•	?Click and drag with the right mouse button to connect states.

•	?Right-clicking over a state and clicking Properties brings up the State and class properties window. The values for the starting probability, amplitude of the current, standard deviation of the current, and color corresponding to the class in which the state belongs are displayed. To remove a state, right-click on it and select Delete state from the pop-up menu.

•	?Double Clicking over a rate constant opens a Rate properties window, into which the initial rate constant, the concentration and voltage dependence flags, and the k1 value can be set. This window can also be reached by right clicking on a rate constant and selecting Properties from the pop-up menu. To remove a connection, right-click on one of the rate constants and select ‘Delete’ connection.

Next Step


Building a Simple Model (Tutorial)
Tutorial I: Simulating Single Channel Data

D. Building a Simple Model

We will build a "closed-open-closed" (COC) model to review/illustrate the task of model building and simulation. This simulated data set will then be used in the next tutorial to illustrate the basic features of SKM and MIL.

1. If you have altered the Model window while learning about how to build a model you will want to start off with a new model. Do this by selecting New Model from the File menu or selecting the Create New Model toolbar button. The New Model File window, will pop-up, allowing you to: name the new model, select the file type (.mdl or .qmf), and select its location. Clicking the (…) button to the right of the File name window will allow you to browse for the desired file location. Click OK, and a simple 2 class; 2 state model will appear in the model window. (You may also clear the model window by right clicking in the window and selecting Delete from the pop-up menu. A blank window will appear.)

2. Add another state to the model: Left click anywhere within the model window. A new state numbered "3" should appear with the default class color (Class 1, black).

3. Draw a connection between states 2 and 3: Position the mouse pointer over the 2nd state, hold down the right mouse button while dragging a line to the state 3. When over the state 3 release the mouse button and a connection line with 2 new rate constants (default value is 100) should appear.

4. Since the color scheme already denotes the two classes we wish to assign (a closed class and an open class) we do not need to change the color of any of the states. If you wish to practice class changes simply double-click the left mouse button on a state or else right-click on a state, go to the Properties window, and select a different color. Make sure when you are done you recreate a model with 3 states and 2 classes (the odd color should be state 2). If you make a mistake, you can delete a state by right clicking on it and selecting Delete state.

5. Add State Amplitudes and Standard Deviations: Position the mouse pointer over any state and wait a second. A pop-up window appears which lists the state values: pr0 for the probability of starting in that state, amp for amplitude of the current passing through the channel at that state, and sd for standard deviation of the current. (grp is reserved for future use, and will not be discussed here.) To change these values, Right-Click on the state and select Properties: a State and class properties window appears. Do this for State 2, and make sure that the Amplitude value for state # 2 is "1" (For now use positive values for amplitudes). Similarly, check that the amplitude values for states 1 and 3 are both "0". The default value for Standard Deviation for class 1 (black) is ".1" (this value is fine for this model). The default value for other colors is > .1 and can be changed. For this model, change the S.D. property of state 2 to "0.1," and click OK. Note that changing the properties of one state will automatically change all other states of the same class in the model.

6. Add initial probabilities to the mode: The default value for the starting probability of a state is 0. If nothing is changed, or if all of the starting probabilities are zero, Sim makes it equally likely for the channel to begin in any state. If you add starting probabilities to states and the sum of all the probabilities in the model are > or < 1 Sim will scale each starting value so that they add up to 1. For now, leave each starting probability set to 0, so that it is equally likely to begin in any of the three states.

7. Practice moving the model around in the Model window: Position the pointer over any state. Hold down the left mouse button and drag the state to anywhere in the Model window until you are comfortable with the position (the connection lines will follow). When you are comfortable with the positioning of the

model, continue on.

8. Set rate constants: Position and hold the pointer over any of the rate constants. A help window pops up with the default settings for the rate constants.  Set the backward rate constant between states 1 and 2 (k21) equal to 200: Double click the rate constant on the same side as the arrow pointing to state 1. The Rate properties window appears. Change k0 to "200" and click OK to return to the model builder. Notice that the rate constant value has changed. Change other rate constants so that the final model consists of the following rates: k12 = 100, k21 = 200, k23 = 200, k32 = 10000. The effects of changing voltage, concentration, and k1 will be illustrated in another tutorial.

9. Save model: The model design is now complete and it is important to save the model before running a simulation. A good way to organize your data is to make a directory called "Example Models" and save your new model file there. Select Save Model As under the File menu. Selecting the drive you wish to save the file on (usually the C:\ drive) does this from the Save in drop down menu. Once the contents of (C:) are listed, select the tool button for create new folder and type in the name of the new folder ("Example Models"). Double-click the new folder to make it the active directory. Type in the name of this new model under File Name (i.e., model1). An extension is not necessary; Sim will automatically add .mdl to the file name. Select Save to complete the task. QuB may warn you that some features of your model may be lost if it is saved in the .mdl format. In this case, you may save the model in the .qmf file format. When you are returned to Sim, you will notice that the Model window title bar now lists your new .mdl (or .qmf) file.

NOTE: In multiple ligand case, qmf file stores the number of ligands and also the respective names of ligands.  The mdl file does not store the number or the names of the ligands.

Next Step


Setting parameters and running a simulation (Tutorial)
Tutorial I: Simulating Single Channel Data

E. Setting Simulation Parameters, Running a Simulation & Viewing the Data

First, read the whole set of topics on Simulation under Tasks.  Click Simulation to go to the first of these topics. After going through the simulation parameters, follow the steps given below.

1.	Simulate the data. You are now ready to simulate your model with these simulation parameters. Left click the Simulate button to generate a new data file. In subsequent simulations, you need only to left click the Sim button on QuB’s right border toolbar to perform a simulation unless you wish to change the simulation parameters.

2.	The New data file window will open. Here you can specify the file name and its folder, and set the parameters of the data. The AD Channel count value gives the number of variables to be stored in the data (i.e. single channel current, holding voltage, etc.) QuB can be used to simulate the response of a single channel to a pulse of agonist. Two AD channels would be needed in this case – one to store the response, and one to store the stimulus. For this tutorial, only one (1) channel is needed. The Sampling value refers to the rate at which data is acquired/simulated and affects the time scale of your simulated data. This value should match the sampling rate you typically use for acquiring data if you want the appearance of your simulated data to match that of your experimental data. To change the sampling rate, you may enter either the sampling frequency (kHz) or the sampling time (msec) – the other value will be updated automatically. For this tutorial, the sampling frequency can remain at 20 kHz, but you can substitute your preferred sampling frequency. The Scaling value is the conversion factor between A/D units (used by the acquisition card) and the actual value of the current. A large scaling means better resolution, but too large a value may result in overflow. For simulation, the scaling should be chosen based on the maximum amplitude for an open state and the number of channels in the patch to be simulated. For example, if the amplitude of the open state is 10 pA and the number of channels is 1 (or a small number), the default scaling (320) is okay. However, if the number of channels is 1000 (as for a whole cell simulation), the scaling should be reduced accordingly (to ~1). These parameters will be saved under the Data tab of the Properties window.

To select a file format, check the box next to the format you would like to use. For this tutorial, use the .ldt file format to save your simulated data. The .ldt file format can store only one AD channel. The .qdf format can be used to save multiple channels of data.

It may be convenient to save this data file in the Example Models folder you created earlier. To do this, left click the button (…) to the right of the File name box. Locate and open the Example Models folder as described above (D.9). The default name for the file will be noname#. You may wish to call this data file “model1” to correspond to the model used to generate the data. Select the File name box and and type in the new name. Click Save. You will return to the New data file window, where the File name box should now correspond to the name and location that you just specified. Click OK. Sim will begin to simulate a single channel record. All segments are simulated before the first segment is displayed in the Data window. The report window will notify you that the simulation is complete.

3.	Viewing the data: The default settings for data display in QuB are such that each trace (or line of data) contains 10,000 points. Therefore, even though your data is segmented, it will appear continuous. If you hold the mouse cursor over a trace, you should see a tip window, which indicates the number of the current segment and the total number of segments.

Changing the display parameters: Right click anywhere in the data window – a pop-up menu appears. Open the Properties window. To change the resolution of the display, select the Display tab, and change the Traces per page value to “10” and the Points per trace value to “21000” (you will have to highlight the Points per trace box and type in the number to do this). Click OK. The QuB interface should now look similar to that in Figure 1. Half of your data is displayed. You can scroll through the data as you would a text file on a word processor – by dragging the scroll bar while holding down the left mouse button. There should be 20 segments of equal length (20,000 points, or 1 sec).

You can zoom in on a segment data by placing the pointer over the data, holding down the left mouse button, and dragging the pointer over the segment of data you would like to display in the zoom window. You can resize the display windows by placing the cursor on the border between them and dragging it up or down while the holding down the left mouse button.

Only a few of the display parameters have been altered here. Other changes that can be made to the display are described in other tutorials.

4.	 Altering the Color of the data: Go to the Properties window (E.5) and select the Colors tab. You can change the color of any component of the window by left clicking on the color bar you would like to change and selecting a new color from the Color window. Click OK to apply the change. Set as default.

5.	Save your data: Select Save Data from the File menu. If you attempt to close the file of QuB without first saving your data, QuB will ask you if you would like to save it. Click Yes, specify the file name and the folder, and select Save.

At this point you have finished Tutorial I. Go ahead and simulate data using different models or different parameters. A brief note about data organization: If you plan on simulating many different models, it may be a good idea to open up the ‘ Data Notes’ window and keep track of the different parameter settings and the model file used to create different .LDT files. A different ‘Data Notes’ file is associated with every data file using the information in the QSF file (QuB session file)

Figure 1

Back to Start


Figure 1: Simulated single channel data within the QuB interface. 10 traces, each 1 sec of simulated data, are depicted in the main display window; the highlighted section (red) is enlarged in the zoom window. The green line is the baseline; to remove it from the image uncheck the Bline show box. The openings here are upward; to change the orientation of the openings (upward/downward), go to the Properties window (Tutorial I, Sect. E.5), select the Display tab, check the Draw inverted box, and click OK.


Idealization Amplitude Estimation Kinetic Analysis (Tutorial)
Tutorial II: Idealization (Idl), Amplitude Estimation (Amp) &

Kinetic Analysis (MIL)

Overview:

This tutorial will teach you the basic steps in data analysis using the SKM and Mil components of QuB, and provide example exercises for you to acquaint yourself with the software.

Next Step


Interval Detection and Amplitude Estimation Using SKM (Tutorial)
Tutorial II: Idealization (Idl), Amplitude Estimation (Amp) &

Kinetic Analysis (MIL)

A. Interval detection and amplitude estimation using SKM.

In QuB, you can idealize single channel data using either the half-amplitude method or the segmental k-means (SKM) algorithm. SKM uses hidden Markov Models to find the most likely sequence of events in the data set you wish idealize. The outputs of SKM include: a probability density function for each event class, amplitude histograms, and mean durations and occupancy probability of each event class. The half amplitude method sets an amplitude threshold midway between each current class to determine whether a each point belongs to class 1 or class 2. (For example, any data point above the midpoint is considered part of a class 2 event.) This method is faster, but it can only be used to idealize filtered data, and there are no statistical outputs. This tutorial will focus on idealization using SKM.

1.	Begin SKM session. Open QuB. If you have not used any other interface since completing Tutorial I, QuB should open to the Sim interface. For single channel idealization and kinetic analysis, you will find it useful the Histogram, Model, Data, and Report windows. For convenience, the default setting of the Mod interface consists of these four windows (Figure 2). Left click on the Mod button located on the left border toolbar to reach this interface.

You can change the layout of the Mod interface now or at any time during the tutorial. When you are satisfied with the layout, proceed to step two.

2.	Open .LDT file created with Sim: If you have not closed Qub since completing Tutorial I, this step is not necessary – your simulated data and three state model should already be displayed. To open your data file, select Open Data under the File menu. Locate your file by selecting the correct directory for the Look in option of the Open window. Select your .ldt file (model1.ldt, from Tutorial I) and click Open.

The low-res data window displays the data according to the default display parameters, unless you have changed these parameters during the current QuB session (i.e. in the Tutorial I). You should now alter the display parameters (Tutorial I, E.6) to suit you preferences. In the Report window, you will find the directory and file name.

3.	When using SKM, the model can be very simple - one state for each conductance class. For example, the data file simulated with the C-O-C model can be idealized in SKM with a C-O model.  We recommend building a new, simplified model in SKM. Using the actual model from which the data were generated will (in some cases) improve the accuracy of detection, but in general the SKM algorithm is not very sensitive to the model (as long as there is at least one state for every class!). Make sure that a two state; two-class model is displayed in the Model window. If not, build a model or open a new model as described in Tutorial I.

Assign amplitude levels to the different classes: Highlight a portion of the baseline current in either data display window. Make sure that the highlighted data contains all the conductance levels. With this data highlighted (usually in red), right-click anywhere in the model window and Select ‘Grab all Amps increasing’ if Open state is UP and ‘Grab all Amps decreasing’ if Open state is DOWN.

This will assign the Amplitude (amp) and Standard Deviation (std) to the different classes in the model. If there are multiple states of the same class, they will all be updated. If you have done this correctly, the amplitude should be near 0 and the SD near 0.1. You can check these values by placing the mouse arrow over the Class 1 state (black) until the tips box appears. The parameter values for Class 2 should be near 1 for amp and 0.15 for std, unless you changed the values for amplitude and standard deviation of this current class when you simulated the data, in step D.5 of Tutorial I. (In this case, make sure these values match those that you input for the model used to simulate your data.)

Note: You can set these parameter values manually in the Properties window for each class of the model, which can be opened in the model builder (Tutorial I, D.5)

4.	See section B for an alternate method of assigning amplitude levels to each class using the Amplitude Estimator. You may wish to do this before running the idealization.

5.	Idealize your single channel data: Highlight a representative segment of your simulated data (which includes both event classes) in the low-res display window. (When analyzing long files, it is sometimes wise to first idealize a segment of data to insure that you have completed all steps in the idealization procedure correctly before analyzing the whole file; this will save time if you have made a mistake or there is a problem with the analysis.)  Right click the Idl button on the Modeling toolbar – the Idealize data window opens. There are several functions of this window that are described at the end of this section. For now, make sure that only the following boxes are checked: “Selection” (under Data source), “None” (under Process data), “SKM” (under Idealization method). These parameters will insure that (1) only the selection you have highlighted will be idealized, (2) all the data points will be included in this analysis, and (3) SKM will be used for this analysis.  Select Run to begin the idealization. The Report window displays the calculations performed by SKM to optimize the data in each segment. When the optimization is complete, the idealized data will appear in red superimposed over the segment of simulated data and the probability density function (pdf) of the normalized events will appear superimposed over the amplitude histogram in the Histogram window (Figure 2).

6.	Idealized Data Display: Check the idealization to convince yourself that it is correct, and that significant events have not been missed. If you chose a long selection to idealize, you can view a shorter segment in the high-res window by highlighting it in the low-res window. Note: You can view the idealized trace above the simulated data by checking the Idl show above box located on the toolbar. Remove the idealized trace from the display by un-checking the Idl show box – this will not undo the analysis. If a glitch is mis-interpreted as an event, select that and right-click in the data window and choose 'Join Idl’ to make it as baseline. Click here for more information on 'Join Idl’

7.	Now that you are satisfied with the idealization, check File on the Modeling toolber, and left click the Idl button – SKM will idealize the whole file according to the same parameters you specified above. Note: When using any function of the Modeling toolbar, you do not have to enter the parameters window to change the Data source parameter. Simply check the appropriate box on the Modeling toolbar: Sel (Selection), List (Selection List), File (Whole File), or File List.

When multiple segments of data are present, SKM optimzes each segment separately. Consequently, a pdf and amplitude histogram are constructed for each segment, but only one figure can be displayed at a time in the Histogram window. Use the scroll bar above the amplitude histogram to view the pdf for each segment, and make sure that you are satisfied with the fit of the pdf to the amplitude histogram for each segment.

8.	Outputs displayed in the Report window: About the segment, you will find the Length, Starting time, and Sampling duration. About each event class is displayed: the mean amplitude (amp) and standard deviation (xms), occupancy probability (occupancy), mean lifetime (lifetime), and number of events (nevent). About the idealized data, the Log likelihood (likelihood) and the number of iterations need to fit the data (Iterations) are displayed. Finally, the Transition Probability Matrix (the A-matrix) is displayed. Each entry is the probability of making a transition from state i to state j in one sample interval.

SKM outputs are displayed separately for each segment. You can use the scroll bars to view information about each segment, and you can copy and paste the text into the notepad or a word processor.

9.	Saving SKM outputs: While navigating the QuB interface and performing separate aspects of kinetic analysis (i.e. preprocessing, idealization, using Mil to optimize models to the single-channel data), there will be no need to save the SKM outputs. If you close QuB or the data file you are working on, clear the Report window, or wish to use either the idealized data or the statistical information provided by SKM in another program, there are a few options to save this data that are discussed below in the Notes on using SKM section.

Figure2

Next Step


Notes on Using SKM (Tutorial)
Tutorial II: Idealization (Idl), Amplitude Estimation (Amp) &

Kinetic Analysis (MIL)

Notes on using SKM

•	Functions of the Idealize data window

Read all the topics under Idealizing Data in the Tasks folder.

•	Saving SKM outputs

The idealized data is saved as a .dwt file, and statistical information is saved as .tbl and .csv files.

To save only a .dwt file, click the Ext button on the Preprocessing toolbar (on the right border). In the Extract selection window, check the DWT box (under Output format). You will also have to specify the Data source you want to save from, by selecting the appropriate box. You have the option of joining the segments, or dropping the first and last event by checking the appropriate box – located in the lower right corner of the window. QuB will automatically extract the data into a separate file of the same name, but with an “x” added to the end, and will place the file in the same location as the original file. Specify the name and location in the Output file name box, or click the (…) button to open the Save as window, allowing you to browse for a location. Check the Open file after extraction box if you would like to view the extracted data in the Data window. Click OK to begin the extraction; the Report window will notify you when the extraction is complete.

You can also save the .dwt file by selecting Idealized data -> Save idealized data from the File drop-down menu. The Save idealized data file as window will open; specify the location and file name you would like, and click Save. It would be a good idea to save the idealized data under the same name as the data source file. When you want to load the idealized trace using Idealized data -> Load idealized data, first open the data file and with the data file selected, load the idealized data file.

(NOTE: when idealized data is ‘loaded’ using Idealized data -> Load idealized data it loads over whichever data file is open in the data window. This could lead to problems if the data file associated with the idealized data file is not opened and highlighted in the data window.)

Next Step


Using AMP, MIL and Advanced MIL (Tutorial)
Tutorial II: Idealization (Idl), Amplitude Estimation (Amp) &

Kinetic Analysis (MIL)

B. Using the Amplitude Estimator (Amp)

Described in detail in Amplitude Estimation and its parameters

C. Kinetic analysis using MIL

1.	Begin MIL Session. Since you have just idealized your data, all you need to model your simulated data should be present in the Mod interface. You should have open: your simulated data and/or the idealized trace of the data (all you really need to be open is the .dwt file); the Model builder with a two state, two class model; and the Histogram and Report windows.

2.	Open or create a model: Use the same model designed to simulate the data.

3.	Check the class parameters: MIL will default black to be class 1, red to class 2, etc. Remember that SKM has made the state with the smallest (or most negative) amplitude class 1, so you may have to change these default values. For your COC model, make sure that the amplitude for state 1 = 0 and make sure that the amplitude of state 2 = 1. (The std parameter is not used by MIL).

4.	Setting rate constant values: Note that the default values can be changed in the Rate properties window for each rate constant, which can be accessed by double-clicking the rate you would like to change. You may find that providing MIL with an estimate for each rate constant may facilitate convergence of the optimization. Keep in mind that low estimates work better than high estimates.

5.	Right click the MIL button on the Modeling toolbar. The MIL model optimization window opens. Check the following circles: Whole file, Optimize, and Together. These parameters will insure that: (1) the entire idealized data file will be analyzed, (2) MIL will run an optimization, and (3) the segments will be analyzed all at once. Make sure that the Quiet outputs box is unchecked, so that MIL will display all the calculations involved in the convergence. Set the dead time (td, in msec) to “0.01.”

6.	Click Run to begin the optimization. The theoretical pdf curve and interval duration histograms (displayed in the Results window) for each conductance class are computed from the current model parameters, corrected by the dead time value.

The likelihood and rate constant estimates are recorded in the Report window. To see how these values change during the optimization, use the vertical scroll bar. Note that the initial guesses for the rate constants have a limited range of possible values. If the true rate is outside this range, the optimization will not converge correctly. The program will stop automatically after a predetermined number of iterations (set in the MIL model optimization window). Re-running the MIL optimization will resent the limit range for the rate constants, possibly allowing the optimization to converge correctly. For all iterations, the gradient for each and every parameter is listed in the first line of the text display. If you notice that the gradients are large, or that the rate constants have hit one of the range limits, stop and restart the re-optimization manually. To stop the optimization, click the Stop Tasks button on the right-hand panel in QuB.

The Task view window is a floating window accessed by selecting Tasks from the View drop-down menu. This window shows the ‘Task’, ‘Status of the task’, ‘Percentage completed’, and ‘Expected completion time’ for all tasks running at one time.

Restart MIL by left clicking the MIL button on the Modeling toolbar.

7.	Compare results with initial transition rates: For the simulated data, the rate constants calculated by MIL should be close to the correct values. An example of the type of output you should see in the Report window is displayed in Model 1 (see D. Example Models) and Figure 3.

Advanced Functions in the MIL Model Optimization window

Described in detail under MIL Optimization (in the TASKS folder).

Next Step


MIL Example Model Sets
Tutorial II: Idealization (Idl), Amplitude Estimation (Amp) &

Kinetic Analysis (MIL)

D. Example Model Sets

Try the following experiments to learn various features of the software. Example models, which correspond to each exercise, follow this list. Model1 is included as a reference.

Model 1: 3 state linear gating scheme: Open-Closed-Inactivated

Model Parameters:

Class sequence: 0 1 0 with transition rates (s-1) k12=100, k21=200, k23=200, k32=5000

Class 1 properties: amp=0, std=0.1

Class 2 properties: amp=1, std=0.15

pr0 (starting probabilities for each state): 0 0 0

Simulation Parameters:

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Result by MIL (td=0.08):

MIL finished after 6 iterations: LL = 19912.3, 4240 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	100.786    2.97895    0          0

  2	1	198.331    5.88554    0          0

  2	3	193.638    7.56172    0          0

  3	2	5010.63    244.143    0          0

Time Constants (Tau, Amp):

    Class 1: (10.07, 0.6092) (0.2027, 0.3908)

    Class 2: (3.065, 1)

Example 1

Effects of Model In SKM: Prove to yourself that the number of states used in SKM doesn’t matter for idealization as long as there is one class corresponding to each conductance level.

Example 2

Reducing the Number of Events: Show that the accuracy of the rate constants is decreased if the number of events is decreased.

Example 3

Reduced Signal to Noise Ratio: Decrease the amplitude of Class 2 to decrease the signal to noise ratio.

Example 4

Noisy Data:  Try “noisy” data that has been filtered down.

Example 5

Test of Missed Event Correction: Perform this experiment by demonstrating the effect of dead time on your results. The example includes a table the MIL outputs with different dead times. This illustrates the limitations of the missed event correction algorithm.

You have now completed Tutorial II. Setting constraints will be considered in Tutorial III.

Back to Start


Example 1: Effects of model in SKM

Idealize data using the model used to simulate the data, and show that there is no effect on results. Compare with Model 1.

Final Result by MIL (td=0.08):

MIL finished after 9 iterations: LL = 19912.3, 4240 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	100.864    2.94508    0          0

  2	1	198.18     5.83874    0          0

  2	3	193.561    7.56071    0          0

  3	2	5010.08    241.958    0          0

Time Constants (Tau, Amp):

    Class 1: (10.07, 0.6092) (0.2027, 0.3908)

    Class 2: (3.065, 1)


Example 2: Reduced Number of Events

Select only the first two traces for analysis by MIL. (Here, the number of events was decreased from 4240 to 350.) Note the decreased dwells in the histograms.

Final Result by MIL (td=0.08):

MIL finished after 9 iterations: LL = 1571.6, 350 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	88.3583    8.30704    0          0

  2	1	220.78     20.8776    0          0

  2	3	151.513    23.1442    0          0

  3	2	5698.63    1204.58    0          0

Time Constants (Tau, Amp):

    Class 1: (11.52, 0.7009) (0.1776, 0.2991)

    Class 2: (3.173, 1)


Example 3: Reduced Signal to Noise Ratio

Simulate new data using the same 3 state model with the following Class 2 properties:

amp = 0.3, S.D. = 0.15.

Final Result by MIL (td=0.08):

MIL finished after 9 iterations: LL = 13294.6, 3157 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	93.7917    2.79129    0          0

  2	1	178.299    5.52277    0          0

  2	3	70.8115    4.3231     0          0

  3	2	2401.36    194.808    0          0

Time Constants (Tau, Amp):

    Class 1: (10.82, 0.7556) (0.4188, 0.2444)

    Class 2: (4.248, 1)


Example 4: Noisy Data

Simulate new data, making the following changes to the model parameters.

Class 1 properties: amp = 0, S.D. = 0.5

Class 2 properties: amp = 1, S.D. = 0.6

Final Result by MIL (td=0.08):

MIL finished after 8 iterations: LL = 11387.9, 2823 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	94.8929    3.04831    0          0

  2	1	171.248    5.60838    0          0

  2	3	37.2918    3.7688     0          0

  3	2	1573.13    190.04     0          0

Time Constants (Tau, Amp):

    Class 1: (10.68, 0.8402) (0.6383, 0.1598)

    Class 2: (4.93, 1)


Example 5: Test of Missed Events Correction

Analyze the data simulated by Model 1, but impose increasing dead times until MIL fails to uncover underlying rates.

Final Result by MIL Organized into Table (td=0.08):


Complex Models and global constraints
Tutorial III: Complex Models and Global Constraints

A.	Overview

Assuming you have mastered the first two tutorials, you are now ready for more complicated examples. The following concepts will be covered: constraints (including detailed balance), concentration and voltage series, multiple conductance states, and multi-channel records, and using the log likelihood to assess model connectivity. Similar to Tutorial II, the main points of each concept will be described and Examples will be provided at the end.

Next Step


Constraints
Tutorial III: Complex Models and Global Constraints

B.	Constraints

1.	The Constraint menu is located in the model “Properties” window. To access this window, right click in the field of the Model window, click Properties from the pop-up menu, and then click the Constraints tab. There are six options for constraining rate constants: (1) Fix rates, (2) Scale rates, (3) Loop balance – see step 2 below, (4) Fix exponential terms, (5) Scale exponential terms, (6) Loop imbalance. The constraints are saved along with the model in the .mdl file. Using the constraints menu is described below.

Open a data file and idealized the data (or open the corresponding .dwt file). Create or open a model with at least three states (the C-O-C model from the first two tutorials is fine), and then access the Constraints menu. Highlight ‘Fix rates’ by left clicking on it, and in the box below the list of constraints, type: 1<space>2, and click Add (or hit <enter>). Displayed in the ‘Constraints:’ box will be, ‘Fix rate 1->2.’ Click OK. Now, when you run MIL, k12 will not change during the optimization. Next constrain the ratio of two rate constants. In the Constraints menu highlight the ‘Fix rate’ constraint and click Delete to remove this constraint. Highlight ‘Scale rates’ and enter four numbers, two for each rate constant. For example, 1<space>2<space>3<space>2<enter> will keep the ratio k12/k32 constant during the optimization. Try this. For voltage dependent rate constants, you can similarly fix or scale the exponential terms.

2.	Loop Constraints enforce detailed balance, i.e. the product of the clockwise rate constants is equal to the product of the counterclockwise rate constants.

Create a model with a loop that does not obey detailed balance and simulate data. In MIL, start with the same model with all rate constants equal (and therefore in detailed balance). In the Constraints menu, highlight Loop balance and type in the numbers corresponding to the states that make up the loop. In the box underneath the Constraints list, type in the number of each state in the loop that you want held in balance. (For example, w<space>x<space>y<space>z corresponds to the loop in Example 10.) Click Add or press <enter>, and then click OK.  During optimization, the rate constants will change but detailed balance will always be satisfied. After convergence, note the LL. Now delete the loop balance constraint and optimize. Notice that the LL is greater than with the loop constraint. See Examples 10 and 11. (VII.P. Model 4b and VII.Q. Model 4bwc.)

3.	Loop Constraints also enforce loop imbalance, i.e. the ratio of the product of the clockwise rate constants to the product of the counterclockwise rate constants is kept constant whereas the products are allowed to change. Loop Imbalance procedure is similar to the loop balance procedure described above.

Next Step


Concentration and Voltage Series
Tutorial III: Complex Models and Global Constraints

C.	Concentration and Voltage Series

1.	Overview. MIL can be used to fit a single model to a group of records obtained under different experimental conditions. This is useful because different experimental conditions emphasize different portions of the model and because the voltage/concentration dependence of a rate constant can be determined. Preparing MIL to fit a model across a concentration or voltage series requires two steps: (1) opening/loading a list of Files, specifying the experimental conditions used to generate the record (i.e. voltage or concentration); and (2) identifying ligand/voltage dependent rates in the model.

2.	Setting Rate Constants as Concentration/Voltage Dependent. Open the ‘Rate properties’ window for the rate that you would like to make dependent on either concentration or voltage. Check either box: P, ligand; or Q, voltage. Click Apply – the symbol (“p” or “q”) corresponding to the variable you selected will appear in the model next to the rate. This signifies that MIL will consider the rate dependent on the specified variable when the model is fit to the data. Click OK to set this change. Note: When modeling voltage dependence, be sure to set the k1 value to “1” so that this term will not distort the effect of voltage.

Note: The dependence of every rate in the model is defined by the equation displayed in the ‘Rate properties’ window (and discussed in part C of Tutorial I). For rates that are not dependent on either concentration (P) or voltage (Q), it can be said that these terms have values of 1 and 0, respectively. Then K = k0. If you set a rate as concentration dependent, this rate changes by a factor of the ligand concentration. Likewise, a voltage dependent rate is assumed to be an exponential function of the voltage times the value of k1.

3.	Modeling a Concentration Series. The utility of this function is that multiple files obtained using different concentrations can be fit simultaneously. This section describes the steps needed to model a concentration series and provides an example at the end.

a.	Clear the file list by unchecking all the files under ‘Use’, and check just a file. Any file will do, just remember to use a .dwt file; you may wish to use the simulated data you idealized in Tutorial II. Set the concentration value to 10 and left click Close to load the file.

b.	Make one of the rates concentration dependent.

c.	Optimize the model and note the final value of this rate constant.

d.	Now remove the concentration dependence from the rate constant.

e.	Optimize the model again and note that the rate constant value is now 10 times larger than in the previous analysis.

f.	The dwell time histograms displayed at the end of the optimization will pertain only to the first data file in your file list – this is denoted by “File 1” at the top of the Class 1 histogram. You can use the horizontal scroll bar at the top of the ‘Histogram’ window to view histograms for the remaining files.

As an exercise, you can simulate several data files using concentration dependent rate constants. Then load them into MIL as a file list and change the ligand concentration (Conc) appropriately. Set the appropriate rate constant(s) as being ligand dependent and run MIL. Note that when fitting multiple files the td can be different for each file. See Example __ at the end of this tutorial. VII.T. Model 6.

4.	Modeling a Voltage Series. A rate constant is assumed to be an exponential function of the voltage. To try the feature out, you must fit more than one file in MIL. This section describes the steps needed to model a voltage series and provides an example at the end.

a.	First, simulate two data files using a single model with one voltage-dependent rate constants at two different voltages. Make sure you give the files different names. For now, try the following parameters:

Model: C1 – O2

Voltage dependent rate: k12

Rates: k12 = 100, k21 = 100

k1 value: 1

Voltages: 1, -1

b.	Open a new model to use in your analysis.

c.	Idealize both files and extract the .dwt files.

d.	Check the required files under ‘Use’ for creating the file list containing both .dwt files – remember to set the appropriate voltage for each data file.

e.	In the model, make sure that the appropriate rate constant is set as voltage dependent. Also remember to set the k1 value to a non-zero number. (If the starting estimate for k1 is 0, then MIL will assume that the rate constant is not voltage-dependent. Therefore, you must set k1 equal to a non-zero value to make the rate constant voltage-dependent.)

f.	Optimize the rate constants.

g.	See that all of the histograms are well described by the rate constants. For each rate constant displayed in the ‘Report’ window, the first two columns are the pre-exponential value and its standard deviation. The second two columns are the exponent (k1) and its standard deviation. The voltage-dependent rate constant(s) should have an exponent value that is close to the one used in the simulation.

5.	The exponential term (k1). You have seen above that QuB can estimate k1 in a voltage series experiment. To test this, repeat the above exercise, but set the k1 value as “10” for your simulation. When you optimize your data, having set k1 to a non-zero value, the final result in MIL should yield a value of ~10 for the exponent. You may also not that you can estimate the value of the exponent for the voltage independent rate. For both rate constants, set k1=1. The final k1 value for the voltage-independent rate constants should be close to zero. Note: estimating the exponent for a rate constant adds a free parameter to the optimization.

Example Model __ reviews the effect of changing the Voltage and the exponential term. VII.R. Model 5.

6.	You can fit across files with rate constants as a function of concentration and/or voltage. If you suspect that some rate constants are changing with the ligand concentration, you may try the following trick. For a group of .dwt files, make the voltage value in the input list equal to the natural log of the experimental ligand concentration, and for all of the rate constants set k1 equal some small, nonzero value. Optimize, and look at the final values for k1. A concentration-independent rate constant should have k1=0, and a concentration dependent one should have k1=1. If k1 is neither zero nor 1, then maybe you are using the wrong model. See Example __ VII.S. Model 5b.

Next Step


Multiple Conductance States and Multi channel records
Tutorial III: Complex Models and Global Constraints

D.	Multiple conductance states and multi-channel records

Test the capacity for SKM and MIL to analyze records with multiple conductance states and/or multiple, independent, identical channels.

1.	Multiple conductance states: Simulate one channel using a three-state model with each state having different current amplitude, and using any rates. Idealize the current using SKM.

Remember, we recommend that the model you use in SKM has class 0 (default is black) as the lowest amplitude class, class 1 as the next lowest (default is red), etc. This is important; if you don’t do this, the SKM model may not be consistent with the appropriate MIL model. See VII.N. Model 4.

2.	Multiple channels: Next, simulate a file with a number, n, of identical channels; use a model that causes n channels to be open for at least a small portion of every segment. In principle you can analyze data from patches with several channels, but the SKM and MIL will much more slowly as n increases, so try n=2 or 3. Likewise, the number of conductance classes does not matter, but for simplicity you may wish to use a model with a single conductance class.

Simulating and analyzing multi-channel data will require a few extra steps outlined below:

a.	To simulate multi channel data, you must increase the Channel count in the ‘Simulate’ window (under the ‘Model’ tab). Increase the channel count using the arrows next to the Channel count box.

b.	Analyzing multi-channel data: you must increase the Channel count for the model – neither SKM nor MIL will function properly unless the channel count is correct. To do this open the ‘Properties’ window by right clicking in the field of the model builder and click the ‘Model’ tab. Increase the channel count using the arrows next to the Channel count box.

You will notice in the SKM and MIL outputs, that a separate pdf is generated for each current class (and in SKM, each amplitude is idealized as a separate current class). The MIL outputs will consist of a histogram and time constants for each conductance level in the record, but the rate constants should pertain to the simulated rate constants for one channel.

Next Step


Connectivity
Tutorial III: Complex Models and Global Constraints

E.	Connectivity

This section covers several exercises that will help you apply what you have learned so far to analyzing unknown single channel records: (1) Adding states to a model, (2) using states with wrong class assignments, (3) adding connections to a model, (4) changing connections within a model, and (5) using non-stationary data to distinguish between models. The Log Likelihood (LL) value calculated by MIL provides a standard by which you can judge the goodness of fit of the model to the data. You will see in the following examples that this value increases as states are added and correct connections between states are made, so pay attention to this value as you work through the following exercises. Here are some considerations of using the Log Likelihood to help you interpret you data.

a.	Increasing the number of states or connections increases the number of free parameters that MIL can use to fit the data and therefore will frequently increase the LL value by a few points, even if these states or connections are not really required to fit the data. Likewise, increasing the number of events increases the LL. Although it is well known that the LL value must be penalized by the number of free parameters, the means of doing this are still debated, and current opinions will not be discussed here. See the work of _____ Akaike and ______ Schwartz for further details. For the purposes of this tutorial, just keep in mind that when analyzing complex kinetic activity, you may want to make a judgment as to whether or not to include extra free parameters.

b.	When performing a kinetic analysis using MIL try the following method: Start with a simple C-O model. Add states of the same class one at a time until the LL value does not increase – this is the number of states represented by the dwell time histogram for that class. Perform the same procedure for the other conductance class to determine the number of states in the model. Then change the connections between states and keep track of the LL value to determine the correct model.

c.	Different models can give the same LL. Some models are not distinguishable using steady state data. However, analyzing non-steady state data in QuB may be able to distinguish between such models. (See number 4.)

1.	Adding unneeded states. Create a model and simulate data. Analyze the data, and then add another closed state and not the changes in the rates. The rate into the unneeded state should be close to zero. (Example __ H&J)

2.	Assigning the wrong class to a state. Simulate data using a model with multiple conductance classes. Model the data using the correct model, and then switch the conducting states. Note the changes in the result. (Example __ H&I)

3.	Adding unneeded connections to a model. Using the original model in number 2, analyze the data with an additional connection (do not worry about maintaining loop balance for this exercise). Note that the LL may increase, because you have increased the number of free parameters, but the rates will indicate that the transition almost never occurs. (Example __ K)

4.	Changing connections within a model. Simulate data using a 2 class model with several states (i.e., 3 Class 0, and 2 Class 1). As you analyze the data using MIL, note the increase in LL as you add states, and confirm that the number of states that fit the dwell time histograms matches the number of states you used to generate the data. Once you have built the correct model, delete one of the connections and reconnect the state at another point in the kinetic scheme. Note the change in LL. Once you have determined the number of states in your model, use the LL value to determine the correct connectivity. (Example __ L&M)

5.	Distinguishing between similar models. Some models are not distinguishable in equilibrium conditions (e.g., the starting probability of every state is 0), for example C-O-C and C-C-O (try this). To distinguish between two similar models, simulate a non-stationary experiment (i.e., a pulse of agonist onto a single channel, which begins in the closed state) using both models (C-O-C and C-C-O):

a.	Create 2 models: C-O-C and C-C-O.

b.	For each model, go to the ‘State and class properties’ window for the first class 0 state and set the starting probability (Starting prob) to 1. This insures that each segment begins in class one, as if an agonist pulse is being applied a resting ligand-gated channel.

c.	Simulate many short segments (so that there are only one or two openings per segment) for each model.

d.	Analyze each data set separately and notice that you will be able to distinguish the models using MIL.

Note: The dwell time histograms generated by MIL are not relevant when the currents are not in equilibrium, as in the above simulations. That is, the theoretical curves drawn for the rate constants will not fit the binned interval durations. Histograms should be ignored when the data do not represent equilibrium conditions. (Example __)

You have now mastered the basics of single channel analysis in QuB. Next you will learn how to pre-process your own single channel data.

Back to Start


Examples of Complex Models and constraints
Tutorial III: Complex Models and Global Constraints

F.	Example Model Sets

Example Models

The following exercises are provided for you to learn the software. Models 1 and 2 are provided as references for the other examples. Numbering of the examples is continued from the Tutorial II. Instructions for each example along with results are available on the following pages.

Model 1:

3-State, 2-Class Linear Gating Scheme: Closed-Open-Inactivated

Model Parameters:

Class sequence: 0 1 0

Transition rates (s-1): k12=100, k21=200, k23=200, k32=5000

Class 0 properties: amp=0, std=0.1

Class 1 properties: amp=1, std=0.15

pr0 (starting probabilities for each state): 0 0 0

Simulation Parameters:

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Result by MIL (td=0.08):

MIL finished after 6 iterations: LL = 19912.3, 4240 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	100.786    2.97895    0          0

  2	1	198.331    5.88554    0          0

  2	3	193.638    7.56172    0          0

  3	2	5010.63    244.143    0          0

Time Constants (Tau, Amp):

    Class 1: (10.07, 0.6092) (0.2027, 0.3908)

    Class 2: (3.065, 1)

Model 2:

3-State, 3-Class Linear Gating Scheme: Closed-Open-Sublevel

Model Parameters

Class sequence: 0 2 1

Transition rates: k12=100, k21=1000, k23=1000, k32=1000

Class 0: amp=0, std=0.1

Class 1: amp=0.7, std=0.15

Class 2: amp=1.0, std=0.15

pr0: 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Results in MIL (td=0.08):

MIL finished: LL = 28100.0 after 5 iterations, 5536 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	3	95.2814    13.486     0          0

  3	1	986.523    128.902    0          0

  2	3	972.862    51.5127    0          0

  3	2	1013.65    154.889    0          0

Time Constants (Tau, Amp):

    Class 1: (11.32, 0.994)

    Class 2: (1.111, 0.9994)

    Class 3: (0.5217, 1)

Example 6:

Loop Constraints

Example 7:

Loop Constraints with Multiple Conductance Classes

Example 8:

Modeling Concentration Dependence

Example 9:

Modeling a Voltage Series

Example 10:

Modeling a Sub conductance Level (Model 2)

Example 11:

Multi-Channel Simulation

Example 12:

Adding Unneeded States

Example 13:

Assigning the Wrong Class to a State

Example 14:

Adding Unneeded Connections

Example 15:

Changing Connections within a Model

Example 16:

Distinguishing Between Similar Models


Example 6: Loop Constraints

Simulate data using the following model, which does not obey detailed balance:

Model Parameters

Class sequence: 0 1 0 1 (Means: state 1 = class 0, state 2 = class 1, state 3 = class 0, and state 4 = class 1)

Transition rates (s-1): k12=75, k21= 100, k13= 5, k31=500, k24=350, k42=200, k34=500, k43=2500

Class 0: amp=0.0, std=0.1

Class 1: amp=1.0, std=0.15

pr0: 0 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Model the data constraining the model to obey loop balance.

Final Result by MIL (td=0.08):

MIL finished: LL = 16534.2 after 30 iterations, 3605 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	643.97     55.2474    0          0

  2	1	1831.11    139.744    0          0

  1	3	264.045    33.9232    0          0

  3	1	35.158     4.38443    0          0

  2	4	916.443    146.355    0          0

  4	2	205.075    27.6812    0          0

  3	4	55.6011    6.7711     0          0

  4	3	265.7      14.9151    0          0

Time Constants (Tau, Amp):

    Class 1: (1.196, 0.3404) (12.97, 0.6596)

    Class 2: (0.3651, 0.2818) (2.585, 0.7182)

Now remove the constraint and model the data again.

Final Result by MIL (td=0.08):

MIL finished: LL = 16652.8 after 10 iterations, 3605 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	75.7376    2.98856    0          0

  2	1	36.5191    34.0482    0          0

  1	3	7.31987    4.43276    0          0

  3	1	487.792    41.6216    0          0

  2	4	414.775    47.0745    0          0

  4	2	289.312    71.4081    0          0

  3	4	437.787    33.4137    0          0

  4	3	2387.46    155.099    0          0

Time Constants (Tau, Amp):

    Class 1: (12.81, 0.6684) (1.169, 0.3316)

    Class 2: (2.522, 0.7378) (0.3771, 0.2622)


Example 7: Loop Constraints with Multiple Conductance Classes

Simulate data using the following model, which does not obey detailed balance:

Model Parameters

Class sequence: 0 1 2

Transition rates: k12=20, k21=50, k23=100, k32=1000, k13=100, k31=100

Class 0: amp=0.0, std=0.1

Class 1: amp=1.0, std=0.15

Class 2: amp=2.0, std=0.2

pr0: 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Result by MIL with Loop Balance Constrained (td=0.08):

MIL finished: LL = 17501.5 after 12 iterations, 4164 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	60.3033    2.75531    0          0

  2	1	31.61      1.37645    0          0

  1	3	66.2194    2.90266    0          0

  3	1	256.303    9.84226    0          0

  2	3	119.477    3.71322    0          0

  3	2	882.205    27.1833    0          0

Time Constants (Tau, Amp):

    Class 1: (7.996, 0.9993)

    Class 2: (7, 0.9998)

    Class 3: (0.8859, 1)

Final Result by MIL without Loop Balance Constrained (td=0.08):

MIL finished: LL = 17808.4 after 8 iterations, 4164 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	20.4908    2.19526    0          0

  2	1	52.1226    2.11608    0          0

  1	3	105.499    4.28438    0          0

  3	1	103.22     8.57517    0          0

  2	3	98.6441    3.03543    0          0

  3	2	1034.43    26.7357    0          0

Time Constants (Tau, Amp):

    Class 1: (7.996, 0.9992)

    Class 2: (7, 0.9998)

    Class 3: (0.886, 1)


Example 8: Modeling Concentration Dependence

Using Model 1, set rate k12 as Ligand Dependent. Simulate four data files as if you had performed a concentration series using agonist concentrations of 0 mM to 1000 mM. Do this by setting the following Ligand values on the ‘Parameters’ panel of the ‘Simulation’ window: 10, 1, 0.1, 0.01. Idealize each file and extract the .dwt. Then create a file list using MIL and optimize all the files together.

Model Parameters

Concentration Dependence: k12

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Ligand: 10, 1, 0.1, 0.01 (4 simulations, each using a different Ligand value.)

Final Result in MIL (td=0.08):

MIL finished after 9 iterations: LL = 76643.5, 14719 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	98.1268    1.78733    0          0

  2	1	177.603    3.81563    0          0

  2	3	200.18     4.60878    0          0

  3	2	5050.32    152.642    0          0

Time Constants (Tau, Amp):

  File 1:

    Class 1: (1034, 0.5767) (0.2011, 0.4233)

    Class 2: (3.213, 1)

  File 2:

    Class 1: (103.4, 0.5766) (0.2011, 0.4234)

    Class 2: (3.214, 1)

  File 3:

    Class 1: (10.34, 0.5751) (0.2011, 0.4249)

    Class 2: (3.227, 1)

  File 4:

    Class 1: (1.034, 0.5613) (0.2011, 0.4387)

    Class 2: (3.357, 1)


Example 9: Modeling a Voltage Series

Using Model 1, set rate k12 as Voltage Dependent. Simulate four data files as if you had performed a voltage series according to the parameters listed below. (Note: Setting a value greater than 1 for k1 will demonstrate that the effect of the exponential term as well as the voltage.) Simulate data for each voltage step – remember to set the voltage parameter in volts (V). Idealize the data using SKM and save the .dwt files. Create a file list using MIL and optimize the files together. (Remember to set the value for k1 to a non-zero number.) Note that MIL determines the rates across the voltage series and also determines the exponential term (k1).

Model Parameters

Voltage dependent rate: k12

Value k1: 4

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Voltage steps: -100, -40, 0, 40, 100 mV

Final Result by MIL (td=0.08):

MIL finished: LL = 100052.3 after 11 iterations, 21234 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	100.018    1.32252    3.7528     0.187642

  2	1	191.096    2.55629    0          0

  2	3	194.178    3.34865    0          0

  3	2	5026.43    107.784    0          0

Time Constants (Tau, Amp):

  File 1:

    Class 1: (14.78, 0.6004) (0.202, 0.3996)

    Class 2: (3.126, 1)

  File 2:

    Class 1: (11.8, 0.6002) (0.202, 0.3998)

    Class 2: (3.128, 1)

  File 3:

    Class 1: (10.15, 0.5999) (0.202, 0.4001)

    Class 2: (3.13, 1)

  File 4:

    Class 1: (8.738, 0.5997) (0.202, 0.4003)

    Class 2: (3.133, 1)

  File 5:

    Class 1: (6.976, 0.5992) (0.202, 0.4008)

    Class 2: (3.137, 1)


Example 10: Modeling a Sub conductance Level (Model 2)

Simulate data using a 3 State, 3 Class model with the following parameters:

Model Parameters

Class sequence: 0 2 1

Transition rates: k12=100, k21=1000, k23=1000, k32=1000

Class 0: amp=0, std=0.1

Class 1: amp=0.7, std=0.15

Class 2: amp=1.0, std=0.15

pr0: 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Results in MIL (td=0.08):

MIL finished: LL = 26779.6 after 6 iterations, 5371 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	102.81     2.61254    0          0

  2	1	1013.75    25.7472    0          0

  2	3	829.501    23.9107    0          0

  3	2	891.536    25.6381    0          0

Time Constants (Tau, Amp):

    Class 1: (10.61, 0.9943)

    Class 2: (1.203, 0.9992)

    Class 3: (0.5649, 1)


Example 11: Multi-Channel Simulation

Use Model 1, but increase the number of channels to 3 in the simulation. Note: to simulate multi-channel data, you must increase the Channel count on the ‘Model’ panel in the ‘Simulate’ window.

Final Result by MIL (td=0.08):

MIL finished: LL = 60797.8 after 6 iterations, 11907 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	97.705     1.8125     0          0

  2	1	192.283    3.57282    0          0

  2	3	186.194    4.47604    0          0

  3	2	4830.9     158.374    0          0

Time Constants (Tau, Amp):

    Class 1: (3.464, 0.592) (0.2019, 0.3968) (0.1037, 0.009694) (0.06972, 5.281E-5)

    Class 2: (1.984, 0.8011) (0.1975, 0.1962) (0.1033, 0.002224)

    Class 3: (1.377, 0.9169) (0.193, 0.07563)

    Class 4: (1.046, 0.9816)

The next several examples will all refer to Model 2. If you wish to see how the Log Likelihood (LL) changes as you work through these exercises, you may wish to complete them in sequence, using the same idealized data set. Remember that you can extract the .dwt if you plan to close QuB between exercises.


Example 12: Adding Unneeded States

Simulate single channel data using Model 2. Then attempt to model the data using the model below, which has an additional closed state. Expect MIL to have trouble converging. You may need to start with the correct model, and then add the extra state to get MIL to converge. From the MIL results, it is clear that the state is not needed to fit the model to the data. The rate into the state is nearly zero, and the LL does not increase significantly (or decreases) when the state is added.

Model Parameters

Class sequence: 0 2 1 0

Transition rates: Not applicable (MIL will generate rates)

Class 0: amp=0, std=0.1

Class 1: amp=0.7, std=0.15

Class 2: amp=1.0, std=0.15

pr0: 0 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Results in MIL (td=0.08):

MIL finished: LL = 26777.7 after 17 iterations, 5371 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	103.173    2.68706    0          0

  2	1	1012.44    25.4291    0          0

  2	3	829.096    22.9357    0          0

  3	2	891.725    25.3856    0          0

  3	4	1.14036    1.8015     0          0

  4	3	36.2926    28.0927    0          0

Time Constants (Tau, Amp):

    Class 1: (10.58, 0.9932) (27.46, 0.00114)

    Class 2: (1.203, 0.9992)

    Class 3: (0.5655, 1)


Example 13: Assigning the Wrong Class to a State

Try modeling data simulated with Model 2 using this model. (Notice the color change.) You should see incorrect rates and a decrease in LL.

Model Parameters

Class sequence: 0 1 2

Final Results in MIL (td=0.08)

MIL finished: LL = 21021.0 after 8 iterations, 5371 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	102.233    2.62367    0          0

  2	1	985.705    24.7295    0          0

  2	3	2078.5     42.7921    0          0

  3	2	2123.1     43.6518    0          0

Time Constants (Tau, Amp):

    Class 1: (10.61, 0.9696)

    Class 2: (0.3712, 1)

    Class 3: (0.5631, 0.9992)


Example 14: Adding Unneeded Connections

Model data generated by Model 2 after adding a connection to the model. (Do not worry about maintaining loop balance in this exercise.) From the transition rates, you can see that the unneeded transition (1 ? 3) rarely occurs.

Final Result in MIL (td=0.08):

MIL finished: LL = 26779.5 after 51 iterations, 5371 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	102.844    2.77943    0          0

  2	1	1012.91    24.3922    0          0

  1	3	0.1        0.35281    0          0

  3	1	0.824228   1.87412    0          0

  2	3	829.354    24.4767    0          0

  3	2	891.677    24.8987    0          0

Time Constants (Tau, Amp):

    Class 1: (10.6, 0.9943)

    Class 2: (1.203, 0.9992)

    Class 3: (0.5653, 1)


Example 15: Changing Connections within a Model

Simulate data using the following model and simulation parameters. Then model the data with MIL, adding one state at a time and noticing the change in LL. (Remember that when using MIL, you may need to provide a guess of the rate constants to help MIL converge.) After you have correctly modeled the simulated data, change one of the connections and run the MIL optimizer again – note the change in LL and the rate constants.

Model Parameters

Class Sequence: 0 0 1 0 1

Transition Rates: k12=200, k21=1000, k23=1000, k32=5000, k24=100, k42=200, k45=1000, k54=500

Class 0: amp=0, std=0.1

Class 1: amp=1, std=0.15

pr0: 0 0 0 0 0

Simulation Parameters

Sampling rate: 20,000 Hz, Segments: 20, Points: 20,000, Number of Channels: 1

Final Result in MIL (td=0.08)

MIL finished: LL = 29777.2 after 17 iterations, 5490 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	206.165    12.0262    0          0

  2	1	1050.23    103.142    0          0

  2	3	980.085    72.3648    0          0

  3	2	4527.58    130.754    0          0

  2	4	82.4331    9.51791    0          0

  4	2	188.082    17.3971    0          0

  4	5	1040.94    40.6048    0          0

  5	4	487.265    15.894     0          0

Time Constants (Tau, Amp):

    Class 1: (12.45, 0.4583) (0.5106, 0.1248) (0.8537, 0.4168)

    Class 2: (0.238, 0.6148) (2.229, 0.3852)

Now attempt to model the same data using this model with altered connectivity.

Final Result in MIL (td=0.08)

MIL finished: LL = 29777.2 after 17 iterations, 5490 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	206.165    12.0262    0          0

  2	1	1050.23    103.142    0          0

  2	3	980.085    72.3648    0          0

  3	2	4527.58    130.754    0          0

  2	4	82.4331    9.51791    0          0

  4	2	188.082    17.3971    0          0

  4	5	1040.94    40.6048    0          0

  5	4	487.265    15.894     0          0

Time Constants (Tau, Amp):

    Class 1: (12.45, 0.4583) (0.5106, 0.1248) (0.8537, 0.4168)

    Class 2: (0.238, 0.6148) (2.229, 0.3852)


Example 16: Distinguishing Between Similar Models

(a) 	First show that two models (C-O-C and C-C-O) cannot distinguished by LL when data obtained at equilibrium is analyzed (note that the starting probability for State 1 is 0):

Model Parameters:

Class sequence: 0 1 0

Transition rates (s-1): k12=1000, k21=100, k23=20, k32=4

Class 0 properties: amp=0, std=0.1

Class 1 properties: amp=1, std=0.15

pr0: 0 0 0

Simulation Parameters:

Sampling rate: 20,000 Hz, Segments: 10, Points: 100,000, Number of Channels: 1

Final Result in MIL (C-O-C, td=0.08)

MIL finished: LL = 8757.0 after 6 iterations, 2124 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	1011.34    35.2164    0          0

  2	1	95.4213    3.23462    0          0

  2	3	17.3805    1.33906    0          0

  3	2	4.57316    0.347903   0          0

Time Constants (Tau, Amp):

    Class 1: (0.9963, 0.834) (218.8, 0.166)

    Class 2: (9.495, 1)

Final Result in MIL (C-C-O, td=0.08)

MIL finished: LL = 8756.4 after 19 iterations, 2124 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	5.40372    0.408446   0          0

  2	1	153.783    12.3412    0          0

  2	3	857.019    34.2177    0          0

  3	2	112.763    3.4743     0          0

Time Constants (Tau, Amp):

    Class 1: (218.8, 0.1655) (0.9962, 0.8345)

    Class 2: (9.495, 1)

(b) 	Now simulate data using the same model, but setting the starting probability of State 1 to 1, and show that the two models can be distinguished by LL when non-stationary data is analyzed.

Model Parameters:

Class sequence: 0 1 0

Transition rates (s-1): k12=1000, k21=100, k23=20, k32=4

Class 0 properties: amp=0, std=0.1

Class 1 properties: amp=1, std=0.15

pr0: 1 0 0

Simulation Parameters:

Sampling rate: 20,000 Hz, Segments: 100, Points: 10,000, Number of Channels: 1

Final Result in MIL (C-O-C, td=0.08)

MIL finished: LL = 10652.2 after 13 iterations, 2554 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	1019.35    35.0358    0          0

  2	1	96.6179    2.94627    0          0

  2	3	18.3837    1.26117    0          0

  3	2	5.75832    0.400906   0          0

Time Constants (Tau, Amp):

    Class 1: (0.9886, 0.8277) (173.9, 0.1723)

    Class 2: (9.309, 1)

Final Result in MIL (C-C-O, td=0.08)

MIL finished: LL = 10637.7 after 23 iterations, 2554 events

  Rates:

  s1	s2	k0         k0.std     k1         k1.std

  1	2	6.74515    0.481989   0          0

  2	1	150.826    11.2307    0          0

  2	3	867.626    28.5087    0          0

  3	2	115.11     3.23358    0          0

Time Constants (Tau, Amp):

    Class 1: (174.4, 0.1616) (0.9886, 0.8384)

    Class 2: (9.308, 1)

This is end of Tutorial IV. You have now mastered the basics of single channel analysis in QuB. Next you will learn how to pre-process your own single channel data.


QUB
ABOUT QUB

QuB is a program designed to make single channel records easier to analyze. With QuB's user-friendly graphical interface, you can

•	acquire data, continuously or with episodic stimulation

•	filter data and correct for baseline drift

•	detect current transitions in the presence of substantial noise

•	estimate rate constants and voltage-dependence without fitting histograms

•	analyze the kinetics of multichannel records and nonstationary data

•	simulate single-channel and ensemble currents for any model.

•	curve-fit data, charts and histograms

•	classify heterogeneous data selections

•	output reports and figures to MS Word and Excel

Applications

QuB has applications in neurophysiology, electrophysiology, biophysics, etc. It was built to ease analysis of single channel patch clamp records from electrophysiological experiments, but can be used to evaluate any data which is in the form of single, stochastic events.

A selection of papers about and using QuB is available on the publications page.

Data Formats

QuB can read and write .abf, .pul, .ldt, .dat, .qdf, .txt, .wav, and .dwt files.

Features

Some of QuB’s important features are listed below:

1.	Allows continuous workflow from data acquisition to final results without switching programs or saving & reopening intermediate files

2.	Multi-threaded operation:

a.	concurrent processing of multiple files

b.	interruptible algorithms

3.	Multiple open data files

4.	Low and high resolution data display

5.	Analysis History is saved in a session file; this includes idealization, experimental conditions, baseline corrections, results of analysis, display settings to name a few.

6.	Multiple open model files

7.	classic QUB algorithms:

a.	Simulation

b.	SKM -- Segmental K-Means idealization

c.	MIL -- Maximum interval likelihood rate optimization

d.	MPL -- Maximum point likelihood rate optimization

e.	Model search -- evaluate all model topologies with MIL

f.	Model merge -- combine two models into one aggregate model

8.	new algorithms:

a.	Idl/Base -- idealize data with uneven baseline using HMM + Kalman

b.	MIP -- maximum idealized point likelihood rate optimization

c.	Mac -- solve single-channel rate constants from macroscopic data

d.	Staircase -- solve rate constants for staircase data e.g. kinesin fluorescence position

e.	Exp -- fit macroscopic data with exponentials

f.	constructive model search -- build star- or chain-shaped models by adding states until likelihood plateaus

9.	Curve fitting: with multiple components

10.	Data acquisition and stimulation:

a.	supports National Instruments, Data Translation, and any sound card

b.	auto-detects hardware

c.	multiple channels of continuous input and output

d.	oscilloscope

e.	manual i/o for reading or writing one value at a time

f.	graphical design of stimulation protocols for output or simulation

------------------------------------------------------------------------------------------

The Programs in the QuB Software Suite are copyrighted by the Research Foundation State University of New York. The software is intended for personal use only, and may not be redistributed or sold in any form.

Credits

Copyright


CREDITS


COPYRIGHT AND DISCLAIMER

The Programs in the QuB Software Suite are copyrighted by the Research Foundation State University of New York. The software is intended for personal use only, and may not be redistributed or sold in any form.

Any publications that make use of MIL should reference these two papers:

•	Qin, F., A. Auerbach, and F. Sachs (1996) Estimating single-channel kinetic parameters from idealized patch clamp data containing missed events. Biophysical Journal 70:264-280. View the Abstract at the Biophysical Journal Site: http://www.biophysj.org/cgi/content/abstract/70/1/264

•	Qin, F., A. Auerbach, and F. Sachs (1997) Maximum likelihood estimation of aggregated Markov processes. Proceedings of the Royal Society B 264:375-383.

Any publications that make use of MPL should reference these two papers:

•	Qin,F., Auerbach,A. & Sachs,F. Hidden Markov Modeling for Single Channel Kinetics with Filtering and Correlated Noise. Biophys. J. 2000 79: 1928-1944.

•	Qin,F., Auerbach,A. & Sachs,F. A Direct Optimization Approach to Hidden Markov Modeling for Single Channel Kinetics. Biophys. J. 2000 79: 1915-1927

Any publications that make use of SKM should reference the following paper:

•	Qin, F. Restoration of Single-Channel Currents Using the Segmental k-Means Method Based on Hidden Markov Modeling Biophys. J. 2004 86: March 2004


Scripting Language - Overview
SCRIPTING LANGUAGE – PURPOSE

The scripting language is an important tool in QuB. It is used to automate certain tasks (similar to the usage of macros in MS word or VB scripts itself) and is used in Simulation and Acquisition Output (e.g. to generate waveforms for stimulation protocols).

There are two types of scripts each having its own window: the Kinetic scripts and the Python scripts

We will now discuss about each of them in detail.

OVERVIEW OF COMMANDS, SYNTAX & STRUCTURES


Kinetic Scripts - commands, syntax and structures
OVERVIEW OF COMMANDS, SYNTAX & STRUCTURES

The scripting language is similar to other programming languages like C and Pascal. Every line in the code ends in a semi-colon. In order to use a variable in the program code, it must be declared before it is used. The language is case sensitive.

For Example,

var x;

var i,j;

var voltage = 0.05, conc = 0.1;

The variables can be optionally initialized to a value and more than one can be declared in one line.

We can also declare constants by replacing var by const in the same syntax as above.

const conc0 = 0.02;

const conc1 = 0.04;

For assigning a string to a variable we can do as follows:

var strname = “myname”

CONTROL STRUCTURES

The language has various looping and control structures, which are enlisted as follows:

•	while…do

Format: while condition do {…};

Example:

var x = 1;

while (x<6) do

{

write (x,"***");

write (newline);

x = x+ 1;

};

Output:

1 ***

2 ***

3 ***

4 ***

5 ***

•	repeat…until

Format: repeat {…} until condition;

Example:

var x = 1;

repeat

{

write (x,"***");

write (newline);

x = x + 1;

}until(x>5);

Output:

1 ***

2 ***

3 ***

4 ***

5 ***

•	for… do

Format: for loopvar = startvalue to endvalue step stepvalue do { …};

Example:

var x;

for x = 1 to 10 step 2

do

{

write (x,"***");

write (newline);

x = x + 1;

};

Output:

1 ***

3 ***

5 ***

7 ***

9 ***

All the above control structures are used for repeating a step (or a set of steps) in a controlled manner i.e. based on some condition.

•	if…then…else

Format:

if condition then

{

…

} else if condition then {

…

} else {

…

};

Example:

var x = random;

write(x);

if x<0.5 then

{

write("The value of x is below 0.5 and is equal to:", x);

} else if (x>0.5) and (x < 0.8) then

{

write("The value of x is above 0.5 and below 0.8 and is equal to:", x);

} else

{

write("The Value of x is between 0.8 and 1 and equal to ", x);

};

Output

0.748004511697218

The value of x is below 0.5 and is equal to: 0.373604987049475

This is used for executing a set of statements if and only if the corresponding condition is satisfied.

IMPORTANT COMMANDS AND STATEMENTS

•	break

This command is used to exit from all loop structures namely the repeat…until, while…do and for…do loop. Its syntax is

{…

break;

}

•	end

This command stops the program execution at that point. The usage of end is optional. It is not necessary at the end of the program.

•	stop

This command pauses the program execution at that point. This is mainly used for debugging and allows the user to inspect variables’ values.

•	beep

This command makes a sound when executed. This can be used to indicate what part of the program is being executed if the code is a big one.

•	write

This is used to output something on the console window.

For example

write (arg1, arg2, arg3, …);

outputs the values of the variables arg1, arg2 etc.

•	newline & tab

Two predefined strings tab and newline could be used.

k0=0.4; k1=0.5; k2=0.6;

write (“Rate constants: ”, newline, k0,k1,k2);

The output will look like

Rate constants:

 0.4 0.5 0.6

ARRAYS

Arrays are declared using the keyword array.

For example the line,

array xyz ( 0,10);

declares a one-dimensional array with elements indexed from 0 to 10 (i.e. 11 elements).

The 2 values inside the bracket gives the bounds of the index of the elements of the array, both numbers included. So in the above case we have a total of 11 elements in the array.

To access an element of the array {read or write}, we use the following syntax.

xyz[2] = 0.5;

This assigns a value of 0.5 to the third element.

The number of pairs of bounds separated by a comma indicates the dimensionality of an array.

Example

array abc(1,2,1,10);

is an array called abc and has 2 dimensions with the first dimension having 2 elements indexed 1 & 2 and the second capable of having elements indexed from 1 to 10 i.e. 10 elements.

We can have up to 10 dimensions like this in kinetic scripts.

SCRIPTS WINDOW – CONTROL BUTTONS


Kinetic Scripts - Control Buttons
SCRIPTS WINDOW – CONTROL BUTTONS

Open a source file

Any source file has a *.kin extension.  This button is used for opening kinetic scripts source files.

Save a source file

This is used for saving scripts files. This opens a save as window and we can name/rename the current file, chose a suitable location for the file and save it.

Compile

This is used for compiling the kinetic scripts code written

Run

Used for executing the entire program code.

Run to cursor

This is used for executing loops step by step. The cursor stops when it comes across a control loop structures and every press of this button executes an iteration of the loop.

Step

This is used for executing the program step by step. Clicking this button first highlights the next step in the code and then executes the step and this continues through the entire code.

Pause/ Suspend

This suspends the execution of the code.

Stop

This stops the code execution.

Watch an expression

This is used for debugging the program when we don’t get the requisite results. This button opens a window ‘watch’ where we can enter the expression in the code we want to watch for errors. Any errors, if occurred, would be reported in the watch | value part of the scripts window.

SCRIPTING LANGUAGE – OVERVIEW


Pulse waveform generation using scripts
EXAMPLE ONE: PULSES

The different types of waveforms that can be constructed using kinetic scripts are the following:

•	Pulse

•	Ramp

•	Sine

•	Waveform (any user defined waveform)

A pulse can consist of three parts namely

Pre-duration

Duration

Post-duration

We use the keyword pulse for generating a pulse using kinetic scripts. Also in the specification of the pulse, we have distinct amplitude levels for all three parts specified by the keyword level.

Example:

pulse(preduration=0.1, prelevel=0, duration=0.2, level=1, postduration=0.1, postlevel=0);

The numerical values are all time parameters in seconds. The output of the above statement (applied 5 times) as executed in the kinetic scripts window is as shown below.

All three parts stated above are not necessary for constructing a pulse and we can do so by using any 2 parts. Also we can repeat a particular pulse many times by including a count value.

For example,

pulse(count=10, preduration=0.5, prelevel=0, duration=0.1, level=1);

The output will appear in the data window and will look as follows:

We can also repeat a part of the pulse using the step button on the scripts window interface.

Click here for the explanations for the various control buttons in the scripts window.


Ramp waveform generation using scripts
EXAMPLE TWO: RAMP

A ramp can be constructed by giving the start and end amplitude levels and the duration of the ramp. We use the keyword ramp with the properties in brackets for generating one.

Example:

ramp(startlevel=0, duration=0.5, endlevel=1);

The start and end levels denote the respective amplitudes. The duration is in seconds.

The output will look as follows:

It is not necessary to mention both the amplitude levels. If one is not mentioned, its value is taken to be zero by default. We give a couple of examples here.

1. ramp(duration=0.5, endlevel=1);

Output is as below:

2. ramp(startlevel=1, duration=0.5);

Output is as below:

If you want non-zero amplitude for the startlevel, you can either specify it in the brackets after the keyword ramp or in a line before the keyword as

value(0)= x, where x is the amplitude at time 0 seconds.

For example,

value(0)= 0.5;

ramp(duration=0.5, endlevel=0);

Output is as below:


Overview of Mac
Tutorial IV: Macroscopic Currents Optimization

A. Overview and Description of Mac

This tutorial will introduce you to the basic features of 'Mac' and teach you how to directly estimate the kinetics of the model and optionally, the channel count, from macroscopic currents using Hidden Markov models. We use here the “Mac” component of QuB. Some examples would also be provided to acquaint you with this feature.

Mac is very much similar in operation to MIL, MPL, MIP and Stair. Click below to see introductions on related topics.

Overview on MIL

Overview on MPL

Overview on MIP

Overview on Stair

Next Page


Kinetic Analysis Using Mac
Tutorial IV: Macroscopic Currents Optimization

B. Kinetic Analysis Using Mac

1. Begin Mac Session:

 Unlike MIL, you don’t have to idealize your data for Mac. We use the MAC interface for the Mac session. We can get rid of the Histogram window and keep the Report window instead. So the simulated data file (*.ldt), the model builder window with a default two class model and the report window would be open.

To simulate the data, you use the Sim component of QuB. Make sure that the channel count (under the Model Tab) is set to some reasonable value, say, 1000. Also select the 'Microscopic' button under the simulation tab. Under the data tab, select the segment count and size according to your convenience.

The scaling in the data window is a very important factor. If the scaling is very high, it leads to overflow. The program assigns a value, say 100, to 1pA of the data. So for all the channels in the data, say 1000, the total value would be 100000 (multiply by the channel count). This leads to overflow. Any value greater than +32768 and less than – 32767 would lead to overflow.

2. Open or create a model:

For building the model, we must have:

•	The estimate of the no. of channels

•	The estimate of the kinetics

•	The initial state probabilities

•	The amplitudes and std. deviation of each class (conductance model)

•	The model should start in one state. So, we make the starting probability of that state 1. To do this, right-click the state, select properties and enter the value in the respective box.

3. Check the Class Parameters and Set Rate Constant Values:

Mac will default black to be class 1, red to class 2, etc. Make the default value of the rate constants to be 100. Double click the rates, change the k0 value and click ‘Set as Default’. Mac needs good starting values for better convergence of the optimization. Keep in mind that low estimates work better than high estimates. Fast rates lead to numerical problems and in such cases, we can scale the rates.

4. Options in the Mac window:

Right click the Mac button on the Modeling toolbar. The Macroscopic Currents Optimization window opens. There are several functions of this window that are described in the Mac window help under Tasks - Modeling.

For now, make sure that only the following boxes are checked: Current File and Whole File (under Data Source), As Displayed (under Pre-process data), Rate Constants (under Estimate).

Uncheck the ‘Use Variance’ box.

These parameters will insure that (1) the entire data file will be optimized; (2) the data would be taken as displayed in the Data Window and will not be further processed; (3) the optimization algorithm will estimate the Rate constants.

We cannot estimate the channel count if the ‘Use Variance’ box is unchecked. If channel count is known, you may use this option as it is faster. ‘Sum of Squares’ is used as the criterion for estimating the convergence in this case.

The ‘Use Variance’ box is checked when we need to estimate the number of channels in the data. LL criterion is used for estimating convergence in this case.

Several data sets can be used but the channel count must be known for each if they come from different patches.

Select Run mode as Optimize which ensures that Mac runs an optimization. Select Run to begin the optimization.

5. Outputs Displayed in the Report Window:

The Report window displays the calculations performed by Mac to optimize the data. When the optimization is complete, we would see the Log Likelihood and rate constant values in tabular form in the Report Window. The higher the LL value the better is the convergence of the algorithm. We may change the starting values of the rate constants in the Model window to facilitate faster and more accurate convergence.

To see how these values change during the optimization, use the vertical scroll bar on the report window. Note that the initial guesses for the rate constants have a limited range of possible values. If the true rate is outside this range, the optimization will not converge correctly. The program will stop automatically after a predetermined number of iterations (set in the Mac currents optimization window). Re-running the Mac optimization will reset the limit range for the rate constants, possibly allowing the optimization to converge correctly.

For all iterations, the gradient of the free parameters, constraint parameters and gradients of the rates are listed. Only the free parameter gradients need to be considered. It is an indication of how close the estimate is to the maximum. The value of the gradient should be as small as possible. Large values indicate that the algorithm may not have converged properly.

If you notice that the gradients are not changing, or that the rate constants have hit one of the range limits, stop and restart the re-optimization manually. To stop the optimization, the Task view window must be open. This is a floating window accessed by selecting Tasks from the View drop-down menu. With this window, you can stop any QuB function by pressing the Stop button. There is also a Stop Tasks button on the right side vertical bar in QuB, which can be used for the same purpose. But this stops all the tasks in QuB. Restart Mac by left clicking the Mac button on the Modeling toolbar.

6. Compare results with initial transition rates:

For the simulated data, the rate constants calculated by Mac should be close to the correct values. An example of the type of output you should see in the Report window and the model is given in the next topic.

Example model and results


Mac Example
Tutorial IV: Macroscopic Currents Optimization

C. Example Model

The activity starts in the closed state (colored Black). The initial probability of the closed state is set to 1. The initial values of the rates are 100 and 500 respectively. This model is used to simulate the data.

Right-Click Sim and select the Data tab. Set segment count to 1 and segment size to 10000 points. Select the Model tab and set channel count to 1000. In the Simulation tab, make sure Microscopic is selected. Click ‘simulate’ to get the data in the data window.

Now, right-click Mac button to get the ‘Macroscopic Currents Optimization’ Window. Set ‘Max. iter’ to 50. Check ‘show fitting curve’, ‘channel count’ and ‘use variance’. Set the ‘Initial Probabilities’ to ‘Fixed’. Click Run to start the Mac optimizer.

Different initial rate values should be tried to see whether the algorithm converges to the same rate. In this simulation, the ion channel count was 1000. A different channel count will give different model kinetics but the LL will be the same in every case when the algorithm converges if the Use Variance box is not checked in the Macroscopic Current Optimization window.

Results:

The data window shows the fitting curve for each iteration of Mac optimizer.

The results as given in the Report Window:

================================================================

MAC final results:  LL = -38880.4   Iterations = 10

Rates:

s1  s2   k0            k0.std      k1        k1.std

--------------------------------------------------

1    2    100.01     7.32328    0          0

2    1    481.98     11.584      0          0

--------------------------------------------------

Channel Count:

973   68.4587

Free pars grads: -5.4508185E-5 -5.6437693E-5 -6.6271806E-5

================================================================

973	68.4587	100.01	7.32328	481.98	11.584	  -38880.35413	  212

The estimated channel count is given and also its standard deviation.

The set of values at the end are:

(1) and (2)  Mean channel count and standard deviation

(3) and (4) & (5) and (6)  Mean and Standard deviation of the rates. These are same as those listed in the table above.

(7)  Log – Likelihood.

(8)  Minimum channel count.


Overview of MIP
Tutorial V : Maximum Idealized Point Likelihood Rate Estimation

A. Overview and Description of MIP

This tutorial will introduce you to the basic features of 'MIP' (Maximum Idealized Point Rate Estimation) and teach you how to directly estimate and optimize the kinetics of the model using Hidden Markov models. We use here the “MIP” component of QuB. Some examples would be provided at the end of this tutorial to acquaint you with this feature. MIP works for one channel at present and would be extended for multiple channel data in the future.

MIP is very much similar in operation to MIL, MPL, Mac and Stair. Click below to see introductions on related topics.

Overview on MIL

Overview on MPL

Overview on Mac

Overview on Stair

Next Page


Kinetic Analysis using MIP
Tutorial V : Maximum Idealized Point Likelihood Rate Estimation

B. Kinetic Analysis Using MIP

1. Begin MIP Session:

Simulate your data and idealize it using SKM or Half Amplitude method. A sample 2 class model is present by default in the Mod window. We can get rid of the Histogram window and keep just the Report window. So the simulated data file (*.ldt), the model builder window with a default two class model and the report window would be open.

To simulate the data, you use the Sim component of QuB. Select the 'Microscopic' button under the simulation tab. Under the data tab, select the segment count and size. Select Idealize Data and class as output. This will simulate and idealize the data and display both the simulated and idealized waveforms. Select a large segment count for a lower value of k0.std, the standard deviation of k0. Check to see if you get similar rates for different segment counts..

2. Open or create a model:

Use the same model designed to simulate the data.

3. Check the Class Parameters and Set Rate Constant Values:

MIP will default black to be class 0, red to class 1, etc. Remember that SKM has made the state with the smallest (or most negative) amplitude class 0, so you may have to change these default values. For your CO model, make sure that the amplitude for state 1 = 0 and make sure that the amplitude of state 2 = 1. Change the estimates for different optimization runs to see if they converge to the same rates. You may find that providing MIP with good starting values for each rate constant may facilitate convergence of the optimization.

4. Options in the MIP window:

Right click the MIP button on the Modeling toolbar. The Maximum Idealized Point Optimization window opens. There are several functions of this window that are described in the MIP window help under Tasks - Modeling.

For now, make sure that only the following boxes are checked: Current File and Whole File (under Data Source) and Optimize. These parameters will insure that (1) the entire data file will be optimized and (2) ensures that MIP runs an optimization. Make the Max. Power = 7. The higher the power, the faster is the execution. If MIP crashes, then lower the Max. Power value.

Select Run to begin the optimization.

5. Outputs Displayed in the Report Window:

The Report window displays the calculations performed by MIP to optimize the data. When the optimization is complete, we would see the Log Likelihood, the number of iterations taken by MIP, rate constant values and the standard deviation of the rates in tabular form in the Report Window. The higher the LL value the better is the convergence of the algorithm. We can suitably change the initial estimate for the rate constants in the Model window to facilitate faster and more accurate convergence.

The program will stop automatically after a predetermined number of iterations (set in the MIP currents optimization window

For all iterations, the gradient of the free parameters, constraint parameters and gradients of the rates are listed. Only the free parameter gradients need to be considered. It is an indication of how close the estimate is to the maximum. The value of the gradient should be as small as possible. Large values indicate that the algorithm may not have converged properly.

If you notice that the gradients are not changing, or that the rate constants are oscillating, stop and restart the re-optimization manually. To stop the optimization, the Task view window must be open. This is a floating window accessed by selecting Tasks from the View drop-down menu. With this window, you can stop any QuB function by pressing the Stop button. There is also a Stop Tasks button on the right side vertical bar in QuB, which can be used for the same purpose. But this button stops all the tasks running at that time. Restart MIP by left clicking the MIP button on the Modeling toolbar.

6. Compare results with initial transition rates:

For the simulated data, the rate constants calculated by MIP should be close to the correct values. An example of the type of output you should see in the Report window and the model is given in the next topic..

Example model and results


MIP Example
Tutorial V : Maximum Idealized Point Likelihood Rate Estimation

C. Example Model

The initial values of the rates are 100 and 1000 respectively. This model is used to simulate the data.

Right-Click Sim and select the Data tab. Set segment count to 1 and segment size to 10000 points. Select the Model tab and set channel count to 1. In the Simulation tab, make sure Microscopic is selected. Click ‘simulate’ to get the data in the data window.

Now, right-click MIP button to get the ‘Maximum Idealized Point Optimization’ Window. Set ‘Max. Power’ to 7. Set the ‘Initial Probabilities’ to ‘Fixed’. Click Run to start the MIP optimizer.

Different initial rate values should be tried to see whether the algorithm converges to the same rate.

Results:

The results as given in the Report Window are given below:

The results as given in the Report Window:

================================================================

MIP final results:  LL = -562.6442696   Iterations = 9,

Dwells = 457, Points = 10000, Multps. = 457

Rates:

s1  s2      k0      	 k0.std        k1         k1.std

-------------------------------------------------------------------

1    2    129.854   	17.5082       0         	0

2    1    1027.37   	141.342       0         	0

-------------------------------------------------------------------

Free pars grads: 0.00015277344 -0.00029156991

================================================================


FAQ's
FAQ’s


List of Commands


Hotkeys
Hotkeys & Shortcuts

Note:

Shortcuts for any window will work only if the window is selected. To do this, click on the title bar of the corresponding window and make sure the color of the bar changes to blue.

Shortcuts In Data Window

	KEYBOARD SHORTCUTS	EXPLANATION
1	CTRL + X	Cuts the selection of data
2	CTRL + SHIFT + X	Cuts the entire segment on which the cursor lies.
3	CTRL + C	Copies the selection of data
4	CTRL + SHIFT + C	Copies the entire segment on which the cursor lies.
5	CTRL + V	Pastes the selection of data
6	CTRL + SHIFT + V	Pastes the entire segment on which the cursor lies.
7	DELETE	Deletes the selection
8	SHIFT + DELETE	Deletes the segment on which the cursor lies
9	CTRL + E	Erases the selection and replaces it by the baseline.  Baseline has to be set prior to this operation.
10	CTRL + Z	Undoes the previous operations in the reverse order.
11	CTRL + ENTER	Breaks the segment at the cursor point.
12	P	Brings up the Properties Window of the data window.
13	CTRL + B	Sets the data selection as Baseline.
14	H	Expands the selection in the High-Resolution Window.
15	U	Un-expands the selection in the High-Resolution Window.
16	N	Adds a baseline node to the data selection.
17	L	Adds a new selection list.
18	S	Adds the current selection to the current list.
19	A	Selects the whole file. (all data points)
20	CTRL + ‘+’	Zooms in on data. This decreases the number of traces per page.
21	CTRL + ‘–’	Zooms out on data. This increases the number of traces per page.
22	‘–’	Zooms out data. This increases the number of points per trace.
23	‘+’	Zooms in data. This decreases the number of points per trace.
24	LEFT, RIGHT	Moves cursor one point to the right or left.
25	UP, DOWN	Moves cursor to the trace above or below.
26	CTRL + (LEFT, RIGHT)	Moves cursor (PointsPerTrace/100) points to the left or right.
27	HOME, END	Moves cursor to the beginning or end of the current segment.
28	CTRL + (HOME, END)	Moves cursor to the beginning or end of the file.
29	PG UP, PG DOWN	Moves the cursor one page up or down.
30	SHIFT + (24 - 29)	Extends the selection from the current cursor position
	MOUSE SHORTCUTS	EXPLANATION
1	LEFT CLICK	Moves the cursor to the clicked point. Removes the existing selection.
2	SHIFT+ LEFT CLICK	Moves the cursor to the clicked point and extends the existing selection.
3	RIGHT CLICK	Pops-up a menu with edit, copy, print, image, baseline and properties commands.
4	LEFT BTN PRESS & MOVE MOUSE	Extends the selection from the initial cursor position to wherever the mouse pointer is present currently.
5	SELECT THEN  CTRL+ LEFT BTN PRESS & MOVE MOUSE	Moves the same length of selection in ms to wherever the mouse pointer stops
6	DBL CLICK	Selects the current trace.
7	SHIFT+DBL CLICK	Selects the current segment.
8	CTRL+SHIFT+DBL CLICK	Selects the whole file; also done by A.
9	SCROLL BAR	Scrolls the display one trace up or down, when clicked on the arrows; OR one page up or down, when clicked between the thumbnail and the arrows; OR positions the current page when the thumbnail is moved and released at a new position. It doesn’t affect the selection or the cursor.
Shortcuts In Model Window

	MOUSE SHORTCUTS	EXPLANATION
1	LEFT CLICK IN WINDOW	Creates a new state of Class 1.
2	RIGHT CLICK IN WINDOW	Pops-up a menu with P equilibrium, cut, paste, copy, print, image, and properties commands.
3	POINTER OVER STATE	Selects the state.
4	DBL CLICK STATE	Changes the class in the increasing order.
5	RIGHT CLICK STATE	Pops-up menu with delete, grab and properties commands.
6	RIGHT CLICK STATE PANELS	Pops-up menu with delete conn. and properties commands.
	KEYBOARD SHORTCUTS	EXPLANATION
1	ARROW KEYS	Moves the selected state.
2	SHIFT + ARROW KEYS	Moves the entire model.


Nomenclatures

Class: a group of states with the same current properties (mean amplitude and noise variance), e.g. multiple closed states are a class

Constraint: a limit imposed on rate constants. Typically this means keeping a rate constant

(ko or b) fixed, making it proportional to another, or ensuring that loops are in equilibrium (detailed balance)

Dead time: the longest duration event that you allow to be missed (the program corrects for this)

Event: a current of consistent mean amplitude and variance

File: a series of segments

Frame: a buffer of data for display

Global fitting: simultaneously solving the kinetics of files obtained at different concentrations and/or voltages

Rate constant:  If concentration, C, varies across files, the program solves for k0 Similarly if voltage, V, varies across files, the program solves for b, which is typically given by

Segment: a data record described by constant model parameters

State: a conformation of the channel that usually lasts for a time longer than the response time of the recording system


LAYOUT OF THE ENTIRE QUB HELPFILE
LAYOUT OF QUBHELP

•	OVERVIEW OF QUB

•	About QuB

•	Credits

•	Copyright and Disclaimer

•	QUB INTERFACE

•	Overview

•	Interfaces

•	Overview

•	Acquisition Interface

•	Simulation Interface

•	Preprocessing Interface

•	Modeling Interface

•	Scripts Interface

•	Results Interface

•	Mac Interface

•	Windows

•	Overview

•	Data Window

♦	Overview

♦	Data File Formats and Reading Data Files

♦	Data window - Right Click Menu

♦	Properties Window – Overview

♦	Properties Window – Color

♦	Properties Window – Display

♦	Properties Window – Data

♦	Properties Window – Info

♦	Selections and Lists Panel

♦	Files and Results Panel

•	Data Notes Window

•	Model Window

♦	Overview

♦	Building a Model

♦	Setting Rate Constants In the Model

♦	Model Window - Right Click Menu

♦	Properties of Model Window

♦	State and Class Properties

•	Acquisition Input Window

♦	Overview

♦	Control Buttons

♦	ACQ Input : Oscilloscope Properties

•	Acquisition Output Window

♦	Overview

♦	Acquisition Output - Scripts

♦	Acquisition Output - Send

•	Report Window

♦	Overview

•	Scripts Window

♦	Overview

♦	Script Window - Control Buttons

♦	Commands For Waveform Generation

•	Python Scripts Window

♦	Overview of Python Scripts

•	Result Window

♦	Overview

♦	Explanation of Variable Terms

♦	Segments Tab

♦	Models Tab

♦	Histograms Tab

♦	Select & Criteria

♦	Word Reports

•	Tasks

•	Overview

•	Simulation

♦	Overview of Simulation Parameters

♦	Data

♦	Model

♦	Simulation

♦	Parameters

♦	Baseline

♦	Other Controls

•	Preprocessing

♦	Overview

♦	Chopping Data into Segments

♦	Chop Idealized Data(Chop Idl)

♦	Goto

♦	Applying Baseline

•	Overview

•	Data Source && Channel index

•	Data Processing

•	Adaptive Window

•	Linear Segments

•	Client/ Server

•	Other Controls

♦	Extracting Lists

•	Overview

•	Data Source

•	Data Processing

•	Output Format

•	Operation

•	Function

•	Other Options

•	Control Buttons

•	Modeling

♦	Overview

♦	Idealizing Data

•	Idl - Overview

•	Data Source && Channel Index

•	Data Processing

•	Client/Server

•	Idealization Method

•	Control Buttons

♦	MIL Optimization

•	Mil - Overview

•	Data Source

•	Parameters

•	Control Buttons

♦	Amplitude Estimation

•	Amp - Overview

•	Parameters

♦	MPL Model Optimization

•	MPL - Overview

•	Parameters

♦	Macroscopic Currents Optimization (Mac)

•	Mac - Overview

•	Data Source & Channel Index

•	Data Processing

•	Client/Server

•	Optimization Options

•	Estimate Options

♦	MIP Model Optimization

•	MIP - Overview

•	Data Source & Channel Index

•	Client/Server

•	Optimization Options

•	Estimate Options

♦	Idealize Data with Baseline Correction

•	IB - An Overview

•	Data Source & Channel Index

•	Data Processing

•	Idealization Options in IB

♦	Model Search Using MIL

•	MSRCH – An Overview

•	Model Search Parameters

•	List Operations

♦	Overview

♦	Adding List of Segments

♦	Adding List of Idealized Segments

♦	Adding and Deleting Selection Lists

♦	Adding and Deleting Selections

•	File Operations

♦	Overview

•	Menus

•	File Menu

♦	Opening Data

♦	Data for Input & Output Acquisition

♦	Data - Idealized, Closing, Saving

♦	Models - Opening, Saving, Closing

♦	Updating and Exiting

•	View Menu

♦	Overview

♦	Servers & Tasks

•	Interface Menu

♦	Overview

•	Options Menu

♦	Overview

♦	QuB Hardware Configuration

•	Actions Menu

♦	Overview

•	TUTORIALS

•	Tutorial I: Simulating Single Channel Data

•	Overview and Description of SIM

•	How To Build a Model

•	Building a Simple Model

•	Setting Simulation Parameters, Running a Simulation & Viewing the Data

•	Tutorial II: Idealization (Idl), Amplitude Estimation (Amp), and Kinetic Analysis (MIL)

•	Overview

•	Interval detection and amplitude estimation using SKM

•	Notes on Using SKM

•	Using Amplitude Estimator (Amp) & Kinetic Analysis using MIL

•	Example Model Sets

•	Tutorial III: Advanced Modeling

•	Overview

•	Constraints

•	Concentration and Voltage Series

•	Multiple conductance states and multi-channel records

•	Connectivity

•	Example Model Sets

•	Tutorial IV: Macroscopic Currents Optimization Mac)

•	Overview

•	Kinetic Analysis Using Mac

•	Example Models

•	Tutorial V: Maximum Likelihood Point Optimization MIP)

•	Overview

•	Kinetic Analysis Using MIP

•	Example Models

•	Tutorial VI: Model Merge (MM)

•	Overview Of Model Merge

•	How to Use Model Merge – An Exercise

•	Tutorial VII: Results Window

•	Overview of Results Window

•	Features of Result Window

•	Features of SELECT

•	Example Models

•	Tutorial VIII: Acquisition Protocols And Simulations

•	Overview Of Acquisition Interface Layout

•	Acquisition Channels

•	Acquisition Protocol Window

•	Applying Stimulation Protocol - Simulating Data using stimulus file

•	Examples

•	THEORY AND ALGORITHMS

•	Markov Process

•	Hidden Markov Process

•	Segmental k-means algorithm

•	SCRIPTING LANGUAGE

•	Kinetic Scripts

•	Purpose & Overview

•	Syntax, Structures & Commands

•	Scripts Window - Control Buttons

•	Example I : Pulse

•	Example I : Ramp

•	Python Scripts

•	APPENDIX

•	Nomenclatures

•	FAQ's

•	List of commands

•	Hotkeys and Shortcuts


Overview of Result Window (Tutorial)
Tutorial VII : RESULT WINDOW

REFINING SINGLE CHANNEL ANALYSIS WITH ‘SELECT

A. Overview of Result Window

The ‘Results’ window has three functions: (1) display ‘Amps’, ‘Idealize’, and ‘MIL’ output histograms; (2) allow the user to extract data to graphing programs such as Microsoft Excel or Origin; (3) allow the user to distinguish between segments of data based on parameters that can be quantified. These features, previously available in separate programs of the QuB suite, are now integrated into the QuB interface, eliminating the need to extract data numerous times during an analysis session. This section of the QuB workshop covers the main features of the results window, and provides examples of how these features can be used in single channel analysis.


Features of Result Window (Tutorial)
Tutorial VII : RESULT WINDOW

B. Features of the Result Window

‘Amps’, ‘Idealize’ (SKM/Half Amplitude), ‘Idl/Base’, and ‘MIL’ output information about segmented data to the results window for selection and analysis. No matter which analysis procedure is performed, you will see the following buttons and tabs in the window:

Buttons:

•	Reports:

This button is located on the top left corner of the Result window. It is used to create MS Word reports of the results of different tasks like SKM, MIL etc. Clicking this button gives a drop-down menu with 3 options:

•	Generate NEW word report format.

•	Select one of  the existing formats (previously created) for creating the report

•	Edit an existing word report format

Generate NEW word report format

This tab brings up the ‘Report’ window. Each option in the ‘Options’ list on the right-hand side maps to a section of the word report. To build a custom report, select the required options from the right and hit the  button to add them to the new list. The order in which the options are displayed in the report can be changed using the ? and ? buttons. Give a suitable name and click ‘Save’ to save the word report format. Hit ‘Run’ to generate the word report.

Select an existing format

The Report drop-down menu lists all the previously created formats. Click any one of them to create your word report.

Edit existing word report formats

Click ‘Edit Reports’ to bring up the ‘Edit Reports’ window. This window lists the existing word report formats. Select the report to edit and click ‘Edit’. This brings up the ‘Report’ window with selected options. Make the necessary changes and click ‘Save’.  You can also save the changes under a different name.

If you are not sure about the different options listed, select all of them and create a sample report. This would give you an idea of what the different options map to in the final report.

You can program new options for the reports in Python (for examples, look at the second half of WordReport.py)

Note: When adding options in a new report format, you cannot add more than one option at a time.

•	Pop up window:

Opens a pop-up window that can be enlarged or dragged freely over the QuB interface Any changes made in this window also affect the fixed ‘Results’ window.

Files box:

‘Results’ data is saved as a *.qrf (QuB Results File) file, and the open files are listed in this box. The file names are automatically derived from the analysis procedure run and the data file to which the analysis was applied. (For example, running MIL on the data file noname1 produces the *.qrf ‘MIL noname1’.)

Right-clicking in the ‘Files’ box will allow you to ‘Save’, ‘Rename’, or ‘Close’ the highlighted *.qrf, or open a saved *.qrf.

Note: You can use this box to navigate between data files over the course of an analysis, but *.qrf files are not saved automatically. If you would like to be able to reopen a *.qrf later, right-click on its name, and save it.

Tabs (described as they are displayed from right to left):

Histograms: Displays Amplitude (Idealize, Idl/Base) or Dwell Time (MIL) Histograms. This is the default tab open after a new idealization or optimization is performed. The ‘Results’ window therefore replaces the ‘Histogram’ window. Right-click in the chart for a series of options. You can extract the data contained in the chart either to a *.txt file, or directly to Microsoft Excel. You can also copy the image as it is displayed in QuB to be pasted into Microsoft Word, or similar programs. When ‘Components Visible’ is checked, the individual components of the pdf generated by MIL are displayed over the dwell-time histograms.

Models: (Shown after ‘Amps’ or ‘MIL’ is run.) Lists in table form the initial and final rate constants. These can be cut-and-pasted into graphing programs. Click the empty gray box in the upper left corner of the table to select all the cells. Use [Ctrl]+C to copy the information. To highlight a single row, click any cell in that row. To sort a single column (variable/parameters) in ascending or descending order, click the title bar for that column. Click ‘Final’ or ‘Initial’ to display that model in the ‘Model’ window.

Segments: Displays, in table form, data on various parameters output by SKM, MIL, etc. See the section on ‘Select’ below for definitions of each parameter. Data from this window can be cut-and-paste as in Microsoft Excel (i.e. select cells by holding down the right mouse button; [Ctrl]+C to copy).

Select: Allows the user to distinguish between segments of data based on several parameters, such Popen, Mean Closed/Open time, Amplitude, etc. This tab is absent if the number of segments is less than 2.

Criteria: Allows the user to select segments based on input values. See the section on ‘Select’ below for further information.


Features of SELECT (Tutorial)
Tutorial VII : RESULT WINDOW

C. Features of ‘SELECT’

Select is a powerful feature of QuB that allows the user to distinguish between segments (clusters) of heterogeneous data. Because this component of the QuB Suite is now a feature of the QuB interface, segments of data can be analyzed separately either within the raw data file, or after extraction into a new *.ldt or *.qdf file. Segments can be divided into groups by coloring them.

1.	In order to use ‘Select’, you must first idealize or optimize multiple segments or selections. (See the Preprocessing tutorial for information on segmenting data.)

2.	When you first open ‘Select’, no charts will be displayed. Click the ‘Show Var…’ box and select All. The parameter charts displayed are those output by the analysis procedure you ran (‘Idealize’, ‘Amps’, ‘Idl/Base’, ‘MIL’). You can close charts individually by clicking the ‘X’ box in the upper right corner of each, or you can select which charts are displayed in the ‘Show Var…’ box.

3.	Properties of the ‘Select’ Parameter Charts:

•	You can alter how each chart is displayed. Right click anywhere in the chart and a menu pops up with the following options:

a)	‘By Index’, ‘By Start Time’, ‘As Histogram’ alter the abscissa. ‘Index’ refers to the segment number. ‘Start Time’ refers to the segment start time in the original data file.

b)	‘Log Y Axis’ plots the ordinate on a log scale.

c)	‘Curve fitting…’ opens a dialogue box that allows you to apply several curve-fitting algorithms to the data.

d)	‘Copy Image’ allows you to paste the chart in other programs.

e)	‘Extract to Excel’ opens and extracts the data directly into Excel.

•	Each data point in the chart corresponds to a segment of data. The default color for selected segments is red. The deselect color is black. Right-clicking on a data point gives you the option to view the segment in the ‘Data’ window. (Note that the appropriate file must be selected in the ‘Data’ window.)

•	The lines on each chart correspond to the mean and standard deviation (SD) for each parameters. The SD lines are set by the ‘SDs’ box in the upper right corner. Move the dial or type in a value for the number of SDs you would like represented by the lines.

•	The simplest way to select segments is by hand. You can use the color tiles on the left to change the color of segments, or you can deselect segments by clicking on them with the same color.

4.	Advanced options for distinguishing between segments:

•	Clicking the ‘Select’ button opens a drop down menu with several options:

a)	‘All’ changes the color of all data points to the color selected on the left.

b)	‘None’ deselects all data points

c)	‘K Means’, ‘K Means x5’: Applies the k-means algorithm only for open charts. (‘K Means x5’ runs 5 iterations of the k-means algorithm.) K-Means classifies all the segments according to some examples. To use these, first open only the parameters that you want to consider in your data selection. Deselect all the data points (e.g., make all points black). For each group you'd like to distinguish, choose a color and select a few representative segments. Open the ‘Select’ drop-down menu and use ‘K Means x5’. Watch QuB separate data points based on the open parameter charts. Run ‘K Means x5’ until the charts no longer change.  K Means calculates the distribution of points for each color, then gives each point the color of the closest distribution.

d)	‘Trim’ deselects data points outside the SD lines only for open charts.

•	You can use the ‘Criteria’ tab to select (color) segments based on user-defined values.

1)	Select a parameter in the drop down menu on the left.

2)	A new drop down menu appears. Select the appropriate function (<, <=, >, >=).

3)	Input a value in the box on the right.

4)	Select a color at the bottom of the window.

5)	Click the ‘Change Color’ button. The ‘Select’ tab is automatically opened with the segments selected

•	Analyzing segments by color:

You can perform SELECT operations by right-clicking the color tabs on the left-hand-side of the results window. For extracting segments corresponding to a particular color, right-click on the color tab and select ‘Extract Segments’.

A ‘results’ file named ‘ABC file’, where ABC represents the name of the task performed (like MIL, SKM, MPL), is generated in the ‘Results’ column of the data window. Also, a selection list containing the corresponding segments is generated under ‘Lists’ column in the data window.

You can create a list of segments based on color instead of extracting segments to a file. Right-click the required color and select ‘New Selection List…’ Specify the name of the list in the pop-up window and click OK.

5.	Analyzing selected segments:

•	Once you have separated segments into different color data points, you can make a selection list for each color and then analyze each list separately. To make a selection list of k=just the 'red' segments, Right-Click the color 'red' on the left-hand side and choose 'New Selection List'.

•	To analyze this list, make sure it is chosen / highlighted in the data window. Then, simply check the ‘List’ box on the analysis toolbar (at the right of the QuB interface) and apply whatever analysis function you would like (i.e. Idealize, MIL, Extract, etc.).

6.	Definitions of ‘Select’ Parameters (listed in alphabetical order):

Note: These definitions are the same in the ‘Segments’ tab.

Idealization (SKM, Half Amplitude, Amps, Idl/Base):

Parameter	Definition
amp #	Mean amp for each conductance class (designated by #)
DwellCount	Total number of dwells in the segment (sum of all dwells of each conductance class)
Index	The number of the segment in the current data file
Length	Segment length
lifetime #	Mean dwell time for each conductance class (designated by #)
LL [Amps, Idl/Base]	The log likelihood of the data idealization
nevent #	Total number of events/dwells for each conductance class (designated by #)
occupancy #	Occupancy probability for each conductance class (designated by #)
sd #	The standard deviation of the mean amplitude for each conductance class (designated by #)
start	Start time in the original data file

Optimization (MIL):

Parameter	Definition
DwellCount	Total number of dwells in the segment (sum of all dwells of each conductance class)
Gradient #	One gradient estimate exists for each free parameter in the model. These should all be close to 0, or the model is not a good fit for the data.
Index	The number of the segment in the current data file
Initial LL	Log likelihood for the fit of the initial model to the data
Iterations	Number of MIL iterations run
LL	Log likelihood for the fit of the final model to the data
LL per event
start	Start time in the original data file


Tutorial VII : RESULT WINDOW

D. Exercise Models

The following models contain states that differ in single channel conductance, the SD of the amplitude, and closed/open dwell times. You can use these models to acquaint yourself with the ‘Results’ window, and specifically ‘Select’.

Simulate data using either model. The clusters of data will be the same, but model 1 is better for simulating segmented data, and model 2 can be used to simulate a long data file with clusters of activity. Model 2 provides more of a challenge, because you will have to separate the clusters yourself, either by eye, or with the ‘Chop Idl’ feature. Idealize the data using a 2-state, 2-class model. Then try to distinguish the different clusters of activity that you get using ‘Select’. Practice using some of the strategies mentioned above, especially the ‘K Means x5’ algorithm. Also try optimizing your selected data and create a MIL Word Report.

1.	Model 1 Parameters:

Class 1 Properties: pr0=0.5; amp=0; std=0.1

Class 3 (St 2) Properties: pr0=0; amp=2; std=0.2

Class 4 (St 4) Properties: pr0=0; amp=3; std=0.25

Simulation Parameters:

Sampling Rate: 	20,000 Hz

Segment count:	60

Segment size:	20,000

Number of Channels: 1

2.	Model 2 Parameters:

Class 1 Properties: amp=0; std=0.1

State 1 Properties: pr0=0.50

State 3 Properties: pr0=0.50

State 5 Properties: pr0=0

Class 3 (St 2) Properties: pr0=0; amp=2; std=0.2

Class 4 (St 4) Properties: pr0=0; amp=3; std=0.25

Simulation Parameters:

Sampling Rate: 	20,000 Hz

Segment count:	1

Segment size:	10,000,000

Number of Channels: 1


Overview of Model merge
Tutorial VI : MODEL MERGE

A. Overview and Description of Model Merge

This component of QuB is designed to deal with the kinetics of different channels that exist in the same patch. In principle, the kinetics of each channel can be solved separately. The more sub-states there are the better, but even aggregated states can be solved. Basically, the transition matrix is that of the patch rather than that of the channels. Model Merge combines the transition matrix of the individual channel models into the larger Cartesian product matrix. This model is then solved by either MIL or MPL, and then Model Merge un-combines the product matrix to give you back the individual matrices with the solved rates.


Using Model Merge
Tutorial VI : MODEL MERGE

B. How To Use Model Merge – An Exercise

The simplest case is that of having two, two-state channels in a patch. As an example, we’ll take two channels, C(1) – O(2), with k12 = 100 and k21 = 500 s-1 for one and k12 = 1000 s-1    and

k21 = 5000 s-1 for the other. In Model Merge (the program icon is MM) we will add the first model.

1.	QuB automatically creates a default two state model when started. The rates are the default values set in Rate Properties Window. A model can also be brought in from a pre-existing file using the Open Model tab in File menu. With noname1.mdl loaded we will modify the rates to 100 s-1 and 500 s-1.

2.	Now we will add the other model (“noname2.mdl”) by pressing New Model from File Menu and a new default model appears. We now have two model pages. In this model we will change the rates to 1000 s-1 and 5000 s-1 as above.

3.	We now click the “mmerge” button from the modeling toolbar located at the right border of QuB, to get the “Model Merge Properties” Window. Select the two models to be combined and hit OK to create the two-channel. In the right panel we see the combined model, ‘noname3.mdl’, a square model with three conductance states: a closed state, two open states of 1pA, and one of 2pA.

The difference between this model and a general model with the same number of states is that not all rates are free, there are many constraints since only one channel can change state at a given time. If you put the cursor in the combined model window and click the right mouse button you can see the list of constraints. Model Merge creates this list for you. (Note: by relaxing the constraints, you can model the influence of one channel on another since they are no longer independent. This requires careful thought in more complicated models.)

4.	Now save the combined model by pressing File, Save Model As tab. The corresponding model should be highlighted in the right panel of the model window.

5.	This combined model file can now be used with any of the model-based programs. As an example, we will simulate data using the original model files noname1 and noname2.

6.	First save all the model files. You may wish to rename or overwrite files at this point.

7.	Start QuB and open “noname1.mdl” using the following commands: File, Open Model, and select “noname1.mdl”.

8.	Add the second model by pressing: File, Open Model, and select “noname2.mdl”.

9.	Go to the ‘Model’ panel in the ‘Simulate’ window, and select both “noname1.mdl” and “noname2.mdl”. Do this by holding down the Shift key as you click on the model names. Now Sim will use all the selected models to simulate data.

10.	In the ‘Data’ tab set the following simulation parameters: 10 segments of 100,000 data points each.

11.	Click Simulate and then OK.

12.	Open a new model and idealize this data using SKM. Open data file l. For simplicity you can use a linear three state model for detection, or if you want, use the “noname3.mdl”.

13.	Use MIL to evaluate the rate constants of the combined model, using the model generated by Model Merge (“noname3.mdl”). If this model is not already open, open it now.

14.	When MIL finishes, save the optimized model by using File, Save Model As, and name the model file, for example, “noname3fit.mdl”.

15.	Right-click the optimized model name in the right panel of model window and select ‘Uncombine’. The model is now returned to its original combination of two 2-state models. The original models now appear in the left window with one model having rates of 95 and 514 (as opposed to 100 and 500 for the simulated data) and 1066 and 4789 (as opposed to 1000 and 5000 for the simulated data).

16.	The relevant errors in the rates can be found by returning to MIL and finding the relevant rates with their errors. It is possible to make extremely complex combinations of channel activity such as 2 channels of type 1, 4 channels of type 2, 3 channels of type 3, etc. The resulting combined models may be very complicated and we do not know the limits of recovery of the initial data. We recommend using Sim and MIL to explore the reliability of inverting more complicated models since we do not know the reliability in the general case. There may be many models of equal complexity that will explain a given data set.

You have now completed the Model Merge Tutorial.

Additional Features

•	Integrated model merge (right-click a merged model to un-merge)

•	UnMerge preserves class colors


Overview of Acquisition Interface Layout(TutorialVIII)
Tutorial VIII : ACQUISITION PROTOCOL AND STIMULATIONS

A. Overview of Acquisition Interface Layout

The QuB Acquisition Interface consists of the Acquisition Input window, Acquisition Output window, Data window and the Acquisition Protocol window. This tutorial will cover the main features of the Acquisition Protocol Window and will walk you through the steps to create basic shapes like pulses, waveforms etc. using the window and apply them as stimulus to the data.

When the Acquisition interface is first opened, there will be three warnings highlighted in green at the bottom of the ACQ Input and ACQ Output windows.

1.	Acquisition device not assigned

2.	No acquisition channels are assigned.

3.	Data file not assigned for recording.

Each warning line, also explains in brief what should be done in order to rectify that problem.

To assign an acquisition device, go to Options --> Acquisition Hardware on the top menu; the ‘QuB Hardware Configuration’ window pops-up. The ‘QuB Configured Hardware’ table shows the hardware already configured by QuB. To setup a new hardware with QuB, click ‘Search’ in the ‘New Hardware Setup’ section. QuB searches for new acquisition hardware (not configured with QuB) like Soundcard, National Instruments board etc. and displays them in the list on the right-hand corner of the ‘QuB Hardware Configuration’ window. Click on the required hardware and hit Setup to configure it with QuB.

The ‘QuB Configured Hardware’ table then shows the configured hardware entry. Select the required device and click Edit to set the range and resolution values. For ‘Range’, if you check Bipolar values (+/-) and set a value of 2, then the range for reading or writing data from that device is -1 to +1.

For more information on hardware setup, refer QuB Hardware Configuration under Options Menu Help.

Next –  B. Acquisition Channels

C. Acquisition Protocol Window

D. Applying Stimulation Protocol – Simulating Data using stimulus file

E. Examples


Acquisition Channels (TutorialVIII)
Tutorial VIII : ACQUISITION PROTOCOL AND STIMULATIONS

B. Acquisition Channels

When any hardware is configured, QuB automatically creates two Analog Input and two Analog Output channels associated with the hardware. The settings for these channels can be accessed using the third tab in the ‘QuB Hardware Configuration’ window. This tab is also accessible from Options --> Acquisition Channels.

The default names for the channels created are a combination of two letter acronyms. The first 2 letters denote the hardware; SC – soundcard and NI – National Instruments card etc. The next 2 letters denote the channel type; AI – Analog Input, AO – Analog Output, DI – Digital Input and DO – Digital Output. The next character in the channel name is the channel count (for a particular type of channel); the numbering starts from 0. So SC AI 0 means the first analog input channel associated with the soundcard. The default units are Volts.

You can rename the channel and change other parameters as per the requirement. To change parameters for a channel, click its name to select it and then hit Edit to edit the parameters.

Refer Channels Configure under the Options Menu Help for detailed explanation of the channel parameters.

The scaling value should be carefully chosen and can be calculated as follows. For data stored as integers:

•	A/D Scaling = 2^bits / range (V);

bits --> is the resolution value of the input device

range --> range value of the input device (See previous topic)

•	x (V)     = integar val / A/D Scaling

•	y (Units) = x (V) / Scaling

Edit these values in Data Window, Properties -> Data. If you have more than one channel, then assign a different channel count (‘Channel Number’) to each of them.

Click on ‘Channels’ in the Acquisition Output window.  In the window that pops-up, select the Analog Output tab. Select the ACQ channel to write to from the list of available ACQ channels and add it using <==. Close the pop-up window.

Next, open a new file for recording from File --> New Data for Output Acquisition. You can also open a new or existing file from the Acquisition Output window --> Data. Make sure the file format of the new data file for output acquisition is QDF and the AD Channel count is 1. This channel is used for providing the stimulus protocol.

Next


Acquisition Protocol Window (TutorialVIII)
Tutorial VIII : ACQUISITION PROTOCOL AND STIMULATIONS

C. ACQUISITION PROTOCOL WINDOW

This window is used for creating a stimulation protocol for applying to data file. To create a protocol file follow these steps:

1.	Open a new protocol file by clicking the ‘create new protocol file’ button on the top left corner of the window. To rename the file, click the 3rd button from the left ‘Save Protocol File’ and rename and save the file in the desired location.

2.	Click and Drag any of the shapes [image] Hold [image] Ramp [image] Step [image] Sine or ‘Custom’ into the protocol area.

3.	The number of D/A channels for providing stimulus can be set accordingly. The maximum value is 16. For our case, let this number be 1.

4.	The properties of a shape are given at the left hand side of the window. To modify the properties, simply select the desired shape. The selected shape is highlighted in RED color and the others are in BLUE. Change the desired parameter values in the table on the left hand side.

Reference: Acquisition Protocol Window

5.	A set of shapes together form a stage. Insert any number of stages by right clicking the ‘stages column’ and selecting ‘Insert/Add Stage’. When applying a stimulus protocol file with more than one stage to data file, the stages are applied in sequence, one after the other.

6.	Specify the number of times a stage is repeated using ‘Repeat Stage’.

7.	‘Pause Before stage’ specifies the number of seconds to pause before applying a stage. We can also choose to wait indefinitely before applying a stage, which returns the control to the user to continue when required.

8.	Click the button on the top right hand corner of the ACQ Protocol window to generate the stimulation protocol output. . QuB requires sampled data as a stimulus for output. This button generates the sampled data required.

9.	The generated stimulus protocol data appears in the data window in the data file selected for output acquisition.

A pictorial layout of the Acquisition protocol Window

Next


Applying the Stimulation Protocol to Data(TutorialVIII)
Tutorial VIII : ACQUISITION PROTOCOL AND STIMULATIONS

D. Applying Stimulation Protocol – Simulating Data using stimulus file

1.	Right-click ‘SIM’ [image] under Simulation menu on the right hand side of the QuB interface. The ‘Simulate’ window that pops-up.

2.	Under the Data tab, check ‘New Data File’. Make sure the data segment size is long enough to accommodate the entire stimulus protocol duration. We can have a longer data file, but it will be truncated to the length of the stimulus. It is safe to generate a long data file so that the stimulus is never greater than the data file. If there are more than 1 segments in the data file, the stimulus generated is applied to each segment.

3.	Under the Model tab, make sure the channel count is set to 1 and that the required model is selected. The corresponding parameters for that particular model appear on the right side column.

4.	Under the Simulation tab, select the stimulation file. (The file to which the stimulation protocol was generated to). Check ‘File’ option under Stimulation. Check the ‘Microscopic’ response option.

5.	Hit ‘Simulate’. A new data file window pops up. Change the AD Channel count to 2: one for the stimulus protocol and one for the data response. (For N acquisition channels, we have N+1 AD channel count). Make sure the file format is set as QDF. Change the filename as required.

6.	The data window shows the new file with the stimulation protocol applied to the simulated data.


Examples using Acquisition Protocol Window (TutorialVIII)
Tutorial VIII : ACQUISITION PROTOCOL AND STIMULATIONS

E. EXAMPLES

Example 1: A dose response curve using a simple model

At various steps throughout this example, the files used to generate this data are available in the QuB directory. The file names are listed in bold where applicable.

Most of the Stimulation protocol and model building were performed in the ‘Sim’ interface, but all operations can be performed in any interface.

1.	Assemble the following model (Refer Model1.mdl in QuB Directory):

Make sure to set rates 12 and 24 as ligand-dependent (denoted p), and set the starting probability (pr0) of state 1 as 1.

2.	Open the ‘Acquisition Protocol’ window. Click the ‘Create New Protocol’ icon to open a new file. Drag the ‘Step’ icon [image] onto the gray (empty) stage in the Acquisition Protocol window. The ‘Step’ shape will be shown, enlarged, with a red background. (Note: If the protocol is made up more than one element, the red background designates any elements that are selected (active). A stimulation protocol file consists of one or more stages and each stage consists of one or more shapes referred to as ‘Elements’ of a stage.)

3.	To the left-hand-side of the protocol window, note the table of editable parameters. For this example, most of the defaults will be used, but make the following changes:

Shape:	Step

Pre Amp:	0

Pre Duration:	0.25

Amp:	0.05

Amp Incr:	0.25

Duration:	0.5

Post Amp:	0

Post Duration:	0.245

The other values of ‘Incr’ and ‘Factor’ are left as default i.e. 0 and 1 respectively.

4.	Under ‘Repeat Stage’ select the dialogue box and enter 40 (Refer Protocol1.qpf in QuB Directory).

5.	Under ‘File’, open ‘New Data for Output Acquisition…’ In the ‘New data file’ window, select a file name and location, choose ‘QDF’ as the file name and make sure 1 is in the ‘A/D Channel count’ box. In this example, ‘A/D Data size’ was set to 2, ‘Sampling’ was set to 20, and ‘Scaling’ was set to 81.92. In this example, the Scaling should not matter, because the ‘Amp’ and ‘Amp Incr’ values are very small. If these numbers are large, clipping of the stimulus trace may occur in the Output data file. If this occurs the affected stimuli will appear negative.

6.	In the ‘Acquisition Protocol’ window, click the ‘Generate data for output acquisition’ button (in the upper right corner). This will generate a series of segments representing the acquisition protocol. You will see a series of steps of increasing amplitude in the ‘Data’ window (Refer Output1.qdf in QuB Directory).

7.	Right click ‘Simulate’/’SIM’ [image] on the right border toolbar to open the ‘Simulate’ dialogue box.

a.	Under the ‘Data’ tab, set ‘Segment count’ to 1 and ‘Segment size’ to a value large enough to cover the entire Acquisition Protocol. (Here, 1,000,000,000 was arbitrarily chosen.)

b.	Under the ‘Model’ tab, choose the correct model, and set the ‘Channel count.’ If you would like to simulate single channel data, set this value to 1, if you would like to simulate macroscopic currents, set this value between 100 and 1000.

c.	Under the ‘Simulation’ tab, check ‘File’ under ‘Stimulation,’ and choose the appropriate file from the browser window to the right. (You can choose from any open data file.) Under ‘Response,’ ‘Microscopic’ must be selected if you are generating single channel currents, either choice can be selected if you are generating macroscopic currents.

8.	Click ‘Simulate.’

9.	In the ‘New data file’ box, switch the ‘A/D Channel count’ value to 2 – one for the stimulus and one for the response.

10.	Whether you modeled a single channel or multiple channels, you will notice that channel activity increases with concentration (Refer Data1.qdf in QuB Directory). You can analyze this file by chopping the data so that only areas activated by an agonist pulse are selected, and then running SKM to see that the open probability increases with concentration.

Example 2: Using multiple stages and multiple protocol elements.

1.	Build make the following changes to the model in Example 1 (Refer Model2.mdl):

The binding rates have been changed so that small Amp values can be set in the Acquisition Protocol.

2.	As in Example 1, create a ‘Step’ protocol with the following parameter values, or open Protocol 1 and change the following parameters:

Shape:	Step

Pre Amp:	0

Pre Duration:	0.25

Amp:	2

Amp Incr:	0

Duration:	0.5

Post Amp:	0

Post Duration:	10

Do not repeat this protocol. Leave other values as default.

3.	Now drag the ‘Hold’ element [image] onto the stage and place it after the step element. Set the following parameters:

Shape:	Hold

Duration:	1

Amp:	0.01

Amp Incr:	0

Leave other values as default.

Note: On a given stage, active elements have a red background. Inactive elements have a blue background. Multiple elements can be selected by holding down the ‘Shift’ key and selecting them. Parameter values can only be changed for active elements; for a group of elements, the common parameters can be changed simultaneously.

4.	Right click in the ‘Stages’ box and select ‘Add stage’ from the pop-up menu. This will add an empty stage after the highlighted stage. ‘Insert stage’ adds an empty stage before the highlighted stage.

5.	Drag the ‘Step’ shape [image] onto the stage and set the following parameters:

Shape:	Step

Pre Amp:	0

Pre Duration:	0

Amp:	2

Amp Incr:	0

Duration:	0.005

Post Amp:	0

Post Duration:	0.005

Repeat stage: 30 times

Refer File Protocol2.qpf in QuB Directory

6.	Open a new output file and load the acquisition protocol as in Example 1 (Refer Output2.qdf in QuB Directory).

7.	Simulate macroscopic data as described in Example 1. For a macroscopic current record, set the ‘Channel count’ to 1000, under the ‘Model’ tab in the ‘Simulate’ window (Refer Data2.qdf in QuB Directory).

8.	In this data file, notice:

a.	A large stimulus activates a large current that decays due to the additional closed states added to the model.

b.	Single channel openings are seen even in the absence of stimulus, b/c the channel can briefly reactivate after leaving either of the long closed states.

c.	A small stimulus activates the receptor without any apparent current decay.

d.	Entry into the added closed states decreases the max response to the same large stimulus that was applied at the beginning of the simulation.