Newsletters and other emails

2011/4/6 Newsletter

I have just noticed a bug in the last version of TaroAnalysis and uploaded a corrected version (v110405) to members' site.

The bug - "Load results" causes an error message when it trys to load an old detection results that was made in v100624 or earlier - has been fixed.

By the way, I have uploaded a list of past newsletters and email exchanges (no personal information) to the members' site. I hope this will be some help.

2011/3/7 Newsletter

I have uploaded a new version of TaroAnalysis (v110307) to member's site.

Bug fix:

1. An important bug was found in the cross-correlation analysis that had been added in the previous update (1 December). It had a problem that some events were not included in the analysis and the final correlogram was only partial, although the loss was small if the event numbers of two channels were similar. This problem was corrected in the current version. I’m sorry if you have been affected. Please contact me if you have any query.

New features:

2. In the "Load results" panel, a checkbox “merge results” is added. This is useful when you want to merge two different detection results from the same set of traces, for example EPSCs and IPSCs, into a single detection result.

3. The main event detection window and the cut-out widow are now “linked”, which means that a high-lighted trace in the cut-out window is automatically focused in the main event detection window, and vice versa. Furthermore, a trace in the cut-out window can be high-lighted by a single click on that trace, and hence this event is focused in the main window, too. Caveat: Igor gets very slow when it draws or re-draws a graph that contains many traces. Since the cut-out window often contains many traces, you may want to close it when it is not necessary.

4. A small yellowish button “Refresh” is added in the cut-out window. When the cut-out window is already present, a manipulation from the main panel (masking, deletion, unmasking) is reflected only when this “Refresh” button is clicked.

Explanation on existing functions:

5. Some people have asked me if it is possible to use a wave form, not only a threshold, to detect events. I don’t have a plan to give a change to the detection algorithm for now, but it is already possible to use waveforms of events to mask the events. For example, when you want to separate simple spikes (SS) from complex spikes (CS) in Purkinje cell recordings. First, detect all SS and CS and do “Event cut out”. Move green cursors in the cut-out window to the place of one of spikelets of CS, then click “Cursor measure” button. This will show up a table about the measured region, for your attention. In this case, the wave CutMaxValXXXX would be useful because its values must be large (for example, >10) for CS but nearly zero for SS. Go to the main event detection window and click the “Conditional mask” button. The “Conditional mask” panel will open. There are bunch of criteria but this time you can just set: “If value of wave: CutMaxValXXXX is larger than 10”. Click OK. Now CS are masked and ready to be deleted. Click the “Refresh” button of the cut-out window and you can check overlaid traces by eye. This is just an example and other waveform-related values can be used to mask events.

2011/3/1

>What method do you use to calculate the weighted decay of events in 'Event Cutout'? Also, in the decay output wave I presume Tau1 is the slow portion of the decay and Tau2 is the fast decay?

I presumed that one was fast and the other was slow time constant but I just found this is not the case. The fact is that the component that has larger peak amplitude is for Tau2 & A2 and the other component is for Tau1 & A1. Anyhow, these values are readout of Igor's native curve fitting function, which you can do manually from Analysis menu>Curve fitting. The double exponential fitting returns values; y0, A1, invTau1, A2, invTau2, and my program just gives Tau1 =1/invTau1, Tau2 =1/invTau2, and TauM= (Tau1*A1 + Tau2*A2)/(A1+A2).

Now I think we need TauFast and TauSlow instead of/in addition to Tau1 and Tau2. I'll add this in the future.

2010/12/1 Newsletter2

A bug in SelectWaves>Graph (a graph window does not open properly in some conditions) has been fixed.

Please download the latest version of TaroAnalysis, "v101201b".

2010/12/1 Newsletter

A new version of two files (TaroAnalysis_v101201 and TaroMenuControl_v101201) have been uploaded to the member's site.

1. Cross correlation analysis is added under TaroTools>More tools.

2. Half-width is measured, in addition to amplitude and rise time, in the event detection panel. Half-width histograms can be made in FurtherAnalysis.

3. "Smoothing", a new type of gross baseline (yellow line) is added in "More setting" of event detection parameters. This may be useful in recordings where baseline is not stable.

4. Short cut keys Ctr+7 and Ctrl+8 are added to scroll the graph to the left and right, respectively, in the event detection panel. Let me know if this interferes with existing short cuts in your environment (for example, with NeuroMatic).

5. Some trivial changes in appearances.

2010/10/2

>In TaroTools, how do you calculate instantaneous frequency? It's just that when we compare the mean trend of inter-event intervals (ms) it does not compare well to the instantaneous frequency trend, which I thought should be similar?

If there are 3 events, for which the first interval is 5 ms and the second interval is 20 ms, then the mean inter-event interval is 12.5 ms and the mean instantaneous frequency is 125 Hz (= mean of 200 Hz and 50 Hz).

The mean instantaneous frequency (plotted in "instantaneous frequency trend") tends to be dragged by a small number of events that occurred at very high instantaneous frequency. So I don't recommend using this plot as a routine, although it may be useful for some specific purposes. I often make a PSTH divided by bin size and by trace number because this shows frequency (= event number / bin time) in each bin.

2010/7/28

>I'm just wondering whether there's a built-in option in Taro's tool to calculate the area under current curve (i.e. total charges)? I was trying to calculate the total charges of the evoked responses within a fixed time window...

There are two ways, which will give the same result.

Both ways are under "SelectWaves".

1) Select the waves that you want to analyse, and press "Graph" button. (Before going for "Graph", you may want to make copies of the trace waves. See below.) A graph panel will appear. Check the "cursor" check-box. You will see more buttons appear at the bottom of the graph window. I think you want to adjust the baseline to zero before measuring the area. So move the cursors to the baseline region and press "adjust baseline". (An alert will appear because this procedure will overwrite the trace wave. If you want to preserve the original waves, you should make copies of waves, using "Rename, Duplicate" under "SelectWaves" before doing "Graph".) Then move the cursors to the region where you want to measure the area, then press the "measure" button. You can get result as waves or text in the command window. (This "measure" gives not only

area but also other values, including max and average.)

2) Essentially the same as 1). But if you don't need to see the graphs, you can use "Adjust baseline" and "Measure area" buttons, which are directly under "SelectWaves".

To make copies of waves in "Rename, Duplicate", you would add postfix "_copy" (for example) and check-on "Duplicate waves".

2010/6/26

> I have a question about the "Smooth 1" and "Smooth 2" in the Event Detection Window. What are they exactly?

Actual internal command is:

Smooth/B smooth1, wave

where smooth1 is the value set as "Smooth 1" and wave is the data trace.

The same filtering can be done from the menu Analysis -> Smooth..., where you can choose "box" and set smooth1 for "points:". This is called boxcar filtering, which is (in my understanding) basically same as moving average. See help of Igor for more detail.

2010/6/24 Newsletter

A critical bug has been found and fixed.

Please download and use a fixed version TaroAnalysis_v100624

The bug was introduced when I added a new feature: "Save only non-masked events"in the "Save Result". After executing this option, masking selection might be changed or lost because of the bug. I'm sorry if you have been already affected by this bug and I'll be happy to help you recover from the problem.

By the way, I added + and - buttons near the slider of zoom magnification. These buttons increment or decrement the zoommagnification by 0.5.

2010/6/21

> What is the quickest or correct method for importing a .abf file into TaroTools and then analysing the same file in Neuromatic?

If you want to use both TaroTools and Neuromatic, I think you should import abf files using Neuromatic because Neuromatic has its own unique way in dealing waves and making folders. Then you can use TaroTools when you want.

As I explained before, TaroTools can deal with waves only within the current data folder. So you may have to select the folder that contains data waves.

Other things you should note are:

1) In TaroTools, the x-scaling of data waves must be in [ms]. I hope Neuromatic has the same scaling. But, if it is different, you have to re-scale waves before loading them into Event detection. For re-scaling, "Scale waves" in "SelectWaves" may be useful.

2) TaroTools do not care y-scaling. It's you who have to remember if it is mV or pA or else.

3) I do not guarantee that the file import of Neuromatic should work properly. Actually I experienced a bug that made the y-scaling of data waves shrunk to about a half of the real size. That was why I made TaroABF and made myself Neuromatic-free. Be careful.

4) Neuromatic may have a function that can import data waves that have been imported by TaroABF or other generic waves, but I don't know how to do it.

2008/10/16

> I'm having a look at the new feature of your program and have a question. When the program selects a double event and displays the green line. Is this line supposed to show when the decay will return to baseline eg the height of the start of the previous event and will then calculate the area under this green line. Or is this just an indication of the trajectory of the decay and in actual fact it will calculate the area similar to the way it does for single events?

For a double event, the green line is supposed to go back to the baseline. This green line ends at 5 x Tau from the onset and the area is measured using this green line. If you often see a situation that a green line does not return to the baseline, that means your Tau setting is too short.

For a triple or more event, it's different. The green line of the first event cannot go beyond the onset of the third event (just for a graphing reason) but the area under the third event is actually considered in the measurement of the first event. I know this may be confusing but I'll need some effort to change it.

The important thing is that the area is always (single, double, triple or more events) measured in a window of 5 x Tau ms from the onset.

If your y axis is pA, the unit of area is pA*ms.

>Why the area values of some events are 0?

Basically, when the area value is 0, it is actually a minus value in a raw measurement but the program corrects it to 0 because a minus value is too odd. It became minus because the area above the baseline is bigger than the area below the baseline for the period of 5xtau (I'm talking about the cases of EPSCs, i.e. downward events, i.e. when the "Threshold" setting is minus). This happens when the decay phase of an event overshoots over the base line (the height of the onset). This may happen for small events on a noisy baseline. So I would try (1) use a shorter tau, not a longer one, because a long tau tends to catch a noise after the actual end of an event. (2) adjust the onset point of the event so that the decay doesn't overshoot it.

2008/10/14

It wasn't easy to extract charge (area) of each event and I know this version is far from perfect. Basically, area is measured only when you check on "Decay subtraction" check box near the parameter settings and you have to enter "Tau (ms)" values. This should be a rough guess of mean decay time constant of events. (don't need to be accurate) . This value is used for several purpose in the internal process. Most importantly, area of each event is measured in the time window of 5 x Tau (ms), starting from the onset of the event. Another important use is that events are recognized as being close each other (thus requiring a subtraction) when their interval is shorter than 5 x Tau (ms). I hope you can forget these criteria. But please remember that you have to play around this value a little bit. If you set this value too short, the area cannot be measured properly. But if it's too long, it causes even more problems - some errors that make area value zero. The default is 2.5 ms.

When you activate "Decay subtraction", overlapping events, which need subtraction, will have green exponential curves superimposed. So you can see how the subtraction is applied. It is very important that the onset (base point) of each event is placed properly. For some events, you will have to adjust it using cursors.

The area value of the selected event is shown at the right bottom of the window (near rise times). In case of error (when area =0), the value box turns red. You can use "Check error" button to find such events. (See "help" for details of this button.)

All the area values are "saved" along with all other values when you do "Save results" (only when "Decay subtraction" is active).

In "Further analysis", "Area trend" is the plot you wanted (if I'm correct). A two-dimensional wave AreaTrendMxYYYY will have all area values separated into columns that correspond to bins.

2008/10/7

> Is it possible to add a mark on the original traces the first and last event of each burst?

Now this can be done from "BurstMarking". You have to open the original traces (or keep them open) in the event detection window before using this function.

> Can I cut out the bursts?

Now this is done automatically when you do BurstTransform. More importantly, those cut-out traces can be loaded to the event detection window by simply selecting them from the Load Results button.

2008/10/4

"More statistics..." is added under TaroTools menu. This can do t-test, KS test and Mann-Whitney test.

In Graph tools section

"Graph size -fix"-- Set the graph width and height as they look, when they are actually auto.

"Graph size -auto"-- Set graph width and height auto

"Scale window size"-- Scale any widow. (In case of graphs, width and height have to be auto.)

2008/9/19

In "conditional mask", you can mask bursts of maximum interval XX ms with more than XX events. Click OK button once. Then open "conditional mask" panel again, and then click "invert mask". You will see only long bursts are selected.

2008/9/18

This time of update is special in sense that I improved the event detection algorithm core. I believe that the program has become more flexible and powerful. But all the previous features are kept as the default settings, so you can use the program in the same way as before.

I did this revision because I realised that the detection didn't work in current-clamp traces as nicely as in voltage-clamp traces. This was because the current clamp traces are smoother but have more overlapping events. So I introduced a new detection parameter "Valley (%)" to make the algorithm more flexible. Actually this parameter existed before but it was internally fixed at 80%. So the default is 80% in the new version, in "more settings". It is complicated to explain what this value is. But, briefly saying, when an event is detected, the search of next event starts from the point where the trace decayed to Valley% of the preceding peak. Please ask me details. I still believe 80% is a good value for most of voltage-clamp traces but you may want to crank it up to 95% for current-clamp traces. Please see the attached examples.

2008/6/25

1. As you know, the conventional way of measuring event amplitude is tend to be an under-measurement when an event rides on the decay phase of the preceding event. To measure accurately, we have to extrapolate the decay curve of the preceding event and use this extrapolation curve as a baseline for the following event. Now this can be done automatically when you check the checkbox “Decay subtraction” in the main panel. You have to set the value “Tau (ms)”, which should be a rough estimation of the mean decay time constant. This “Tau” value will be used as described bellow. Another value “Peak (%)” should be 100 unless you have a special requirement. You will see green lines on the decay phase of events for which a correction is applied.

Basically, this type of error becomes larger when the decay time is faster and the inter-event interval (IEI) shorter. In other words, a correction is necessary only when IEI is short in relation to the decay time constant. The criterion I set is that a correction is applied only when IEI is shorter than twice of the “Tau” value you set.

Anyway, please note that the error is not very big in general. In many cases, you don’t have to be bothered by using this correction. If you feel this correction may introduce another error, please don’t use. Feel free to ask me details, but some more notes are here:

*The curve fitting is not a real fitting by the least square methods but it just uses a single exponential curve that starts at the middle of decay phase and go though the onset point of the following event. This works reasonably well as far as I tested.

*The amplitude is measured as the height between the right end point of the green curve and the peak of the event.

*When “Decay subtraction” is on, the corrected amplitudes are stored instead of the amplitudes by the conventional measurement. You cannot save both of the corrected and the non-corrected amplitude.

*You will see the decay time constant of each green curve at the right bottom of the main panel (somewhere near the rise time display) when the event is selected.

*Basically, the decay time constant for each event is calculated and set, independently from the “Tau” that you set. But here comes another rule (that I made) that the decay time constant for each event cannot be smaller than 1/5 of the “Tau” value and cannot be bigger than 5 times of the “Tau” value. This rule was made in order to avoid crazy values that may occur.

*The curve fitting is depending on the event onset times and the event peak times of related events. In case of burst events, the event onset of the first event affects the fittings for all following events in the burst. So you have to carefully set the cursors to make this correction work properly.

*For “Peak (%)”, I don’t know if you and I will have a chance to use a value other than 100, but this is a setting for a future flexibility. If you set this 110, for example, the green curve starts from the point 10% larger than the real peak value. I just thought we may need this kind of correction when the peak is very sharp or rounded.

*You can switch on and off the “Decay subtraction” anytime you want. The change will be immediately reflected in amplitude values.

*The green curves are used only for the amplitude measurement. They are nothing to do with the real decay time fittings that you can do from “Event cut out”.

2. The button “Restore params” has been removed to make a space for other things. I’ve found I don’t use this button at all. But if you liked this button, don’t worry because now Shift key + “Detect events” button can do the same thing as the “Restore params” button.

3. On the left bottom, a new button “Check errors” has been added (the second bottom). When you press this button, the program check each event, starting from the currently selected event, and stops at an event that have a potential error. If you press this button again, the program searches a next error event. The potential errors include:

*The rise time (20-80% and/or 10-90%) cannot be measured, which may happen for various reasons.

*The decay time for the event is on the limit, 1/5 or 5x of the user set “Tau”. (This is checked only when “Decay subtraction” is on.)

*Two events overlap because the onset time of the event is set on the left to the peak time of the preceding event.

Obviously, not all the potential errors are real errors. So you don’t have to correct them if you think they are OK. This button is just useful to check through all the detected events.

4. In the previous versions, the area measurement in Select waves-> Graph -> measure values was not considering the X scaling. Now this is corrected to consider the X scaling. Please talk to me if you think you are affected.

2008/6/4

1. Now you can save the parameters of Further Analysis. Actually the saving takes place automatically every time you do a new analysis, and you can simply recall past parameters from the popup menu at the middle right of the panel. (Note: "default" is not a factory default but a default that was created when you called the Further Analysis panel. Once you close the Further Analysis panel and call it again, "default" may be different from the default in the previous panel.)

2. The output waves of Further analysis now include:

PPR (Px/Px-1): zIERWaveYYYY

PPR (Px/Px-1) (2D): zxIERMxYYYY

IER means inter-event ratio and are the amplitude ratio, P2/P1, P3/P2, P4/P3 and so on. They are not shown in "Summary list" but only created as waves.

Don't confuse them with the conventional waves:

PPR (Px/P1): zRatioWaveYYYY

PPR (Px/P1) (2D): zxRatioMxYYYY

These are always ratios to P1, thus P2/P1, P3/P1, P4/P1. They are listed in the Summary lists.

2008/6/1

> Could you also add a box or button to plot PPR vs interval?

This can be done using "Special Graph" under TaroTools. This function makes a XY plot from values and sems of a Summary List generated by Further analysis. You have to specify how many points (the number of events) you want to plot, and the row number that X values and Y values begin. For example, in case the Summary List shows 5 events and you want to plot the first 3 points of them with the time of events on the X axis and the amplitude on the Y axis, set "number of points" 3, "X: from point" 15 and "Y: from point" 41.

> In Amplitude trend, what are the circles and the stick?

The length of the stick is the mean amplitude, and the size of the circle is proportional to the number of events in the bin. The more events in the bin, the bigger the circle is.

2008/5/31

Event insertion in Event detection

On an event insertion, an onset time (base point, square cursor) is automatically detected.

Note: The program searches for a base point, starting from the inserted peak and scanning 200 sampling points backwards. If a proper base point is not found, the base point will be set at 200 sampling point left from the peak. Please don’t trust this function too much but always check it by your eyes. If this automatic function doesn’t work well in your environment, please let me know.

“Conditional Mask” in Event detection

In the Conditional Mask panel, "Unmask all" and "Invert mask" buttons were made.

"Event cut out" in Event detection

- Traces are smoothed with the Smooth1 filter, thus the same as the black trace on the main panel. (Previously, the cut out traces were original unfiltered traces.)

- Masked events are excluded from the event cut out. (User can choose this after the May 2010 version)

- The average of all cut out traces is shown in blue. (you can hide this if you want.) The name of this average wave is always "EventCutOutAverage" and you have to rename it if you don't want it to be overwritten by subsequent event cut outs.

Note: If one of cut out-traces have a blank region (when the event is very close to the beginning or the ending of the data trace), the average trace will have the same blank region.

- Decay time fitting for each event is added. This is an optional analysis and a little bit complicated.

How to do it:

1. Make sure you already did "Save results"

2. Do "Event cut out"

3. Adjust the places of cursors to the range you want to fit

4. Choose single or double exponential

5. Make sure "Posfix" is the same as the postfix that you used for "Save results"

6. Press "Do curve fit" button

7. (Fitting takes some time)

8. Check that the fitting curves (in blue) are OK

9. Close the window

Important note: the results generated by the above fitting are not really linked to the rest of the results of event detection, in sense that, when you insert or deleted or move an event, the result of decay fitting is not adjusted, while the rise times and amplitudes are immediately adjusted. To avoid a mismatch, you should do the decay fitting after detecting all events, just before moving on to Further analysis. As mentioned above, the decay fitting is an option. You can go without it.

Tips: For the decay time analysis, you may want to exclude events which have a next event on the decay phase. To do so, you can use "Conditional mask" before doing "Event cut out". Set the value of "Post-event interval is shorter than" 5 ms, for example, and then do "Event cut out". Masked events will be excluded from the "Event cut out".

Tips: If you want to do a fitting just for the averaged event trace (EventCutOutAverage), you can do so using the “Graph” function from the “Select waves” panel. (see below)

In the “Graph” function from the “Select waves” panel

Check the “cursor” check box to show the “remove artifact”, “adjust baseline”, “fit curve” and “measure values” buttons.

Note: When you do “remove artifact” or “adjust baseline”, please be aware that you can *not* undo the change. If you do not want to modify the original waves, you should make a copy of the waves beforehand. The function “Rename, Duplicate” will be useful in such cases.

“Burst transform…” under the TaroTools menu

This is an entirely new function, which is supposed to be used between Event detection and Further analysis when it is required. If you analyze spontaneous burst events, this function may be useful. Please ask me details but the outline is as follows: This function makes a new detection result from an existing detection result. The new detection result is a detection result of imaginary traces which are chunked parts of original traces. Each original trace is cut into multiple imaginary traces at points where event interval is more than “max inter-event interval (ms)”. Thus each new trace contains only a single event or a single burst of events. The time of the first event in each trace is set zero. The total number of events is preserved because the function does not add or delete events. Further analysis can deal with the new detection result.

Tips: You know the Further analysis panel has a “Limit to burst (ms)” check box. If you check this box, the analysis will be limited to a single, first-occurring burst in the time range 2. Single (non burst) events will be excluded from the analysis.

“Merge tables…” under the TaroTools menu

You can simply merge multiple tables into a table. In the new table, the left-most column will come from the table of the top window and so on.

Tips: By the way, when a table is copied from Igor to Excel, the wave names (column names) are not copied. To save time, in my program, whenever a new table is created, the column names are printed to the command window so that you can easily copy and paste it to the first row of Excel.

“Stat” button in the Further analysis

Have you used the “Stat” button on the left bottom of the Further analysis? The panel has two functions, the first one is to adjust the length of “Summary lists” that were generated by Further analysis. Unless you fix the event number in the list, you always get tables with different lengths. But, to do a meta analysis, it is useful if the length of all the tables are the same. You can set the number of events here. But please note that you cannot undo the change. So I recommend saving the entire Igor experiment before trying this function. Another function is unpaired t-test. After adjusting length, you can compare two summary list with unpaired t-test and get p values.

“Graph tools” under the TaroTools menu

Graph tools are completely independent from the Event detection suite, just a collection of something useful to make graphs and layouts.

- “Spread traces” will give vertical and horizontal offsets to each trace in a graph.

- “Tile graphs in layout” is useful when you make a layout with many graphs with similar sizes. Use this function just after appending graphs to a layout (not when you are finishing up a layout). Select all graphs that you want to tile before calling this function. If you the checkbox “tile as original graph windows” is checked, then the function tiles graphs as in the same positions as in the main Igor space. If unchecked, the function does only alignment without changing relative positions.

2008/3/12

Hi Everyone,

When you analyse spontaneous EPSCs, evoked EPSCs in vivo or other similar things, you always have to detect events because they occur at variable timings. For many years I had been using Axograph's event detection package for that purpose but was frustrated when I started analysing granule cell EPSCs because they are so variable in intervals and kinetics that the template matching algorithm doesn't really work. I searched other programs but couldn't find a good one. So I ended up writing my own program (just some procedures in Igor) to make the situation better. The detection algorithm itself is not special, just a kind of threshold search, but the merit of my program is flexibility in many ways. For example, it not only allows event selection 'by eye' after an automatic detection but also allows 'hand picking' events that the algorithm missed but your eyes can see. And you can tweak baseline and peak timings of each event, just by moving cursors. Overall, the program encourages manual work rather than automation. But, in this way, you can make the measurement more accurate and actually can save the time (better than wasting a time to find good parameters in so-called automatic programs). After the detection, you can get graphs (histogram etc.) and tables (event intervals, PPR etc.) by one click.

I'm writing this email to know if anyone is interested. I haven't checked if the procedures are compatible in other Igor environments (as I'm using Windows and pClamp, without Neuromatic). If you want to try it out, please let me know. And if I find it can be useful for some people, I'll upload it.

Best,

Taro