INTRODUCTION TO COMPUTERS IN PHYSIOLOGY LAB
The use of computers in physiology, and biology in
general, has increased steadily over the last 20-25 years. The advent of
the personal computer in the late 1970's/ early 80's made computing more
accessible to laboratory physiologists. I still remember my first
exposure to the personal computer in the lab of Dr. James Spotila at SUNY College
at Buffalo as a Master's student in 1979. It was a machine from Cromemco
with 4KB RAM that ran at 4MHz, with a single low density floppy for storage
(160 KB). There was literally no software commercially available, DOS was
not developed yet, and the only programs it could run were written by the user
in BASIC. Fortunately, we have come a long way in 20 years. Computers
that you will use in BIOL 331 are Pentium III computers with 256MB RAM that run
at 500 MHZ with a 20 GB hard drive for storage, not to mention multimedia and
an Ethernet card for Internet access. All this for a price about one
quarter that paid for the Cromemco !
In addition, as you are undoubtedly aware, a plethora
of software options are currently available to the user. In this exercise,
we will become familiar with the software packages that we will be using
throughout the semester. I hope that you will continue to use these
programs in the future as well.
During the course of this semester you may want to
look at software packages for: data acquisition (Biopac), computation (Excel),
statistical analysis (Instat or Systat), graphical/presentation (SigmaPlot and
Excel) and word processing (MS Word). In this exercise, the student will
be introduced to Biopac, Instat, and SigmaPlot.
Data Acquisition (BIOPAC)
The Animal Physiology laboratory is equipped with the BIOPAC Data Acquisition System. The system uses an array of sensors and transducers (devices that convert one type of energy, e.g. mechanical or light, into electrical signals) to monitor physiological parameters (e.g.. body temperature, pulse rate, etc.). The electrical signal, an analog signal, usually in millivolts (mV), is converted to a digital signal (a combination of 0's and 1's) that can be recognized by the computer. The BIOPAC system can monitor up to 4 different physiological functions simultaneously and records data 200 times per second (200 Hz). Try doing that with a pencil and lab notebook!! Another advantage of a digital acquisition system is the ability to store and retrieve data, and subsequently analyze and plot that data using the computer.
Exercise 1. Measuring Pulse Rate with the Plethysmograph.
A plethysmograph ( from the Greek plethysmos, increase and graphein, to write) is a device that monitors variations in the size of the vasculature. We will use a pulse plethysmograph transducer to measure our pulse rates. The transducer measures the density of blood in your fingertip by shining a small red light (from a light emitting diode) into the skin and senses the amount of light reflected back to a photocell in the device. Light is converted to an electrical signal that will be digitally converted and sent to the computer. Each time your heart contracts, blood pressure rises and falls, and consequently blood flow through vessels in your finger proceeds in a pulsatile fashion. The plethysmograph detects this cyclical variation in blood flow in the finger.
Procedure
1. Turn on power on the back of the MP30, A/D converter box.
2. From the Windows 95 Desktop, select PROGRAMS, then BIOPAC Student Lab.
3. Choose Lesson #7, ECG and Pulse
4. Enter a name for your group
5. You should see 2 separate windows; the upper window displays the data,
while the lower is the dialog box or "Journal" as BIOPAC refers to
it. Using the software from this point on is as simple as following the
instructions in the dialog box.
6. Plug in the pulse transducer (SS4LA) in channel 2.
7. Connect sensor to subjects finger.
8. Click on Setup, the setup program will run for 30 seconds.
During this time it will adjust the axes on the display so that the data can be
seen on an appropriate scale
9. Click on Record 6. The computer will record your pulse for 30
seconds.
Analysis
Editing and Selection Tools:
In the lower right of the screen, you will see three
icons, an arrow, an "I-beam", and a magnifying glass that can be used
for taking measurements and controlling the amount of data seen. The
arrow icon is the default and is used as a cursor tool to select or "click
on" something. The "I-beam" icon is used to select an area
of a waveform so measurements can be taken. To select it, click on the
"I-beam" icon. When the icon appears, you can select an area of
the trace or waveform to measure by holding down the mouse button and dragging
it either to the left or right. Practice selecting portions of the trace
using the "I-beam" tool. The magnifying glass icon is used to
"zoom in" on a small section of data. A portion of the data can
be selected by holding down the mouse button and drawing a box around that
piece of the trace. This area will now fill the screen.
Measurement Windows:
At the top of the trace is a series of pop-up
measurement windows. These measurements are displayed for each trace
selected. The trace number (channel number) is displayed at the left of
the measurement box. The center displays the parameter being measured,
for example, Mean, Time, Frequency, slope etc. The value for the
parameter is displayed at the right of the box. By clicking on the center
box, a pull down menu will appear allowing the student to change the parameter
to be measured. Using the "I-beam" tool, select a portion of
your pulse trace and make some of these measurements.
Journal Features:
The journal allows students to type notes to be saved,
or copy measurements to the journal for future reference. When saving the
journal, the program creates a standard text file. This file can be
imported into a word processing program or any other program that accepts TEXT
or ASCII files. To copy a measurement to the journal, simply go to the
Edit menu and select Paste Measurement. If you do not want all of the
measurements to be copied, select None in the pop-up measurement box.
Options may be set with the File:Preferences:Journal dialog box.
To copy "raw" data (waveform) to the
journal: select the span of data you wish to save, and choose Edit : Journal :
Paste Wavedata. Recall that data are recorded at the rate of 200 points
per second and so just a few seconds of data can result in a lot of numbers
stored in the journal. Wavedata can be exported to a spreadsheet program
for further analysis.
To write any notes you may wish to include in the
journal, simply click in the journal box to place the cursor, and begin
typing. Another feature you may wish to include is the time and date
stamp. All data should be stamped with the time and date at which it was
collected. To stamp the data with time and date, simply click on the
clock and calender icons.
Autoscale Tools:
When autoscale wave forms is selected, the software
determines the "best fit" for each waveform, adjusting the offset and
scale so that the waveform is centered horizontally and fills approximately
two-thirds of the screen. Autoscale horizontal will display the entire
data file on the screen.
Toolbar Functions:
The toolbar appears at the upper left corner of the
graph window and contains some shortcuts for frequently used commands.
The first button on the left changes the display to "scope mode",
where the border between traces is eliminated and thus resembles an
oscilloscope's output. The second button changes the display to
"chart mode", the default mode in which all channels are displayed
one atop the other with borders. Both scope and chart mode plot data with
time on the X-axis. The third button changes the display to X-Y mode
where data from 2 channels is plotted against each other.
Other Functions:
Saving Data: Data files can be moved, copied,
duplicated and deleted just like any other file. Data in these files can
be exported either as a text file or as a graphic image. Exporting the
data to a text file allows the student to examine the data using other programs
such as a spreadsheet, statistical package, or graphic package.
Printing:
Biopac allows you to obtain "hard copy" of the
data by printing the data much as they appear on the screen. To print a
graph, choose File:Print. By using the "Autoscale Horizontal"
option from the Display menu, the entire waveform can be printed on a single
page. To spread out the data, type in the appropriate number in the Fit
to ___ pages box.
Statistical Software (Instat)
Instat is an easy to learn and easy to use statistical software package. Although limited in its scope, it will perform all the necessary tests required in Animal Physiology Lab. The program does not run in Windows, but in DOS, and thus has a "primitive" look to it that many students may be unfamiliar with. Nonetheless, students find it easy to use.
Exercise 1
To start Instat, click on the
"MS-DOS/Instat" icon on the Windows 95 desktop. The first
screen shows a menu of choices. Notice the choices for "Help",
as well as "Theory" a review of simple inferential statistics.
Choose Input and Analyze Data. The next page asks you for what kind of
data you will be entering and at the bottom of the screen tells you which
statistical tests are available for each type of data set. Use the
up/down arrow keys to move through the choices, noting the changes in the tests
available at the bottom of the screen. Move the "X" to select
"Raw Data" and hit the F10 key. Instat in general uses ENTER to
select an option and F10 to continue on to the next screen. Instat
provides a data table of columns for each variable in the experiment, with
spaces above to label the variables as well as a space for the title of the
experiment. Enter the following data in columns A and B:
Drug Placebo
175 187
208 236
198 203
200 192
235 229
184 209
207 221
171 216
195 207
188 191
182 240
196 202
210 178
166 201
188 222
205 229
178 191
192 225
185 206
203 188
175 200
The data were collected from a pilot experiment testing the effectiveness of a cholesterol lowering drug. Volunteers were randomly assigned to one of two groups. One group was given the drug, while another group was given a placebo (a biologically inactive pill, usually starch or sugar). After 3 months, their serum cholesterol levels were tested. You would like to know if the drug was effective.
Step 1; Descriptive Statistics: After entering all the data hit F10, descriptive statistics for each group have been calculated including, mean, sample size, standard deviation, standard error, etc. From the descriptive statistics, you can see that people given the drug had a mean serum cholesterol of 192.4 mg/dL, whereas the placebo (control) group had a mean of 208.2.
Step 2; Inferential Statistics: You would next want to know if this difference (about a 8% drop) is significant, that is the likelihood this observed difference could have occurred by chance alone. You need to perform inferential statistics to help make that determination. To do this, hit F10. The computer automatically selects information required to perform statistical tests where 2 columns of data are present. You need to select whether the data are paired or unpaired (1 group or 2 group design, dependent or independent samples). Since our experimental design uses 2 independent groups of subjects, we would select unpaired. We will also assume normality and equal variances between the 2 groups, and so will pick the Student's t-test. Also, be sure the two-sided test is selected and press F10. The computer will display the results of the test.
Step 3; Interpretation of the Results: In essence, the computer (and you) is asking the question, are the means of the 2 groups equal (the null hypothesis) or are they significantly different from one another ? The Student's t-test reveals a p value of 0.0042, suggesting that there is a 0.42% chance that the difference observed could happen by chance, or conversely that there is a 99.58% chance that the difference was due to the drug. This result is considered very significant and we can reject the null hypothesis. Arbitrarily, we use a p value of 0.05 as the criteria for deciding significance. A p value less than 0.05 indicates a significant difference exists, one greater than 0.05 would be considered insignificant.
Step 4; Save your data: If you try to quit Instat, it will prompt you
to save your data. Select a name for the file that will allow you to
identify and retrieve it easily, for example, CHOLDRUG or CHOLESTR.
Exercise 2.
From the opening menu of INSTAT, select Retrieve data. To see a
list of files press F3. Select the file you just saved in the exercise
above. Now let's assume that the experiment conducted above was designed
a bit differently. Instead of dividing our volunteers into 2 groups and
treating them differently, let's test the volunteers cholesterol before taking
the drug and test it again after 3 months of taking the drug. As you can
see, this requires only half the number of volunteers. Relabel the first
column of data "After" and the second column "Before".
Now continue with the analysis by pressing F10. The descriptive
statistics should not change, the "After" drug treatment with a mean
of 192.4 and the "Before" treatment with a mean of 208.2.
Continue with the analysis by pressing F10 to get to the choices screen.
Now we have to make a change. We now have 1 group of subjects whose data
is dependent. ie. the value "before" should have some bearing on the
value "after", and thus we now have a paired design. Select
paired by moving the cursor up or down and hit enter and F10 to view the
analysis. The test is now asking the question, is the difference between
before and after equal to zero ? (the null hypothesis) or significantly
different from zero ? The p value of 0.0024 allows us to say there is a
significant difference between before and after. The p value tells us
that we are 99.76% sure of being correct in making that decision, or
alternatively, 0.24% chance that we will be wrong. In biology, we are
willing to take those chances. It's time to see a patent lawyer and begin
plans for a full scale clinical trial, as it appears our drug is effective.
Before exiting INSTAT, save the data as an ASCII data file, and select
comma delineations (punctuation used to separate values).
Graphing Program (SigmaPlot)
SigmaPlot is a graphics program designed for
scientific applications, whereas other programs that graph are designed for
business, e.g Microsoft Excel, Lotus 1-2-3, or WordPerfect. SigmaPlot is
a Windows program and is essentially composed of 2 screens, the Worksheet and
the Page. The Worksheet resembles and operates much like a spread sheet
and allows for data entry, calculations and editing, whereas the Page displays
the graph and allows you to edit and modify the graph. To open SigmaPlot,
click on the SigmaPlot icon on the Windows 95 desktop, a worksheet labeled Data
1 will automatically open in the window.
Data can be entered in a number of ways. First,
you can simply type data into columns as you did with INSTAT or if you are only
interested in plotting the means of your experimental variables, enter only the
means in separate columns. If you require error bars on the graph, enter
the standard error or standard deviation in other columns. Second, data
may be imported from another program, such as BIOPAC or INSTAT. Try
importing the data file saved in INSTAT. Begin by selecting Import data
from the File menu. Next, you need to find the saved file in the Instat2
directory and select Plain Text as the file type. When you finish, the
data will be transferred to columns on the SigmaPlot Worksheet.
Exercise 1: Line Graph, Regression
Before starting, you should already have in your mind what the graph should look like before you construct it. With the data you imported from INSTAT, graph the data to observe the relationship between "before" and "after" cholesterol levels. From the Graph menu select Create Graph. Select the line graph (X-Y Pairs) then Auto-Select. The graph will be displayed in its default format. To have the computer draw a best-fit regression line, go to the Plot menu and select Regressions, a regressions box will come up. Check the box "All data on plot" and click on the View Results box. This gives you the equation for the best-fit line as well as a measure of the "goodness of fit" or how much scatter there is in the data (r2). Close the regression results and the regression box to view the regression line. You can see the amount of scatter about the line. To edit or alter any aspects about the graph, simply use the mouse to point to the object and select it. For example, to change the axes labels, position the pointer over the X-axis and click the mouse. An X-axis dialog box will open with many options available to the user. To edit the axis label, select Edit next to the space where the label is displayed. To manually select the range of values over which the data are plotted, click on Range. Many other features of the program will allow you to customize the graph to your needs. Save the graph using a name that you can easily recognize and close the file.
Exercise 2. Line Graph.
An experiment was conducted in a Zoology Lab to measure the effect of temperature on the heart rate of the water flea (Daphnia). Enter the following data in the worksheet: Temperatures - 5, 10, 15, 20, 25, 30, 35. Mean HR (bpm)- 8.4, 15.8, 24.0, 32.5, 42.7, 59.1, 70.2. SEM: 1.2, 0.9, 1.4, 2.7, 3.4, 4.5, 8.9
Create a graph and select a line graph with X-Y Pairs as you did above. Choose to Pick Manually. Since it is customary to place the independent variable on the X-axis, place temperature (column 1) in the X, and the dependent variable (heart rate)(column 2) on the Y. Next, select column 3 for the Y-error bars, and click on Add to List and OK. The default format graph should now be displayed. To draw a line between the data points, select Lines from the Plot Menu and pick the type of line you want. Change the axis labels and you are pretty much done. To delete the graphs "key" or its title, select it with the cursor and hit the delete key. The graph can be resized by selecting the graph (note the little black squares around the periphery) and dragging a corner to the desired shape or size.
Exercise 3. The Bar Graph.
Open the file entitled 331graph.spw, and create a
graph, selecting 2D-Cartesian, Bar Graph. The data are from an experiment
where there were multiple treatments and their effects on a single variable
were monitored. An example would be an examination of three teaching
techniques on standardized test scores or the effects of three different drugs
on systolic blood pressure. Next, select Pick Manually. You will
notice that the numbers in the first column are ordinal numbers as in treatment
1, 2, or 3, they should go on the X-axis. The dependent variable, test
score or blood pressure or whatever (column 2), should go on the Y, with the
numbers in column 3 being Y error bars. To dress it up, you might select
different fills for each bar, change the axis labels, and insert more
descriptive tick labels. To do this type in the Tick labels in a column
on the worksheet. The computer will change each number on the X-axis to
the text in the box, if you wish to skip a label (for example at 0) skip a
space on the worksheet. Next, click on the X-axis and select Labels, in
the Label type box, select from column and type in the number of the column on
the worksheet that the labels reside.
You won't become an expert in one fast session, but
SigmaPlot is easy enough to work with and flexible enough for our needs so that
you will be able to do everything you want with just a little practice.