Skip to content

neurohackweek/niprov-nhw16

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Niprov

Neurohackweek 2016

Jasper J.F. van den Bosch

Slides at neurohackweek.github.com/niprov-nhw16

Setup python environment

virtualenv env
source env/bin/activate
pip install -U pip

Download sample data

wget https://github.com/ilogue/niprov/archive/master.zip
unzip master.zip
cd niprov-master

Install Niprov

pip install niprov

Optional packages

pip install -r optional.txt # pydicom nibabel mne matplotlib

Why niprov?

  • reproducibility
  • need story, metadata of brain images
  • provenance: history, origin of a file
  • NeuroImaging Provenance

Commandline API

provenance -h
provenance discover ./testdata
provenance export
provenance export --file testdata/parrec/T1.PAR
provenance record "parrec2nii testdata/parrec/T1.PAR" --parent testdata/parrec/T1.PAR --new T1.nii
provenance record "mcflirt -in T1.nii -out T1_reg.nii.gz"
provenance export --file T1_reg.nii.gz

Web browser

provenance serve

Python API

from niprov import ProvenanceContext
provenance = ProvenanceContext()

for image in provenance.get().bySubject('05aug14test'):
    image.viewSnapshot() 

# Make sure two files were acquired with the same parameters:
img1.compare(img2).assertEqual()

Configuration

cp niprov.cfg ~/niprov.cfg
gedit ~/niprov.cfg

About

Neurohackweek 2016 niprov "slides"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published