Git Product home page Git Product logo

giocomo-lab-to-nwb's Introduction

giocomo-lab-to-nwb

NWB conversion scripts and tutorials. A collaboration with Giocomo Lab.

Install

To clone the repository and set up a conda environment, do:

$ git clone https://github.com/ben-dichter-consulting/giocomo-lab-to-nwb.git
$ conda env create -f giocomo-lab-to-nwb/make_env.yml
$ source activate giocomo_lab_nwb

Alternatively, to install directly in an existing environment:

$ pip install giocomo-lab-to-nwb

To install the ndx-labmetadata-giocomo extension:

$ pip install git+https://github.com/ben-dichter-consulting/ndx-labmetadata-giocomo.git

Use

After activating the correct environment, the conversion function can be used in different forms:

1. Imported and run from a python script:
Here's an example: we'll grab SpikeGLX data from .imec0.ap.bin files and convert it to a .nwb file.

from giocomo_lab_to_nwb.conversion_tools.conversion_module import conversion_function
import yaml

# Nwb file
f_nwb = 'output_glx.nwb'

# Source files
source_paths = {}
source_paths['spikeglx data'] = {'type': 'file', 'path': 'G4_190620_keicontrasttrack_10secBaseline1_g0_t0.imec0.ap.bin'}
source_paths['processed data'] = {'type': 'file', 'path': 'npI5_0417_baseline_1.mat'}

# Load metadata from YAML file
metafile = 'metafile.yml'
with open(metafile) as f:
   metadata = yaml.safe_load(f)

conversion_function(source_paths=source_paths,
                    f_nwb=f_nwb,
                    metadata=metadata,
                    add_spikeglx=True,
                    add_processed=False)

2. Command line:
Similarly, the conversion function can be called from the command line in terminal:

$ python conversion_module.py [imec_bin_file] [output_file] [metadata_file]

3. Graphical User Interface:
To use the GUI, just run the auxiliary function nwb_gui.py from terminal:

$ python nwb_gui.py

The GUI eases the task of editing the metadata of the resulting .nwb file, it is integrated with the conversion module (conversion on-click) and allows for visually exploring the data in the end file with nwb-jupyter-widgets.


4. Tutorial:
At tutorials you can also find Jupyter notebooks with the step-by-step process of conversion.

giocomo-lab-to-nwb's People

Contributors

bendichter avatar codycbakerphd avatar h-mayorquin avatar kristinquick avatar luiztauffer avatar saksham20 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

giocomo-lab-to-nwb's Issues

error when running GUI

error when running gui:

$ python giocomo_lab_to_nwb/conversion_tools/nwb_gui.py
Traceback (most recent call last):
  File "giocomo_lab_to_nwb/conversion_tools/nwb_gui.py", line 5, in <module>
    from nwbn_conversion_tools.gui.nwbn_conversion_gui import nwbn_conversion_gui
ModuleNotFoundError: No module named 'nwbn_conversion_tools.gui.nwbn_conversion_gui'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.