Patch-clamp data analysis in Clampfit: export the traces

Last updated on May 11, 2024

When publishing experimental findings in electrophysiology, one important element is to include traces as representative examples of the recordings. In this tutorial, I will show how to edit and export patch-clamp traces using the software Clampfit (pClamp 10 and 11). Clampfit software is only for Windows, but it seems it can be run on Mac OS using CrossOver, WinneBottler, or PlayOnMac.

This tutorial is part of a series of tutorials on patch-clamp data analysis for Python and Clampfit (see all the posts here). For plotting patch clamp data using Python, I directly point you to Python’s tutorials on this blog and the excellent tutorial of the pyABF package.

Please contact me with any suggestions or corrections to improve this tutorial. I hope you find it useful!



Contents


Example data

For this tutorial, I will use a whole-cell patch recording of a medium spiny neuron in the striatum, a structure of the basal ganglia. The neuron was located in the dorsal part (the animal’s back, which is the top in a mouse coronal slice) of the striatum, named the caudate putamen, whereas the ventral part is called the nucleus accumbens (Figure 1).

Figure 1. A. Coronal sections of the mouse brain 0.74 mm anterior to the anatomical point bregma. The top image is a coronal diagram highlighting the two main structures of the striatum: caudate putamen (CPu) and the nucleus accumbens (ACB). The bottom image is a Nissl stain of cell bodies in the same brain region. B. Sagittal (longitudinal plane) atlas section provides a clearer perspective of the position of the striatum within the mouse brain. Images B and C from The Mouse Brain in Stereotaxic coordinates by Paxinos and Franklin, 2nd edition (PDF here, and online). C. A brightfield microscopy image of a coronal slice for patch-clamp recordings shows the typical striped (=striatum) appearance of the caudate putamen (unpublished data).

The action potentials were recorded in current-clamp mode (post) and I used artificial cerebrospinal fluid (ACSF) as the external solution and potassium gluconate as the internal (pipette) solution. Download the ‘.abf’ file here.

The medium spiny neurons are GABAergic neurons (post) and represent the majority of neurons in the striatum. These neurons are generally classified based on the type of dopamine receptor (DR) they express, D1R or D2R. Both subtypes are involved in the motion pathway (Figure 2), D1R medium spiny neurons disinhibit the direct pathway to promote movement, whereas the activity of D2R medium spiny neurons leads to the inhibition of movement (indirect pathway). Dysfunction of these crucial neural circuits is linked to diseases like Huntington’ (post) and Parkinson’s. You can read more about these pathways here, and the nuances of these circuits in the ventral striatum here.

In addition, D1R and D2R subtypes of striatal neurons have different electrophysiological properties (see Gertler et al., 2008 and Cao et al., 2018). The example recording is likely a D1R+ medium spiny neuron.

Figure 2. Basal ganglia circuit diagram. Abbreviations: spiny neurons (SPNs), GPe (globus pallidus external segment), GPi (globus pallidus internal segment), SNr (substantia nigra pars reticulata), STN (subthalamic nucleus). Image adapted from 2nd edition of “Principles of Neurobiology” by Liqun Luo (see Books section on this blog).

Traces in the Analysis Window

Here, I list some basic options in the Analysis window to change the default visualization of the traces (Figure 3). You may need to adapt the example to your data. Although it might look like a lot of steps, the process is fast and easy once you are familiar with the settings.

Remember NOT to overwrite your raw data, and to take note of the steps involved in extracting representative traces. For instance, you can make a .txt or .doc for each type of recording: action potentials, current recordings, etc. For additional options in the Analysis window, check previous post.

Figure 3. Default view of the traces in the Analysis Window of Clampfit (10.7).
  • Filtering the data. For instance, a lowpass filter and/or a notch filter if hum noise (50 or 60 Hz) was present in your recording.
    • Analyze > Filter
      • Lowpass. Type: Bessel 8-pole. -3 dB cutoff: 1000 or 2000 Hz.
      • Trace selection: Active signal, All visible traces.
  • Display the traces.
    • View > Data Display
      • Sweeps. This is how traces are usually presented.
      • Continuous (Figure 4) or Concatenated. These can be interesting options to compare two sets of action potentials.
Figure 4. Display the sweeps as continuous or concatenated in the Analysis Window of Clampfit (10.7).
  • Stimulus waveform signal. Retrieve the digital stimulus waveform signal.
    • Edit > Create Stimulus Waveform Signal
      • Select the waveform from the channel you want to create the signal. In the example, Analog OUT #0. Note that this new signal is noise-free.
    • Go to View > Window properties.
      • In the Show/Hide tab, select the recorded stimulus signal in Signals to be Shown and click on the double-arrow button to hide it and leave only the newly created stimulus signal.
  • Select the traces to display.
    • View > Select sweeps or mouse right-click: Select sweeps. In the example, sweeps 9 and 11.
  • Select the region of interest.
    • Double-click on the cursor (e.g. cursor 1) or mouse right-click: Cursor properties.
      • Cursor 1. Vertical cursor value time. Move to Time (s): 0.2 s. Absolute. You can also move the cursor to a specific voltage and change other visualization properties such as the information shown in each cursor.
      • Cursor 2. Vertical cursor value time. Move to Time (s): 0.8 s. Absolute.
  • Transfer the traces to the Graph window. Once you have set the basic things described above you can transfer the traces.
    • Edit > Transfer traces
      • Destination Window: Graph window
      • Region to transfer: Cursors 1, 2. Optional: Start time base at zero.
      • Trace selection. Click on Select: All visible traces, All visible signals (if you want to plot the stimulus signal too).
  • Save the edited trace. You can also save an edited region of the original trace.
    • Select the region of interest between, e.g., cursors 1 and 2.
    • Go to File > Save as
      • Save as type: Axon Binary File (integer or floating point).
      • Options:
        • Data range to save: Between cursors, e.g., 1, 2.
        • Data selection: Visible sweeps and signals.
        • Select Start data point at time 0, as needed.
      • File name. Give a different name to this file, do not overwrite the raw data!

If you prefer to directly edit the traces in a vector graphics editor, go to Edit > Copy and select “Copy Analysis Window to clipboard as a Metafile”. The full analysis window will be copied to the graphics editor.

Traces in the Graph window

Most of this section also applies to the ‘Analysis Window’, but I generally prefer to continue editing the traces in the ‘Graph window’ (Figure 5). I will show an example of how to plot both the voltage traces and the current steps. You can adapt the steps to your recording files.

Alternatively, you can directly go to the graphics editor or copy the values of the traces (‘Results window’) and paste them into a graph plotting software such as R, Origin, GraphPad, SigmaPlot, Excel, etc., and replot the traces there. For Python, I recommend again using the package pyABF.

Figure 5. Visualization of the traces transferred to the Graph window of Clampfit (10.7)
  • Move the current steps below the voltage traces.
    • Go to the sheet of the Results window with the values of the traces.
    • Analyze > Column Arithmetic. Check which columns correspond to the current steps and then subtract a value to display them below the voltage traces. Additionally, you can reduce the amplitude of the currents for display purposes. In the example data: cD..E = (cD..E/8) – 150.
  • Add scale bars.
    • Go to the sheet of the Results window with the values of the traces.
    • Add the scale bar values to new columns. In this way, you know that the scale bar is exactly the values you want. You can move the position of the scale bar in the graphic editor afterwards.
      • For a 50 mV bar: Column F: 620 (row 1), 620 (row 2) and Column G: -95 (row 1), -45 (row 2).
      • For a 100 ms bar: Column H: 520 (row 1), 620 (row 2) and Column I: -95 (row 1), -95 (row 2).
    • In the Graph window, right-click mouse > Assign plots or Analyze > Assign plots.
      • Data Type: X-Y pairs.
      • Select columns of the voltage scale bar. In the example, column F and click on X>> button, and then select column G and click on Y>> button.
      • Assign Plots to Graph. Click on Add.
      • Repeat the above steps for the time scale bar, columns H and I.
  • Plot style. You can instead do these steps in the graphics editor.
    • Graph window. Double-click on the window or Right-click mouse > Properties or View > Windows Properties. Click on the Plots tab.
      • You can assign legends to each plot if you have several sweeps.
      • Increase the line thickness and color. For example, set it to 3 and click Apply to all plots. Then, I increased the thickness of the scale bar (plots 5 and 6) to 5.
      • Change the line color. For example, the rheobase trace and the corresponding current step to red.
      • Remove the symbols of the scale bar. Select the plot of the scale bar (e.g. plot 5), unclick Show symbols, and click Apply to all plots. You can also unclick Show symbols for all new plots before adding the scale bars.
    • Colors/Fonts tab. Here you can change the font size, colors, axis format, etc. I prefer to do this in the graphics editors and just leave the traces with the least number of elements.
    • X/Y axes. If you want to keep the axes, you can also change the name and the limits of the axes.
  • Clean the plot area (optional)
    • Right-click mouse > Properties. Click on the General tab.
    • Unclick all the Items to Display and the Titles.
    • Click OK. Only the traces and the scale bars are displayed (Figure 6).
Figure 6. Graph window: traces after removing the axes, editing the lines, and adding the scale bars. The red trace highlights the delay to first action potential characteristic of MSN neurons.
  • Copy the plot to an external graphics editor.
    • Edit > Copy.
  • Save the plot settings.
    • View > Windows Defaults. Select Save selected Graph Window settings as default.

Export the traces to the graphics editor

You can complete the edition of the traces, add titles, and compose the final figure in the vector graphics editor you usually work with. I am attaching below some tutorials for common vector editors and an example using Inkscape (Figure 7). Read also the article from Molecular Devices about how to export images to graphic programs.

The key element of scientific data visualization is the accurate representation of the raw data, the electrophysiological recordings in this example. Then, the final figure composition will depend on its final use, such as posters, lab meetings, scientific publications, and so on. For instance, many scientific journals have guidelines for figures and artwork that you can read before submitting your manuscript.

Recommendations for creating scientific figures include, among others, clear and logical composition, unbiased and accessible use of colors, readable typography, correct labeling and scale bars, and the avoidance of confusing elements or “chartjunk”, as coined by Edward Tufte.

Consider also how you structure your data and name your files (see resources). A good data structure will save you a lot of time (and problems). We all have been in this ‘xkcd’ comic. Keep a clear naming convention for your files to track all your raw and processed files, while you annotate the processing steps to recreate the figure. For instance, a general folder for each project can contain subfolders such as ‘Raw data’, ‘Processed data’, ‘Analysis’, and ‘Figures’ to store all the files.

Figure 7 Representative voltage traces of a medium spiny neuron (top traces) showing the rheobase (red trace) and a spike train (black traces) in response to 360 pA (red) and 400 pA (black) current steps, respectively. I used Inkscape to change the format ratio (changing the scale bars accordingly), relocate the traces, and add numeric values. Then, I exported the image as PNG (1200 DPI).

More export options

Export detected events

It is also possible to export all detected events of the electrophysiological trace. See the previous blog posts to learn how to detect action potentials and synaptic events in Clampfit. Then:

  • Go to the Event Viewer > Save as… and save all detected events as a new “.abf” or as “.atf” (text file that can be read in Excel) files. In Options, select “Align events at zero” or not if you prefer that all events start at 0 (V or A).
  • Additionally, you can overlay or only plot the average trace of all events: Analyze > Average traces.
  • Edit the traces as described above. See Figure 8 as an example.
Figure 8. Plot with all detected action potentials of the example file in light gray, and the average trace in magenta.


Export the fitting traces

  • Apply the right fitting to your data (e.g. exponential, standard) first. The fitting will be applied to the trace range between cursors 1 and 2.
  • Edit > Create Fitted Curve Signal A new signal will be created with all the fitted curves.
  • File > Save as… Save the file with a different name.

Resources and further reading

3 thoughts on “Patch-clamp data analysis in Clampfit: export the traces

  1. Hey, this was a very helpful article! i just had one question. I was wondering if there is any way I can fit part of a particular trace and save that window as it is? Basically I want to study the activation kinetics of potassium channels. When I fit the data to a single exponential equation, the fitted curves show up as an overlay on the original trace as a blue line. I want to save that exact window, and the cursor positions so I can review it as needed. Is there any way I can do that?

    Like

    1. Hello Sucheta,Thanks! Happy to hear you found the blog post useful. I am not aware that you can save the analysis window with the fitting curves, but please let me know if you find out, and I will add it to the post. The alternative would be to save the fitting results (Analyze > Fitting results…) so you can always replicate the analysis. Additionally, you can save the position of the cursors for all files (View > Windows Defaults > Save selected Analysis window as default) or save a new file with only the region of interest (Save as… Options: Between cursors 1, 2) so you can fit the traces again more quickly. Finally, I added to the blog post (“More export options”) the only way I can think of to export the fitted traces. Hope this helps.

      Like

Leave a comment