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 |
Loads Axon Binary Files (both 'ABF' and 'ABF2') created by Axon Instruments/Molecular Devices software such as 'pClamp'.
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
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.
S3 method to coerce an ABF
object to a data frame.
## S3 method for class 'ABF' as.data.frame(x, row.names = NULL, optional = FALSE, ..., sweep = NULL, type = c("all", "one"), channels, unit = NULL)
## S3 method for class 'ABF' as.data.frame(x, row.names = NULL, optional = FALSE, ..., sweep = NULL, type = c("all", "one"), channels, unit = NULL)
x |
an object of class ABF, typically generated by |
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 |
unit |
a string, specifying the unit of one, if |
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.
# 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)
# 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)
S3 method to plot ABF
objects. Converts the ABF object to a data frame and then plots the data frame.
## S3 method for class 'ABF' plot(x, pch = ".", ..., sweep = 1, type = c("all", "one"), channels, unit = NULL)
## S3 method for class 'ABF' plot(x, pch = ".", ..., sweep = 1, type = c("all", "one"), channels, unit = NULL)
x |
an object of class ABF, typically generated by |
pch |
same as |
... |
further arguments that will be passed to |
sweep , type , channels , unit
|
arguments that will be passed to |
# 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 = ".")
# 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 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.
## S3 method for class 'ABF' print(x, ...)
## S3 method for class 'ABF' print(x, ...)
x |
an object of class ABF, typically generated by |
... |
further arguments in case they are passed from other methods; they will be ignored. |
# loads an example file and prints it r <- readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF")) print(r)
# loads an example file and prints it r <- readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF")) print(r)
Reads ABF2 files, created by pClamp 10 and newer, and ABF files, created by pClamp 9 and older.
readABF(file)
readABF(file)
file |
character vector, containing the file name or path. |
an ABF object, i.e. a list
containing the data and other information like the header.
as.data.frame.ABF
, plot.ABF
, print.ABF
## reads an example file readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))
## reads an example file readABF(system.file("extdata", "2009_01_19_0002_varlen_v18.abf", package="readABF"))