Skip to main content

Converts electrophysiology, photometry, and behavioral data for the hex maze task used by the Berke Lab at UCSF to NWB format for sharing and analysis.

Project description

jdb_to_nwb

Converts electrophysiology, photometry, and behavioral data for the hex maze task used by the Berke Lab at UCSF to NWB format for sharing and analysis.

User Note

This repository is currently in development and should not be treated as a final/working version of an NWB conversion pipeline. Expect the code to change significantly before this pipeline is ready for regular use.

Installation

git clone https://github.com/calderast/jdb_to_nwb.git
cd jdb_to_nwb
pip install -e .

Current usage

  1. Copy tests/metadata_example.yaml to the root directory of the repository:
cp tests/metadata_example.yaml .
  1. Open metadata_example.yaml in a text editor. Update the paths to point to your data and update the metadata for your experiment.

  2. Run the conversion to generate an NWB file (replace output_dir with your desired output directory). The nwb file will be automatically named based on the animal name and date (i.e. rat_date.nwb):

jdb_to_nwb metadata_example.yaml output_dir
  1. Sub-directories for associated figures and conversion log files will be created alongside the nwb file in output_dir. Check that there are no errors in the error log file and that all figures look as expected.

Downloading test data

The large test data files are stored in a shared UCSF Box account. To get access to the test data, please contact the repo maintainers.

Create a new file called .env in the root directory of the repository and add your Box credentials:

BOX_USERNAME=<your_box_username>
BOX_PASSWORD=<your_box_password>

Or set the environment variables in your shell:

export BOX_USERNAME=<your_box_username>
export BOX_PASSWORD=<your_box_password>

Then run the download script:

python tests/download_test_data.py

You can pass the --overwrite flag to overwrite existing files:

python tests/download_test_data.py --overwrite

Notes:

  • Run python tests/test_data/create_raw_ephys_test_data.py to re-create the test data for raw_ephys.
  • Run python tests/test_data/create_processed_ephys_test_data.py to re-create the test data for processed_ephys.
  • tests/test_data/processed_ephys/impedance.csv was manually created for testing purposes.
  • tests/test_data/processed_ephys/geom.csv was manually created for testing purposes.
  • Some files (settings.xml, structure.oebin) nested within tests/test_data/raw_ephys/2022-07-25_15-30-00 were manually created for testing purposes.

The GitHub Actions workflow (.github/workflows/test_package_build.yml) will automatically download the test data and run the tests.

Versioning

Versioning is handled automatically using hatch-vcs using the latest tag in the git history as the version number. To make a new release, simply tag the current commit and push to the repository. Use semantic versioning to set the version number. Create a GitHub release using the tag.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jdb_to_nwb-1.0.0.tar.gz (16.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jdb_to_nwb-1.0.0-py3-none-any.whl (14.5 MB view details)

Uploaded Python 3

File details

Details for the file jdb_to_nwb-1.0.0.tar.gz.

File metadata

  • Download URL: jdb_to_nwb-1.0.0.tar.gz
  • Upload date:
  • Size: 16.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for jdb_to_nwb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 65b652f67e341aa4278371ce2d8c5a6130c1bb9c20ec0dfd0c8ffa97ee1c76a8
MD5 f685b57558290d382ae61dcd4595ae4f
BLAKE2b-256 1467188f4a3f04a9611a00653c8ee40370e44bd02406785b8c8568e6ab8a1bb8

See more details on using hashes here.

File details

Details for the file jdb_to_nwb-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jdb_to_nwb-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for jdb_to_nwb-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97282a4b806bcf429608c331a57cb6939a0f3c9f993f6ff0c208a477271a0c06
MD5 eeef24c5bee36a7ada42b3ff19c0c8f0
BLAKE2b-256 ebdfea731f8a83bd7c44757be6e21996275407892903e34bcb392fad509c04cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page