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.
Installation
git clone https://github.com/calderast/jdb_to_nwb.git
cd jdb_to_nwb
pip install -e .
Usage
-
Open
metadata_example.yamlin a text editor. Update the paths to point to your data and update the metadata for your experiment. -
Run the conversion to generate an NWB file (replace
output_dirwith 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
- 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 (Developers only)
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.pyto re-create the test data forraw_ephys. - Run
python tests/test_data/create_processed_ephys_test_data.pyto re-create the test data forprocessed_ephys. tests/test_data/processed_ephys/impedance.csvwas manually created for testing purposes.tests/test_data/processed_ephys/geom.csvwas manually created for testing purposes.- Some files (
settings.xml,structure.oebin) nested withintests/test_data/raw_ephys/2022-07-25_15-30-00were 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jdb_to_nwb-2.0.0.tar.gz.
File metadata
- Download URL: jdb_to_nwb-2.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.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7b4929fc619812b2834ba7afaffa22fa02e833973d05b9454aac2943cac435d
|
|
| MD5 |
fc7b06059802467f0c73546fd35ddbf7
|
|
| BLAKE2b-256 |
a776ed30a716add2dd398c3dfd52ef492e1213837ffa685113c22f2133f976dd
|
File details
Details for the file jdb_to_nwb-2.0.0-py3-none-any.whl.
File metadata
- Download URL: jdb_to_nwb-2.0.0-py3-none-any.whl
- Upload date:
- Size: 15.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03fe1c98395eaa5c1686fbd47a1f7af104838a92001ad665ade15cf948c51993
|
|
| MD5 |
6362bec492462bf43af0fae8ba718d63
|
|
| BLAKE2b-256 |
911ca3b428af49f6ef95f0dd56a6b069ab10ecc86e84bee7e805a5fda65cc609
|