This repository is for taking data as BIDS and uploading it to an NDA collection.
The full documentation lives here: ndabids.readthedocs.io
# Clone the repository with submodules
git clone --recursive https://github.com/nimh-dsst/nda-bids-upload.git
cd nda-bids-upload
# Install with uv (recommended)
uv pip install -e .
# Or with pip
pip install -e .For detailed installation instructions, see INSTALL.md.
-
Create a lookup.csv file to map BIDS subject/sessions to NDA GUID's
# Run the script directly python -m utilities.lookup <source_dir> <destination_dir> # Or use the installed command nda-lookup <source_dir> <destination_dir>
If you have your GUID's ready and want to enter them immediately you can append the
--edit-nowflag to the above command:nda-lookup <source_dir> <destination_dir> --edit-now
-
Create file mapper json's and NDA Yaml files:
# Run the script directly python -m utilities.mapping <source_dir> <destination_dir> # Or use the installed command nda-mapping <source_dir> <destination_dir>
This produces mapper JSONs and YAMLs per BIDS datatype (e.g. anat, pet) and also image03_sourcedata.bids.toplevel (top-level BIDS files only: README, dataset_description.json, participants.tsv, etc.) for NDA image03 upload.
-
Use file mapper and nda manifests tool to create packages for uploading to NDA:
# Prepare data for NDA upload python prepare.py -s <source_dir> -d <destination_dir> # Or use the installed command nda-prepare -s <source_dir> -d <destination_dir>
This package includes:
- NDAR/manifest-data: Git submodule providing the
nda_manifests.pyscript - bendhouseart/file-mapper: Git dependency for file mapping operations
- Standard Python packages: mkdocs-material, PyYAML, pandas
All dependencies are managed via pyproject.toml for easy installation with uv or pip.