ImportCollection: Imports a collection of electrophysiology recordings

View source: R/ImportCollection.R

ImportCollectionR Documentation

Imports a collection of electrophysiology recordings

Description

[Stable]
Imports a collection of electrophysiology recordings. All files in one condition must be acquired using the same recording protocol. I.e. the number of traces/channels, data points per sweep and number of sweeps must be identical.

Usage

ImportCollection(
  filelist = NULL,
  traces = c(1, 2),
  parent.dir = "",
  filetype = NULL,
  verbose = FALSE,
  encoding = getOption("encoding")
)

Arguments

filelist

A data.frame. If importing from Patch Master .dat files, it must contain the following three columns: "FileName","Experiment","Series". FileName can be an absolute path or relative to parent.dir. "Experiment","Series" correspond to the second and third order hierarchy in the PatchMaster file tree. If importing from Axon Binary (.abf) files, a single column "FileName" is sufficient. An optional column is "Group" and can be used to assign the individual recordings into groups

traces

Index or indices of Traces/channels to import. The trace is the 3rd order hierarchy in PatchMaster file tree. Must be vector of numeric of length > 0. Default is c(1,2).

parent.dir

Parent directory where to search for FileNames from filelist. Optional if no full path is provided in filelist.

filetype

The type of the files to be imported. Accepted values are 'PatchMaster' or 'ABF' If left blank (default), it will be guessed from the extension of the first file in list

verbose

Whether to display verbose messages during the import process. Default is FALSE.

encoding

File encoding to use, default is getOption("encoding")

Value

A PCollection object

See Also

PRecording, ImportPRecording

Examples

## Not run: 
rec.df<-data.frame("/path/to/file.dat",1,1)
colnames(rec.df)<-c(("FileName","Experiment","Series"))
tmp<-ImportCollection(rec.df,traces = c(1,2))

## End(Not run)

moritzlindner/PatchR documentation built on April 30, 2024, 1:40 a.m.