SEEK Pipeline (Stereotactic ElectroEncephalography Kit)
This repo describes Sarma/Crone lab effort to pipeline explicitly a neuroimaging data workflow that involves T1 MRI, CT, and iEEG data (ECoG, or SEEG).
For incorporation of DTI data, see ndmeg.
Features
- [ ] Add support for MRICloud running using R-script. Possibly convert to Python script.
- [ ] Create unit and integration tests using pytest that test: pipeline in both snakemake and Python
Setup and Installation
See installation. SEEK uses the Snakemake workflow management system to create the different workflows. We chose this because it is easy to run individual workflows, as well as an entire workflow from the command line.
Docker
Setup: Note that the docker container names are:
seek_reconstruction seek_localization # tbd seek_visualization # tbd
To setup the container in your system:
docker-compose up --build
In another terminal run the pipeline commands.
# turn image to containeer docker run -v $PWD/Data:/data -it -e bids_root=/data -e derivatives_output_dir=/data/derivatives --rm neuroimg_pipeline_reconstruction bash
For running individual pipelines, see INSTALLATION GUIDE.
Creating persistent volumes
If one wants to make a persistent data volume that reflects changes in the Docker container running Snakemake workflows,
then one can just make a Data/
directory inside this repository. Then add in sourcedata. This
directory serves as the BIDS root of the workflows.
Electrode localization (Bioimage suite)
Run localization container:
docker-compose run localization ./start_bioimagesuite
Data Organization
We use BIDS. See https://github.com/bids-standard/bids-starter-kit/wiki/The-BIDS-folder-hierarchy
Before data is converted to BIDS in seek/pipeline/01-prep
pipeline,
then sourcedata/
should contain a semi-structured format of the neuroimaging data that will
be put through the workflow.
sourcedata/ /{subject}/ - premri/*.dcm - posmri/*.dcm - postct/*.dcm
Note Currently this "structured" format of the sourcedata is needed in order to run the Snakemake pipeline, since we have hardcoded where to look for the initial dicoms. In the future, we are hoping to abstract this away and also allow for multiple scans.
Pipeline Description
At a high level, this pipeline is taking neuroimaging data of a patient to produce usable data about the brain's geometry, regional parcellation into atlas regions, connectivity between brain regions measured by white matter tracts, and channel localization in MRI space.
See PIPELINE GUIDE
Semi-Automated Localizing Electrodes Process
Localizing SEEG electrodes requires at least two contacts on each electrode to initialize the algorithm. These can be say the deepest 2 contacts, or the entry point and target point (e.g. first and last contact on the electrode).
For ECoG data, we do not explicitly have a process outlined, but these are significantly easier since grids can be easily interpolated.
Contributing
See Contribution Guide. We are always looking for contributors, whether it is an example or successful use case of the pipeline, extending the pipeline with additional rules, or contributing documentation.