Spontaneous Current Analysis
Source:vignettes/articles/spontaneous-current-analysis.Rmd
spontaneous-current-analysis.Rmd
The goal of spontaneous current analysis is to identify and analyze
currents while avoiding spikes from stimulus artifacts and noise. This
article will show you how to analyze spontaneous currents in raw .abf
recordings using Event Detection in Clampfit. The data will then be
ready for further analyses with patchclampplotteR
.
There are many advanced approaches to noise exclusion in electrophysiological recordings (see Wang et al., 2023; Kudoh & Taguchi, 2002; and Pernía-Andrade et al., 2012 for some methods). I am using a simple threshold method, where any spikes below the threshold are not counted as synaptic events.
In this method, the threshold is five times the standard deviation (SD) of the noise amplitudes during a flat baseline region. This is comparable to the root mean square noise (RMS) used in MiniAnalysis.
Combine recordings
Note The data from our lab is not a continuous 30-minute recording. We pause the recording every 5 minutes to obtain parameters like access resistance and capacitance from the membrane test before resuming recording. If your data is already a continuous file, you can skip steps 1-2.
You may already have a concatenated file from your Evoked current analysis. This also means you can skip steps 1-2.
Open the first .abf file in your recording series, and use the
Next File
button to quickly open all files in the series.Click on
Analyze
->Concatenate Files
and select all files that belong to a recording from a single cell. All the recordings will be combined into a continuous recording with no gaps.
View recording
Click on the
Show Aquistion Signals
button and thenPrevious Signal
(blue arrow in the figure below) to view the sweeps showing changes in current (Im_primary ()
). The traces should all be stacked on top of each other, but if they are not, click onView
->Data Display
->Sweeps
.You can also click on the
Auto Scale All Y Axes
button (orange arrow) to help you see the data faster.
Create data sheet
- Create a .csv file with six columns:
Letter
,ID
,Trace
,Peak_amplitude
andTime_of_peak
.
-
Letter
The unique letter identifier of a single cell. -
ID
A character value indicating the recording number. This corresponds to theFile Name
column that is automatically generated in the Results sheet in Clampfit. See below for a warning about what you should put here. Trace
Peak_amplitude
Time_of_peak
Note I would strongly recommend using the filename of the first file in the series (but write down the concatenated filename in your lab book as well). This is because Clampfit will auto-generate the concatenated file names (
Concatenate001.abf
,Concatenate002.abf
, etc.). If you update your pClamp software, Clampfit will begin naming files again atConcatenate000.abf
, and you could lose track of which file is which.
Identify threshold
To reduce the risk of identifying noise as spontaneous currents, we must set a detection threshold.
- Zoom into a region of the recording with few spontaneous currents and minimal noise. Place Cursors 1 and 2 around this region.
You may need to view a smaller number of traces if there are too many to find a clear region. Use
View
->Select sweeps
and select a smaller range.
Click on the Statistics button (a small icon with a summation symbol on top of it) or press
Alt+s
.Set the following settings to measure noise amplitude in the baseline:
- Trace Selection: Choose
Im_primary ()
andAll Visible Traces
. - Peak Polarity:
Im_primary
,Negative-going
- Baseline Region: Mean level
Cursors 1..2
- Search Region 1: Range:
Cursors 1..2
- Destination Option:
Replace results in sheet
(prevents you from accidentally copying old data) - Column Order:
Measurement, Region, Signal
- Measurements:
Peak_amplitude
Click on the Results sheet (
Window
->Results1
). On the results page, copy the values in theR1S1 Peak
column. Paste these into the A column of a blank Excel sheet.In cell B1, type the formula
=AVERAGE(A:A)
. This will produce the mean noise amplitude.In cell B2, type the formula
=STDEV.S(A:A)
to get the standard deviation.In cell B3 type
=B2*5
. This value is the five times the standard deviation of the mean noise amplitude, and it will be the threshold value for this recording (write this in your lab book near your notes on this recording).You may want to save this Excel sheet for later use (just replace the data in the A column each time).
Set Event Detection parameters
Click on
Event Detection
->Threshold search
. The recording will look faded, and some new horizontal cursors will appear. Set the Event Polarity toNegative-going
.In the
Threshold Search
box, set the Baseline to 0 and Trigger (pA) to the threshold value that you found in step 12.If there are large artifacts, enable the
Reject cursor
and drag it to a level below the artifacts. Any event with an amplitude larger than this reject zone will be excluded.
Note If you need to remove an entire trace, click on it and press the
Delete
key. This will hide the trace Later, you will select visible traces for the analysis.
If you are having issues with noise detection, feel free to experiment with the other settings such as the pre- and post-trigger lengths and noise rejection.
Set the search region to
Full Trace
. Click theSelect
button and ensure that the optionAll Visible Traces
is selected.
- Click OK to close the dialog box. If you ever need it again, click
on the
Search Parameters
button on the bottom left side of the toolbar.
Identify currents
- Click on the
Full Scale X Axis
button to view the entire trace.
> Warning! If you do not check “Full Scale X axis”, Clampfit will continuously scroll through the recording and it will take much longer to run.
- The Event viewer window should pop up, but if not, click on the
Event Viewer button. On the lower-right side, click the
Options
button, and then do the following:
- Uncheck
Open Event Viewer automatically when starting event detection
- Uncheck
Continuous autoscale
- Close the Event Viewer window
Warning! If you do not close the Event Viewer (and perform the other items in Step 21), Clampfit will try to refresh and resize this window each time a current is detected. It will likely freeze and crash the software.
- Click on the Nonstop button to initiate Event Detection. Clampfit will draw a blue dot on each event. This may take a few minutes for large files.
- When the Event Detection has stopped, the nonstop button will become greyed out there will be a small notification sound. This is what the recording will look like after all events have been detected.
Exclude evoked currents
Since this analysis focuses on spontaneous currents only, you will need to exclude any stimulus artifacts and evoked currents that were included in the event detection. Clampfit does not have an easy way to select multiple currents at once. However, one work-around is to create a plot of current amplitude over time and select points to delete.
- Click on the
Define Graphs
button and choose theScatterplot
option.
- Set the x-axis to
Time of Peak
and the y-axis toPeak amplitude
.
I am currently working on this section. The rest of this article is a work in progress
- Click on the Results sheet (
Window
->Results1
) andSave As
. I would suggest creating a consistent naming convention, such asLetter
-events, as inAA-events.sta
,AB-events.sta
, etc.