Package 'readABF'

Title: Loads Axon Binary Files
Description: Loads Axon Binary Files (both 'ABF' and 'ABF2') created by Axon Instruments/Molecular Devices software such as 'pClamp'.
Authors: Stanislav Syekirin [aut, cre], Florian Pein [ctb]
Maintainer: Stanislav Syekirin <[email protected]>
License: GPL-3
Version: 1.0.2
Built: 2025-03-01 05:21:20 UTC
Source: https://github.com/zabolekar/readabf

Help Index


Loads Axon Binary Files

Description

Loads Axon Binary Files (both 'ABF' and 'ABF2') created by Axon Instruments/Molecular Devices software such as 'pClamp'.

Details

Reads ABF2 files, created by pClamp 10 and newer, and ABF files, created by pClamp 9 and older. Currently, code is tested under Linux only. For this purpose, multiple data sets are used which cannot be included in the package. We would very much appreciate to receive further data sets for testing purposes. A repository to upload data sets can be provided at request. Index of help topics:

as.data.frame.ABF       Coerces an ABF Object to a Data Frame
plot.ABF                Plots an ABF Object
print.ABF               Prints a Short Description of an ABF Object
readABF                 Reads ABF Files
readABF-package         Loads Axon Binary Files

Acknowledgements

  • Support of Deutsche Forschungsgemeinschaft grant SFB 803 Z2 is gratefully acknowledged.

  • abfload by Harald Hentschke, Forrest Collman and Ulrich Egert was an important source of information.

  • abf2 by Matthew Caldwell was a useful starting point.

  • We would like to thank Harald Hentschke and his sources and the lab of Claudia Steinem for providing test data.


Coerces an ABF Object to a Data Frame

Description

S3 method to coerce an ABF object to a data frame.

Usage

## S3 method for class 'ABF'
as.data.frame(x, row.names = NULL, optional = FALSE, ..., sweep = NULL,
type = c("all", "one"), channels, unit = NULL)

Arguments

x

an object of class ABF, typically generated by readABF.

row.names, optional, ...

further arguments in case they are passed from other methods; they will be ignored.

sweep

an integer, indicating which sweep should be coerced; required in case of multiple sweeps, otherwise ignored.

type

a string specifying the return value, see ‘Value’.

channels

an integer vector of length one or two; required if type == "one", otherwise ignored, see ‘Value’.

unit

a string, specifying the unit of one, if NULL unit will be determined by units in x; ignored if type == "all" or length(channels) == 1

Value

A data.frame. The first column always contains the time which is calculated from the sampling interval. The earliest data point is believed to be at time 1 divided by the sampling rate.

Column names are accompanied by their units.

If type == "all", all channels are added to the resulting data frame. Their units are copied from the ABF object.

If type == "one", the resulting data frame only contains the time (see above) and one additional column with the actual data, whereby channels, a vector of integers, specifies what to read. If channels contains one index, then that channel is used for the data column. If channels contains two indices, then the data of the first channel is divided by the data of the second channel. This might be for instance helpful to obtain conductance by dividing a channel containing current values by a channel containing voltage values. The unit of the data column is either provided by unit or, if not provided, the ratio of the two units (as read from the ABF object) is given.

Examples

# loads an example file and coerces its first sweep to data frame
r <- readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))
as.data.frame(r, sweep=1)

Plots an ABF Object

Description

S3 method to plot ABF objects. Converts the ABF object to a data frame and then plots the data frame.

Usage

## S3 method for class 'ABF'
plot(x, pch = ".", ..., sweep = 1, type = c("all", "one"),
channels, unit = NULL)

Arguments

x

an object of class ABF, typically generated by readABF.

pch

same as pch from par.

...

further arguments that will be passed to plot.

sweep, type, channels, unit

arguments that will be passed to as.data.frame.ABF.

See Also

as.data.frame.ABF

Examples

# loads an example file and plots its first sweep
r <- readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))
plot(r, sweep=1)

# leads to the same result
plot(as.data.frame(r, sweep=1), pch = ".")

Prints a Short Description of an ABF Object

Description

Prints information about an ABF object and returns it invisibly. This helps to identify the dataset but does not overwhelm the user with the raw data.

Usage

## S3 method for class 'ABF'
print(x, ...)

Arguments

x

an object of class ABF, typically generated by readABF.

...

further arguments in case they are passed from other methods; they will be ignored.

Examples

# loads an example file and prints it
r <- readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))
print(r)

Reads ABF Files

Description

Reads ABF2 files, created by pClamp 10 and newer, and ABF files, created by pClamp 9 and older.

Usage

readABF(file)

Arguments

file

character vector, containing the file name or path.

Value

an ABF object, i.e. a list containing the data and other information like the header.

See Also

as.data.frame.ABF, plot.ABF, print.ABF

Examples

## reads an example file
readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))