jay.read.spikes: Read in the .txt file from Neuroexplorer and create a...

Description Usage Arguments Value METHOD References See Also Examples

Description

Read in .txt file and work out array positions...

Usage

1
2
jay.read.spikes(filename, ids, time.interval, beg, end, min.rate)
read.spikes(reader, ...)

Arguments

filename

Name of the text file to be read in.

ids

Optional vector of cell numbers that can be analysed, rather than analysing all electrodes in the recording. Warning: Not implemented in all readers.

time.interval

Bin width (in seconds) for estimating firing rate. Defaults to 1 second.

beg

Optional start time.

end

Optional end time.

min.rate

Optional minimal firing rate for an electrode to be accepted.

reader

Name of the reader function to use.

...

Remaining arguments that are passed to the appropriate reader.

Value

Return the data structure 's'.

METHOD

No fancy tricks used here. If the data file has information about N different spike trains, the file has N (tab-separated) columns. Each column then gives the time (in seconds?) of each spike. Different columns are of different lengths since typically each cell will have a different number of spikes.

The txt file of spike times can be compressed (with gzip).

read.spikes() is a wrapper around each xyz.read.spikes() function, so that they can all be called just by specifying reader='xyz'. Current readers are: "feller", "iit", "litke", "ncl", "sanger", "sun", "jay", "sql".

By default, all spikes are read in. If beg is given, only spikes occuring after this time (in seconds) are kept. Likewise, if end is given, only spikes occuring before this time (in seconds) are kept.

References

No references here.

See Also

sanger.read.spikes, feller.read.spikes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data.file <- system.file("examples", "P9_CTRL_MY1_1A.txt",
                         package = "sjemea")
s <- jay.read.spikes( data.file)
fourplot(s)
s <- jay.read.spikes(data.file, beg=400, end=700)
fourplot(s)
s2 <- read.spikes(data.file, beg=400, end=700, reader='jay')
## Not run: 
s <- jay.read.spikes("~/ms/jay/p9data.txt")
fourplot(s)                             #summary plot.
s$mi <- make.mi(s)
show.prob.t.r(s)                        #conditional distributions.

## End(Not run)

## Not run: crosscorrplots(s, autocorr=T, tmax=3, nbins=100,
               xcorr.nrows=3, xcorr.ncols=3) #plot autocorrs on screen

## Plotting just one cross-correlogram is a slightly different matter:
xcorr.plot( s$spikes[[1]], s$spikes[[2]], "1 v 2")
## End(Not run)

sjemea documentation built on May 2, 2019, 5:43 p.m.