Skip to content

Startup_Install_Demo

Max-Home-Tower edited this page Jul 1, 2020 · 1 revision

Demo Script and Data

An example script illustrating a typical use-case for nigeLab on a small subset of data recorded from experiments at KUMC is available in ePhys_packages/+nigeLab/setup/demo. The script demo_nigeLab.m shows how you might call nigeLab methods from the Command Window or your own script to facilitate handling your data.


Running demo_nigeLab.m

If you are new to Matlab, in order to run demo_nigeLab.m, navigate your Matlab Editor so that the Current Folder path is set to wherever ePhys_packages/+nigeLab/setup/demo is located on your computer. Double-click demo_nigeLab.m, then click the Editor tab at the top of the window. Clicking the green Run play-button will start the script, executing the following tasks:

  1. unzip myTank.zip. This file contains .rhs data (recorded with an Intan 128ch Stimulation/Recording Controller) from two animals during different experimental phases.
  2. create a new folder called myTank_analysis that will be used as destination folder for all the analysis performed by nigeLab.
  3. create a tank object.
  4. extract raw data and save it in the corresponding folder.
  5. Perform multi-unit bandpass filter for spike detection for all Animals and Blocks within Tank.
  6. Perform common-average re-reference (CAR) for all Animals and Blocks within Tank.
  7. Perform spike detection and feature extraction (wavelet decomposition)
  8. downsample raw data to perform local field potential (LFP) analysis

Interpreting outputs of demo_nigeLab.m

Disk Files

The script unzips a small directory with 2 Animals and 9 experimental recordings in total, so there should now be some more folders in the demo path. It also ran some pre-processing on the extracted binary files to organize them in a format that nigelab understands. If you go into the extracted folders, you can see what the hierarchical format of nigeLab looks like. In addition, nigeLab saves .mat files corresponding to Tank, Animal, and Block objects so that they are easy to restore if you accidentally clear your workspace memory. nigeLab also puts small .nigelTank, .nigelAnimal, and .nigelBlock text files at each level to denote that the contents of a given folder correspond to a Tank, Animal, or Block.

Notes

  1. The _Tank.mat file will be located one level above the .nigelTank file, due to the saving convention we implemented.
  2. nigeLab requires a consistent file naming convention, otherwise it would be impossible to organize your data effectively. Depending on how you choose to name your files, it is easier for nigeLab to parse metadata from the filenames and incorporate that metadata into downstream methods. For more information about choosing a good naming convention, see our guide to naming your experiments.
  3. For more-specific information about setting up your own naming conventions in nigeLab, see how nigeLab parses metadata from file names.

Objects in Matlab Base Workspace

The variable myTank is a nigeLab.Tank object. It "contains" 2 Animals (referenced in myTank.Animals property). These animals are reflected in the folders located inside the myTank folder. you will find 2 Animals:

  • Animal 1 ID = R19-94
    • 4 experimental recordings
  • Animal 2 ID = R19-101
    • 5 experimental recordings

In this case, each recording corresponds to a 2-second epoch that is temporally "centered" on a synchronized cutaneous stimulus at a fixed location on the rat's distal forelimb.

Clone this wiki locally