Permalink
Browse files

Filling up README and provided a copy of Singularity

Singularity came from heudiconv 1397c2bbd041d5e1970d0faa4eeaac3492a2b9a7
(in a branch on smaug)
  • Loading branch information...
yarikoptic committed Feb 5, 2018
1 parent b38b194 commit 8eb3541dd969487899dba64858d25f1960022d22
Showing with 138 additions and 3 deletions.
  1. +1 −1 LICENSE
  2. +64 −2 README.md
  3. +73 −0 Singularity
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 Center for Reproducible Neuroimaging Computation
Copyright (c) 2016-2018 Center for Reproducible Neuroimaging Computation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,2 +1,64 @@
# reproin
A setup for automatic generation of shareable, version-controlled BIDS datasets from MR scanners
# ReproIn
This project is a part of the ReproNim.org suite. Its goal is to provide a
turnkey flexible setup for automatic generation of shareable,
version-controlled BIDS datasets from MR scanners. To not reinvent the wheel,
all actual software development is largely done through contribution to
existing software projects:
- [HeuDiConv](https://github.com/nipy/heudiconv) -
a flexible DICOM converter for organizing brain imaging data into structured
directory layouts.
ReproIn [heuristic] was developed and now is shipped within HeuDiConv,
so it could be used independently of the ReproIn setup on any HeuDiConv
installation (specify `-f reproin` to heudiconv call).
- [DataLad](http://datalad.org):
a modular version control platform and distribution for both code and
data. DataLad support was contributed to HeuDiConv, and could be
enabled by adding `--datalad` option to the `heudiconv` call.
The recommended invocation for the heudiconv is
```shell
$ heudiconv -c dcm2niix -f reproin --bids --datalad -o OUTPUT --files INPUT
```
to convert all found in `INPUT` DICOMs and place then within the
hierarchy of DataLad datasets rooted at `OUTPUT`.
## Specification
The header of the [heuristic] file describes details of the
specification on how to organize and name study sequences at MR console.
## Sample converted datasets
You could find sample datasets with original DICOMs
- [///dbic/QA](http://datasets.datalad.org/?dir=/dbic/QA) is a publicly
available DataLad dataset with historical data on QA scans from DBIC.
You could use DICOM tarballs under `sourcedata/` for your sample
conversions.
TODO: add information from which date it is with scout DICOMs having
session identifier
- [///dicoms/dartmouth-phantoms](http://datasets.datalad.org/?dir=/dicoms/dartmouth-phantoms)
provides a collection of datasets acquired at [DBIC] to establish
ReproIn specification. Some earlier accessions might not be following
the specification.
[bids_test4-20161014](http://datasets.datalad.org/?dir=/dicoms/dartmouth-phantoms/bids_test4-20161014)
provides a basic example of multi-subject and multi-session acquisition.
## Containers
This repository provides a [Singularity](./Singualarity) environment
definition file used to generate a complete environment needed to run
a conversion
## TODOs/WiP
- [ ] adding pre-configured DICOM received for fully turnkey deployments
- [ ] [heudiconv-monitor] to fully automate conversion of the incoming
data
- [ ] [BIDS dataset manipulation helper](https://github.com/INCF/bidsutils/issues/6)
[heuristic]: https://github.com/nipy/heudiconv/blob/master/heudiconv/heuristics/reproin.py
[heudiconv-monitor]: https://github.com/nipy/heudiconv/blob/master/heudiconv/cli/monitor.py
@@ -0,0 +1,73 @@
# Copyright (c) 2015-2016, Gregory M. Kurtzer. All rights reserved.
#
# Changes for NeuroDebian/ReproIn setup are Copyright (c) 2017-2018 Yaroslav Halchenko.
#
# The purpose of the environment is to provide a complete suite for running
# heudiconv on the INBOX server to provide conversion into BIDS layout.
# ATM it does not ship heudiconv itself which would be accessed directly
# from the main drive for now.
#
# "Singularity" Copyright (c) 2016, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
#
# Notes:
# - Due to https://github.com/singularityware/singularity/issues/471
# bootstrapping leads to non-usable/non-removable-without-reboot
# image due to some rogue run away processes.
# This line could help to kill them but should be used with caution
# since could kill other unrelated processes
#
# grep -l loop /proc/*/mountinfo | sed -e 's,/proc/\(.*\)/.*,\1,g' | while read pid; do sudo kill $pid; done
# Changes/version
# 0.0.20180205
# - Rebuilt to update dcm2niix etc
# - Boosted bids-validator version to 0.25.6
# 0.0.20170928
# - require current bids validator 0.23.2, but in general regenerate to update datalad and dcm2niix
# - install dcmtk for dcmdump
BootStrap: debootstrap
#OSVersion: stable
# needs nipype 0.12.1 but that one didn't build for stable since needs python-prov...
# so trying stretch
OSVersion: stretch
MirrorURL: http://ftp.us.debian.org/debian/
# so if image is executed we just enter the environment
%runscript
echo "Welcome to the ReproIn (AKA formerly DBIC-BIDS) environment"
/bin/bash
%post
echo "Configuring the environment"
apt-get update
apt-get -y install eatmydata
eatmydata apt-get -y install vim wget strace time ncdu gnupg curl procps
wget -q -O/tmp/nd-configurerepo https://raw.githubusercontent.com/neurodebian/neurodebian/4d26c8f30433145009aa3f74516da12f560a5a13/tools/nd-configurerepo
bash /tmp/nd-configurerepo
chmod a+r -R /etc/apt
eatmydata apt-get -y install git-annex-standalone datalad python-nipype virtualenv dcm2niix python-dcmstack python-configparser python-funcsigs python-pytest dcmtk
# for bids-validator
# not present in stretch, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857986
# eatmydata apt-get install -y npm
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
eatmydata apt-get install -y nodejs
npm install -g bids-validator@0.25.6
chmod a+rX -R /usr/lib/node_modules/
chmod a+rX -R /etc/apt/sources.list.d
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
apt-get clean
# and wipe out apt lists since not to be used RW for further tuning
# find /var/lib/apt/lists/ -type f -delete
# /usr/bin/find /var/lib/apt/lists/ -type f -name \*Packages\* -o -name \*Contents\*
# complicates later interrogation - thus disabled
# Create some bind mount directories present on rolando
mkdir -p /afs /inbox
chmod a+rX /afs /inbox

0 comments on commit 8eb3541

Please sign in to comment.