Getting started.

So, you’ve figured out how to keep the in vitro spinal cord alive long enough to collect some data, and now you’re wondering, where do I go from here? How do I make a figure for my first paper, how do I finish that thesis? Well, not to worry, here is an overview of some basic information on how to deal with your extracellular in vitro data.

1.         Use Capture or Axoscope to record the data.

Convert *.abf files generated in Axoscope to waveform files for use in the analysis program.

2.         Use the Analysis program to scale, filter, and otherwise process your raw data.

3.         Save processed files for further analysis or display (e.g. saving *.plt files for use in Corel draw).

1.   Use Capture or Axoscope to record the data.

Capture or recording data can be done using our own SCRC software (Capture program), or using Axoscope software. If you’re using Capture, start with Introduction to Software (from the User's Guide). If you’re using the Axoscope software, refer to their instructions and note that your data files will be in the form *.abf, which need to be converted to a file format that is acceptable to the Analysis program.

Convert *.abf files to waveform files for use in the Analysis program.

Use axon2run to convert *.abf files to waveform and format files for the Analysis program. This is discussed in SCRC Software Manual Pages, and is listed as axon2run(1). Briefly, you type in ‘axon2run filename.abf and this will convert your single *.abf file to the waveform and format files needed for use in the analysis program. At this point, you will actually have several files with your filename prefix, with a different one for each waveform you recorded in Axoscope. When you load the converted data file within the Analysis program, you need only give the filename prefix; no extension is required.

So, for example, if you have the data file 03809003.abf recorded on August 9th, 2003 using Axoscope, you type in the following command line after the prompt in one of the shell windows on linux/qnix/unix (Hint - you must be in the directory containing this file):

axon2run 03809003.abf

(Hint - if you have several files to convert, once you’ve typed this command in once, use the up arrow key to get the command line back and then just modify the file number, and repeat until you’ve finished converting all your files).

Now, you can run the analysis program and start to look at, and analyze your data file.

You can load this file either by typing in ‘a 03812000’ (you have to be in the right directory in order for this to work), or you can choose Load once you’ve started the analysis program, and used Directory to indicate the proper directory containing this file.

(Hint - if you add & to the end of the analysis command (a filename &) you can run more than just the analysis program (e.g. simultaneously run gensspp in a command shell window).

2.   Use the Analysis program to scale, filter, and otherwise process your raw data.

Irregularity of the data

Generating polar plots

I don’t want to go over the wealth of information contained in all the other tutorials, I only want to mention things that are specific to data generated using the in vitro preparation and a few items that are useful when getting started in analysis.

It is important to note that the in vitro locomotor activity is MUCH slower than rhythmic activity seen in the cat preparation. In particular, the frequency of stepping in cats during MLR-stimulation is generally over 1 Hz whereas the frequency of rhythmic activity in the in vitro preparation is considered speedy above about 0.3 Hz (yes, three steps every ten seconds). The frequency varies from below .1 Hz to over 0.6 Hz, although most cycle frequencies will fall in this range. Because of this, the amount of data contained in a run is often quite large in comparison to that recorded for cat data and the relevant time-frame is slower for rat data, and I find the second (rather than millisecond) time unit to be of use (Set/Display options/Units/Time/seconds/Esc), and I set this when I begin looking at the data in Analysis. So, for those just getting started, if you want to look at the data, you can key in the following to see what you’ve got.

1-  Set/Display options/Units/Time/seconds/Esc

2-  Analysis/Raw/Go


When you do this with file 03809003, you will see the above picture, showing over 400 seconds of data, with what looks like some rhythmic activity at the beginning of the ‘run’ (I am going to use the term ‘run’ to refer to the set of waveforms being seen on your monitor). So, since you can’t really see anything useful when viewing the entire file, you can ‘zoom’ in to the beginning of the run to see what kind of activity is there.

For example, if you want to start at 45 seconds and end at 115 seconds, you key in;

-    Set/Range/Start/45/Esc

-    Set/Range/End/115/Esc

-    Go

(you could combine the first two steps by using Set/Range/Start 45/End 115/Esc)


What you are looking at are recordings from 7 ventral roots (5 cervical and 2 lumbar with left and right denoted by L and R and the spinal level by either C or L combined with the segment number - RC4 is the right C4 ventral root). So, at this point, if you just want to show another human being the data you collected, you can print what you see on your monitor by keying in:


If you want to show other sections of the data in this file, you just change the range shown on the x axis (set/range/start and stop times, then escape), and then key in plot/plotter.

See Tutorial 1 from the SCRC website for a much more thorough discussion of setting the range, as well as other display options (e.g. how to select the waveforms you wish to view in your list - Set/Display Options/Waveform/List/enter waveform numbers/Esc/Go).

If you want to change the name(s) of the waveform(s), now is the time to do it, before you begin rectifying or filtering your waveforms, so that the changes can be carried through as you do your analysis. Waveform names can be changed by keying in;

Calibrate/Waveforms/Name/enter the new name/esc/Go

Hint: Unless you perform some filtering processes on your data file, or create new waveforms, the calibration name changes will not be saved upon exiting (despite answering yes to; ‘save parameter changes?’ when quitting the program). So, your best bet is to save the name changes immediately after making them by using;


Low-Pass Filtering and Rectification of Raw Waveforms

(Alternate title: How to Beautify your raw data in 10 easy steps!).

Background: In contrast to the example shown in tutorial 1, in vitro rat data may benefit from filtering and rectification. This is particularly apparent during rhythmic activity with a high level of tonic background motoneuron discharge (as seen during rhythms induced by bath application of serotonin - as the sample 03809003 shows), or during rhythms that are quite irregular and sporadic.

Now, we are going to low pass filter and rectify these waveforms. I am going to briefly outline how to do this, but there are other, more thorough descriptions on the SCRC software support site. If you want to see them, go to the User’s Guide, and under analysis, select the maintenance sub-menu, and then choose filtering to get a full description of each of the parameters and options related to this topic. Here’s the address:

There is another description in the SCRC Manual Pages, which you can find by selecting analysis, and then by scrolling down to the section entitled Maintenance. Web address:


So, using the example of 03809003, we will low pass filter and rectify some of the waveforms to see whether we are then better able to determine if these rhythms are coordinated between the cervical and lumbar ventral roots.

1 - If you haven’t already done so, set the range on the x axis to start at 45 seconds and end at 115 seconds (S/R/S 45/E 115/ESC/Go)

2 - Change the default maximum length of time per waveform section from 5 seconds to something more reasonable, like 50 seconds, by keying in:

Set/Display Options/Waveform/Time/50/Esc

(Why? Because, if you’re dealing with runs of data of 50 to 200 seconds or more, if you have to break it up into sections of only 5 seconds, you won’t be able to discern the rhythmic activity (which occurs about every 5 seconds - if it’s at 0.2 Hz, which is not unreasonable) from the background discharge. Don’t do it on a long run of data and you’ll see what I mean.)

3 - Low Pass filtering is done within the Maintenance section of the Analysis Program. So, key in:

Maintenance/Filter and you will see several parameters and options that can be set. I will run through the settings used for the sample data in 0389003, but you should familiarize yourself with the manual pagers referred to above from the SCRC website.

(Hint - Because of the low frequency of ‘stepping’ and the often-irregular nature of the rhythmic activity, attention has to be paid during low pass filtering to ensure that the waveforms do not become distorted in relation to the raw data - so you should always check your filtered waveforms against to raw to ensure the filtered product reflects the activity seen in the raw.)

Maintenance/Filter/Amplification factor/10

(Often, with high tonic background or irregular activity you may want to amplify your data when filtering.)

Maintenance/Filter/Cut-off frequency/1

(With the frequency of rhythm in vitro, I find 1 Hz to reliably reflect the raw data yet satisfactorily smoothes the data - you should play with this setting to find the optimal for your purposes.)

Note: As demonstrated in tutorial 1, you can also play with the divisor setting (if you use 2, you will only be using every second data point to reconstruct the data seen after filtering. However, because of the frequency I use to capture data, and because of the frequency of the in vitro data, I have found that changing the divisor has a less visible effect on the smoothness of the filtered waveforms in comparison to changing the low-pass cut-off value when filtering.



Maintenance/Filter/Waveform Number/0


You will then be asked it should ‘show only analysis range, rather than full run?’ Choose yes, so you don’t have to look at the entire 400 second run.

Now, follow the instructions on the screen to set the baseline, minimum and maximum values accepted during filtering. Here is where you can try to get rid of obvious electrical noise by setting the minimum and maximum values to reject really out of range values.


It will then ask you for the number of the new waveform - you can pick anything between 0 - 15, but remember that if you pick a number of an existing waveform IT WILL BE OVERWRITTEN!

Enter 7, and when it is finished filtering, press Esc and Go and you should see the following;


To make a point, I would like you to filter waveform 0 using the cut-off values of 0.5, 2 and 5 Hertz. You can do this by keying in the following;

Maintenance/Filter/Cut-off frequency/.5


When it asks for the new waveform number, enter 8.

Repeat for 2 and 5 Hz cut-off values, and enter 9 and 10 (respectively) for the new waveform numbers. Because you are doing the same waveform, you do not need to set the baseline, and minimum and maximum values each time you enter a new cut-off value.

Now, press Esc, and Go and if you have been following this tutorial in order, you should see the following;


Now, if you want to better compare the filtered waveforms with the raw data, arrange them together using;

Set/Waveform Display/List 7,0,8-10/Esc/Go

You should see the following;


This picture illustrates why I choose 1 Hz for the cut-off frequency when low-pass filtering in vitro extracellular data. If you look carefully at these 5 waveforms, you will notice that although waveform 8 is the smoothest, a lag has been introduced (in comparison to the raw data) in the onset and offset of rhythmic activity. In contrast, the onset and offset of rhythmic activity in waveforms 7, 9 and 10 are in agreement with the raw data. The reason I choose 1 Hz over either 2 or 5 Hz is because, if you need to do some secondary analysis (such as marking onsets and offsets), the smoother the waveform, the less difficulty you will have when trying to automatically mark the cycles (see the section on polar plots for further discussion of this).

You should now be able to filter and rectify the other waveforms, using the steps below, so we can go on to mark cycle onsets and offsets and then use this information to generate some polar plots.

Summary of steps for Low Pass Filtering and Rectification

Maintenance/Filter/Waveform Number 1

Maintenance/Filter/Cut-off frequency/1

Visually/ then say yes when it asks if it should show only analysis range, and follow the instructions to set the baseline, minimum and maximum values


Enter 8 for the new waveform number (notice that it does not warn you that you are over-writing an existing waveform, which in this instance, is what you want to do).

Repeat these steps for waveforms 2, 4, 5 and 6 so we can generate some polar plots comparing these different waveforms. (I know it sounds redundant, but if you want to compare intra-cervical, intra-lumbar as well as cervico-lumbar coordination, you need a few waveforms).

To do this, you need only enter:

Maintenance/Filter/Waveform Number 2

Visually/ then say yes when it asks if it should show only analysis range, and follow the instructions to set the baseline, minimum and maximum values


Enter 9 for the new waveform number

Repeat for waveforms 4,5,and 6 entering 10, 11 and 12 (respectively) for the new waveform numbers.

Then, if you

Set/Waveform Display/List 0-12/Esc/Go

You should see the following;


So, that’s all well and good, but you can’t really see anything, so, I’m going to change the time frame (x axis start and stop values), and the waveform list (after I verify that each filtered waveform reliably reflects it’s corresponding raw waveform), by keying in;

S/R/S 45/E 110/ESC/Go

Set/Waveform Display/List 7-12/Esc/Go


So, if I were to describe the data shown above, I would say that waveform 8/ RC5 is poorly modulated, and if you look at the raw data, you can see that it shows mainly tonic discharge. For this reason, I will choose to exclude this waveform from any further polar plot analysis. Also, by looking at these waveforms, I would say that RC4 alternates with RC7, that Right and Left C7 alternate, as do RL2 and LL2. Further, it looks as though LC7 and LL2 are bursting in a 1:1 ratio, almost simultaneously, with LC7 cycle onsets occurring just before LL2 cycle onsets (for this example, you might successfully argue that the same relationships were clear when viewing the raw, unfiltered waveforms, you should go back to the raw data, and see what you think). In the example used here, the relationships are obvious to the naked eye, and raise the question of whether it is necessary to use polar plots to tell you something you can clearly see. However, if you need to report your findings in written form, using some statistical test, the Rayleigh’s test contained within the polar plot analysis will give you such information. Further, many examples of rhythmic activity are not as clear as the one shown here, and in these cases, sometimes a statistical measure can be useful.

Polar Plots (finally)

So now to generate a polar plot you need to mark your cycle onsets and then use the gensspp script to generate the plot (It’s that easy).

We are going to use RC4 (W7) and RC7 (W9) as our two sample waveforms.

Step 1 - Mark cycle onsets

Waveform activity (enter 7 for waveform number)




Automatic - at this point you will notice that there are three items you can select to modify (a - set threshold, b- set hysteresis and c - set minimum crossing delay) - but if you look at the bursts, it looks like they’ve all been selected nicely (except one - which we will deal with in a moment).


So, choose Done

Now select Manual

You should now see your threshold level, and all your marked cycles, except for that missing one, so if you move your cursor to the beginning of that missing cycle, right at the level of your threshold line, and then type a, and you will now have an additional marked cycle onset and offset for that missing burst.

Now, you can type







When prompted to save the modified parameters - say yes.

Note that this is an easy out for you if you really mess up the cycle selection part - you can always exit this part without saving and go back in to try it again.

Now we need to deal with RC7 - Waveform 9

So, once again type in

Waveform activity (enter 9 for waveform number)





So, you should notice that there is something wrong with the first burst (the program picks of three bursts when probably it should only be one).

Try dealing with this by lowering the threshold, which is done by moving your cursor just below where the existing threshold is, and then type in a. You should have lowered the threshold just slightly and now, rather than three bursts, it should be picking up just two. We will accept this for now to illustrate a point. So accept this by typing;






When prompted to save the modified parameters - say yes.

So, now type go, so you can see your nicely marked waveforms. But instead you see your old waveforms - no markings. Because you now have to


Waveform display

Mark crossings - yes



Wholla - still nothing!


That’s because you now have to indicate which waveform to use for the marked cycles. So, type in:



Waveform - enter 7



Finally - some marked waveforms!


It is a good idea to take the time to play with the threshold, hysteresis and minimum crossing delay values to get a feel for how they will affect the cycle onsets and offsets.

Also - it is a good idea to give your cycle onsets and offsets a ‘reality’ check by taking a look at them in the run to see if they should be where they appear - this is particularly important for data that is not terribly regular.


So, for example, in the above screen shot, you should see that all the onsets are pretty good except for the first burst which shows the onset of the first burst about where it should but then a second onset where it looks like it is the third increase/maxima in that first burst. I would consider each of those first three maxima to be part of the first burst and would go back into

Waveform - enter 9





now, use the instructions at the bottom after moving you cursor over to the pair of markers you want to delete and delete that second pair of markers.





Q and Save.

Now if you type Go, you should see the following;


OK, so now you have the onsets marked for two waveforms and you can go to the terminal window and run the gensspp script.

STEP 2 - Running the GENSSPP script

DON’T forget to save your parameters first - I usually use Load/save to do so.

You have to be in the same directory as the file you are analyzing.

Here is the general script needed:

gensspp –c(insert p value) –r(insert # of step cycles to randomly select) filename w1 w2 | output

Try typing:

gensspp -c0.05,0.001 03809003 7 9 | xhpgl

That line before the xhpgl is a combination shift plus that key usually just above the return key on your keyboard - I don’t know what it’s called but it’s symbol is above the backslash.

This script will do a non-random polar plot for all the steps in the time range selected within the analysis program, and will give you two dotted circles showing the critical r values at p=0.05 and p=0.001 (and the p=0.001 will be larger than for p=0.05), and it should look like this:


You can see that the waveforms are alternating and have an r value of 0.94 which is pretty close to 1 and well over the p=0.001 confidence interval.

Now you can re-run the script and select a random sample of 10 data points and see if things change. So type in

gensspp -c0.05,0.001 -r10 03809003 7 9 | xhpgl


You should note that the confidence intervals got larger, because the sample size got smaller.

You can change the order of the waveforms selected and you can have one or all three p values listed, and you can select a random sample of any number of cycles up to the maximum in the range of data with marked cycles from your analysis. Finally, there are three output options:

output - there are three choices for your output:

 | xhpgl sends it to your monitor

 | hardcopy sends it to your printer and

 > *.plt will pipe the output to a plt file (of a name of your choosing)

Well that’s it - you can do any combination of waveforms and in any order, you just have to mark the cycle onsets. You can also limit or expand the number of cycles that the gensspp script will select from by changing the range within analysis.

Happy plotting.