Skip to content
/ seek Public

(Stereotatic ElectroEncephalography Kit) Run reconstruction, co-registration, electrode localization and surface/atlas rendering for iEEG, T1 MRI and CT data.

License

Notifications You must be signed in to change notification settings

ncsl/seek

Repository files navigation

SEEK-Pipeline (Stereotactic ElectroEncephalography Kit)

CircleCI GitHub Actions Build Status Code style: black GitHub repo size DOI Snakemake Gitter

This repo describes efforts to pipeline explicitly a neuroimaging data workflow that involves T1 MRI, CT, and iEEG data (ECoG, or SEEG). For ECoG data, we do not explicitly have a process outlined, but these are significantly easier since grids can be easily interpolated. See Fieldtrip Toolbox.

We build and keep up-to-date a number of Dockerfiles to run various workflows:

  • acpcdetect:
Docker Image Size (tag)
  • blender:
Docker Image Size (tag)
  • FreeSurfer7+ with MRTrix3:
Docker Image Size (tag)

Note: For FSL, we use a 3rd party docker image.

Documentation

To see the entire documentation, see http://neuroseek.azurewebsites.net/docs/seek/

  • For a detailed description of the overall SEEK workflow, see workflow documentation.
  • For a detailed description of the SEEK workflow of contact localization, specifically localizing the 2 points per electrode, see localization guide

For a description of the visualization engine, see: https://github.com/cronelab/ReconstructionVisualizer

Setup and Installation

See INSTALLATION GUIDE for full instructions. SEEK uses the Snakemake workflow management system to create different workflows. We chose this because it is easy to run individual workflows, as well as an entire workflow from the command line. The full repository is set up similar to the cookiecutter Snakemake file: cookiecutter gh:snakemake-workflows/cookiecutter-snakemake-workflow.

The workflows start from dicom files for the T1 MRI image and CT image with the implanted electrodes. The snakemake workflows then automate the naming and computations to get to anatomically labeled electrodes that also can be fed into a visualization engine.

The recommended installation is via Docker. See here for instructions on running workflows in the container are shown here below:

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

Running workflows using Docker and Snakemake

To run snakemake workflows using Docker, we have implemented various Makefile recipes. First, you need to change directory to the correct workflow and then run snakemake with some arguments to bind directories to the singularity container. For example

snakemake --cores 1 --use-singularity --singularity-args "--bind ~/hdd/epilepsy_bids/,~/Documents/seek/";

where, you can alter the cores used, and also bind various directories. See Makefile for more details on the following recipes:

  • snakemake-all
  • recon
  • prep-localization
  • coregistration
  • prep-viz

You will need to alter the bind paths to your specific BIDS root directory and SEEK repository directory.

Development

Seek was created and is maintained by Adam Li. It is also maintained and contributed by Christopher Coogan and other researchers in the NCSL and Crone lab. Contributions are more than welcome so feel free to contact me, open an issue or submit a pull request! See the :doc:`contribution guide <./doc/contributing>`.

To report a bug, please visit the GitHub repository.

Note that this program is provided with NO WARRANTY OF ANY KIND. If you can, always double check the results with a human researcher, or clinician.

How to cite SEEK?

If you want to cite Seek, please use the Zenodo for the repository.

Acknowledgement

Several functions of Seek essentially make use of existing software packages for neuroimaging analysis, including:

FAQ

  1. For incorporation of DTI data, see ndmeg.

Developer Note: Creating persistent volumes in Docker

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.

About

(Stereotatic ElectroEncephalography Kit) Run reconstruction, co-registration, electrode localization and surface/atlas rendering for iEEG, T1 MRI and CT data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published