Skip to content

Commit

Permalink
Modifying readme
Browse files Browse the repository at this point in the history
  • Loading branch information
theilmbh committed May 12, 2016
1 parent 212a19c commit 63de553
Showing 1 changed file with 38 additions and 37 deletions.
75 changes: 38 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,43 @@ scripts and utilities for processing electrophysiology data
[![Build Status](https://travis-ci.org/gentnerlab/ephys-analysis.svg?branch=master)](https://travis-ci.org/gentnerlab/ephys-analysis)
[![Coverage Status](https://coveralls.io/repos/github/gentnerlab/ephys-analysis/badge.svg?branch=master)](https://coveralls.io/github/gentnerlab/ephys-analysis?branch=master)

## Quick introduction

These scripts are designed to operate on the data after manually sorting the phy output and mergining stimuli information. As a result, everything that follows assumes that:
- you have sorted your data with phy
- you have manually sorted your data with the phy gui
- you have merged events into your kwik file with merge_stim_kwik

Data analysis functions are divided into logically separate components.
We have strived to maintain well documented code, so you won't find detailed escriptions of the functions here. Go to the code and read the docstrings for the functions to get more specifics.
- 'core' contains routines for loading the data and metadata, such as sampling rate.
- 'events' contains routines for loading trial information
- 'clust' constains routines for computing basic features of the clusters, such as waveform metrics and geometric location
- 'spiketrains' contains functions for dealing with segments of your data. You can pass parameters to describe which slice of data you wish to extract and it will return to you the spiketrain. For example, you can use the trials dataframe to find trial times, and then pass those times into 'get_spiketrain' to get the spikes during that trial
-'viz' contains routines to visualize clusters.

## input file structure

these scripts assume that they are dealing with an experiment that has been sorted by phy. an example structure is as follows:

`Pen01_Lft_AP2500_ML1350__Site10_Z2026__B997_cat_P01_S10_Epc10/` - directory containing the files. the naming convention comes from the way that ChronicScript.s2s and ExportMatlab.s2s name directories. This directory is from Penetration 1 (Left hemisphere, 2500um Anterior, 1350um Lateral), Site 10 (2026um depth), and consists of Epoch10. `B997_cat_P01_S10_Epc10` is manually named in the prompt in MatlabExport.s2s so might vary and should not be considered reliable.

Inside this directory are the following files:

`B997_cat_P01_S10_Epc10.kwik` - hdf5 file containing spike times, cluster assignments, and event times
`B997_cat_P01_S10_Epc10.kwx` - hdf5 file containing the PCA-reduced features that phy used to cluster spikes
`B997_cat_P01_S10_Epc10.raw.kwd` - hdf5 file containing the raw waveforms used by phy
`B997_cat_P01_S10_Epc10.phy` - a working directory used by phy to cache compture features and masks
`params.prm` - python file containing the parameters that phy used to detect and cluster spikes
`A1x32-Poly3-6mm-50.prb` - python-formatted probe file defining the channels and adjacency matrix used by phy

More details on these files can be found at http://phy.readthedocs.org/en/latest/kwik-format/

The directory also contains the following files generated by `make_kwd`:

`B997_cat_P01_S10_Epc10_info.json` - record of parameters used to generate raw.kwd file
`indx_port_site.txt` - csv file of raw.kwd channel mapping. columns indicate the phy index, Spike2 channel name, and neuronexus site number

## analysis architercture

what we need to be able to do
Expand Down Expand Up @@ -44,44 +81,8 @@ what Zeke also wants
3. Behavior
- trial data

## input file structure

these scripts assume that they are dealing with an experiment that has been sorted by phy. an example structure is as follows:

`Pen01_Lft_AP2500_ML1350__Site10_Z2026__B997_cat_P01_S10_Epc10/` - directory containing the files. the naming convention comes from the way that ChronicScript.s2s and ExportMatlab.s2s name directories. This directory is from Penetration 1 (Left hemisphere, 2500um Anterior, 1350um Lateral), Site 10 (2026um depth), and consists of Epoch10. `B997_cat_P01_S10_Epc10` is manually named in the prompt in MatlabExport.s2s so might vary and should not be considered reliable.

Inside this directory are the following files:

`B997_cat_P01_S10_Epc10.kwik` - hdf5 file containing spike times, cluster assignments, and event times
`B997_cat_P01_S10_Epc10.kwx` - hdf5 file containing the PCA-reduced features that phy used to cluster spikes
`B997_cat_P01_S10_Epc10.raw.kwd` - hdf5 file containing the raw waveforms used by phy
`B997_cat_P01_S10_Epc10.phy` - a working directory used by phy to cache compture features and masks
`params.prm` - python file containing the parameters that phy used to detect and cluster spikes
`A1x32-Poly3-6mm-50.prb` - python-formatted probe file defining the channels and adjacency matrix used by phy

More details on these files can be found at http://phy.readthedocs.org/en/latest/kwik-format/

The directory also contains the following files generated by `make_kwd`:

`B997_cat_P01_S10_Epc10_info.json` - record of parameters used to generate raw.kwd file
`indx_port_site.txt` - csv file of raw.kwd channel mapping. columns indicate the phy index, Spike2 channel name, and neuronexus site number

# mini-hackathon

## goals
- pull together a repository of code for common ephys analyses
- isolation quality
- spike width
- neuron location
- rasters
- PSTHs
- behavior parsing
- ensure code is well documented
- numpy docstrings (see https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt)
- everyone can learn how to branch/commit/pull-request/rebase
- maybe @MarvinT can even teach us how to do unit tests?

## assets
## Test Data

There is data to use for testing on the cube share under `ephys-example-data`. It is probably safest to copy this somewhere else for testing analysis code.

Expand Down

0 comments on commit 63de553

Please sign in to comment.