Decentralized Management
of Digital Objects for Open Science

Adina Wagner
@AdinaKrik
Psychoinformatics lab,
Institute of Neuroscience and Medicine, Brain & Behavior (INM-7)
Research Center Jülich




Debian in Arts & Science
Slides: https://github.com/datalad-handbook/course/

Acknowledgements

Software
  • Michael Hanke
  • Yaroslav Halchenko
  • Joey Hess (git-annex)
  • Kyle Meyer
  • Benjamin Poldrack
  • 26 additional contributors
Documentation project
  • Michael Hanke
  • Laura Waite
  • 28 additional contributors
Funders

Collaborators

Perks of being a neuroscientist...

A growing culture of open data https://en.wikipedia.org/wiki/List_of_neuroscience_databases

Perks of being a neuroscientist...

A large and growing amount of open source software



... and many more!

Perks of being a neuroscientist...

Many readily available, often free, sometimes FOSS, services for data storage and collaboration
https://www.incf.org/resources/sbps

Perks of being a neuroscientist...

Work on fascinating questions with fascinating data
Dwayne Reed; commons.wikimedia.org
/wiki/File:Parasagittal_MRI_of_human_head_in
_patient_with_benign_familial_macrocephaly_prior
_to_brain_injury_(ANIMATED).gif
https://mne.tools
https://mne.tools http://trackvis.org

The good news, the bad news

Data sharing Heterogenous distribution and updating, many scientists lack data management skills
Patient data ... that's sparse & subject to strict data protection, making sharing difficult
Data analysis Reproducibility is threatened by intransparent, multi-stepped analyses¹ & unstable results across software versions²
Collaboration Few interoperable workflows across institutes, rather: isolated solutions

General underlying difficulties (distribution, updates, management, interoperability, reproducibility) also exist(ed) for software -
what can we learn?

improve scientific workflows, coming from the perspective of software distributions

"Share and treat data like software"

Version Control

  • DataLad knows two things: Datasets and files
  • A DataLad dataset is an Git repository:
    • Content and domain agnostic
    • Minimization of custom procedures or data structures (user must not lose data or data access if DataLad vanishes)
    • Uncomprimised decentralization

Version Control: Data

  • Datasets have an optional annex for (large or sensitive) data (or text/code).
  • Identity (hash) and location information is put into Git, rather than file content. The annex, and transport to and from it is managed with git-annex (git-annex.branchable.com)
    → decentralized version control for files of any size.
  • DataLad works towards wrapping Git and git-annex into a non-complex core-API (helpful for data management novices).
  • Flexibility and commands of Git and git-annex are preserved (useful for experienced Git/git-annex users).

Version Control: Nesting

  • Seamless nesting mechanisms:
    • hierarchies of datasets in super-/sub-dataset relationships
    • based on Git submodules, but more seamless
  • Overcomes scaling issues with large amounts of files
  • adina@bulk1 in /ds/hcp/super on git:master❱ datalad status --annex -r
    15530572 annex'd files (77.9 TB recorded total size)
    nothing to save, working tree clean
    (github.com/datalad-datasets/human-connectome-project-openaccess)
  • Modularizes research components for transparency, reuse, and access management

Transport logistics

  • Share data like source code
  • Datasets can be cloned, pushed, and updated from and to local paths, remote hosting services, external special remotes
  • Flexible data access management for annexed file contents based on storage location

Transport logistics

  • Disk-space aware workflows: Cloned datasets are lean (only Git):
  • $ datalad clone git@github.com:datalad-datasets/machinelearning-books.git
    install(ok): /tmp/machinelearning-books (dataset)
    $ cd machinelearning-books && du -sh
    348K	.
    $ ls
    A.Shashua-Introduction_to_Machine_Learning.pdf
    B.Efron_T.Hastie-Computer_Age_Statistical_Inference.pdf
    C.E.Rasmussen_C.K.I.Williams-Gaussian_Processes_for_Machine_Learning.pdf
    D.Barber-Bayesian_Reasoning_and_Machine_Learning.pdf
    [...]
  • annexed file's contents can be retrieved & dropped on demand:
$ datalad get A.Shashua-Introduction_to_Machine_Learning.pdf
get(ok): /tmp/machinelearning-books/A.Shashua-Introduction_to_Machine_Learning.pdf (file) [from web...]
$ datalad drop A.Shashua-Introduction_to_Machine_Learning.pdf
drop(ok): /tmp/machinelearning-books/A.Shashua-Introduction_to_Machine_Learning.pdf (file) [checking https://arxiv.org/pdf/0904.3664v1.pdf...]

Interoperability

  • DataLad is built to maximize interoperability and use with hosting and storage technology

Interoperability

  • DataLad is built to maximize interoperability and use with hosting and storage technology

Provenance capture

  • Datasets can capture dataset transformations and their cause in order to track the entire evolution and lineage of files in datasets
  • "How did this file came to be?", "What steps were undertaken to transform the raw data into the published result?", "Can you recompute this for me?"

Provenance capture

  • Basic provenance: DataLad can capture arbitrary dataset transformations (e.g., from computing analysis results) and record the cause of such a change
  • $ datalad run -m "Perform eye movement event detection"\
      --input 'raw_data/*.tsv.gz' --output 'sub-*' \
      bash code/compute_all.sh
    
    -- Git commit -- Michael Hanke < ... @gmail.com>; Fri Sep 21 22:00:47 2019
        [DATALAD RUNCMD] Perform eye movement event detection
        === Do not change lines below ===
        {
         "cmd": "bash code/compute_all.sh",
         "dsid": "d2b4b72a-7c13-11e7-9f1f-a0369f7c647e",
         "exit": 0,
         "inputs": ["raw_data/*.tsv.gz"],
         "outputs": ["sub-*"],
         "pwd": "."
        }
        ^^^ Do not change lines above ^^^
    ---
     sub-01/sub-01_task-movie_run-1_events.png | 2 +-
     sub-01/sub-01_task-movie_run-1_events.tsv | 2 +-
    ...

Provenance capture

  • Computational provenance: Datasets can track software containers, and perform and record computations inside it:
  • $ datalad containers-run -n neuroimaging-container \
      --input 'mri/*_bold.nii --output 'sub-*/LC_timeseries_run-*.csv' \
      "bash -c 'for sub in sub-*; do for run in run-1 ... run-8;
         do python3 code/extract_lc_timeseries.py \$sub \$run; done; done'"
    
    -- Git commit -- Michael Hanke < ... @gmail.com>; Fri Jul 6 11:02:28 2019
        [DATALAD RUNCMD] singularity exec --bind {pwd} .datalad/e...
        === Do not change lines below ===
        {
         "cmd": "singularity exec --bind {pwd} .datalad/environments/nilearn.simg bash..",
         "dsid": "92ea1faa-632a-11e8-af29-a0369f7c647e",
         "inputs": [
          "mri/*.bold.nii.gz",
          ".datalad/environments/nilearn.simg"
         ],
         "outputs": ["sub-*/LC_timeseries_run-*.csv"],
         ...
        }
        ^^^ Do not change lines above ^^^
    ---
     sub-01/LC_timeseries_run-1.csv | 1 +
    ...

Provenance capture

  • All recorded transformations can be re-computed automatically
  • $ datalad rerun eee1356bb7e8f921174e404c6df6aadcc1f158f0
    [INFO] == Command start (output follows) =====
    [INFO] == Command exit (modification check follows) =====
    add(ok): sub-01/LC_timeseries_run-1.csv (file)
    ...
    save(ok): . (dataset)
    action summary:
      add (ok: 45)
      save (notneeded: 45, ok: 1)
      unlock (notneeded: 45)
    ...
    • Aid with the reproducibility of a result and verify it (via content hash)
    • Use complete capture and automatic re-computation as alternative to storage and transport

And there is more...

Dealing with sensitive data

  • Flexible data access management - file contents can be made available to none or selected few
  • Share anonymized meta data not subject to privacy concerns
  • Viable solution to bring the computation to the data

Still more...

"RIA stores" for central data management, archival, or backup:
self-contained, plain file system storage for datasets, tuned for maintainability and use on systems with inode limitations (any-sized dataset ≈ 25 inodes). More: handbook.datalad.org/r.html?RIA
Extensions with additional or domain-specific functionality:
Available as pip-installable Python packages. More: handbook.datalad.org/r.html?extensions
Open Data collection:
As of August 2020, about 250TB of open data: datasets.datalad.org/

{Open,Transparent,Reproducible} science

  • Treat data like software: obtain, version, share, and update data
  • Simplified data management, disk-space aware storage & computing
  • Transparent and reproducible science: link code, data, software, and execution in a human- and machine-readable way
  • Collaborate: Generic workflows, interoperabality with established tools & services

Find out more

Comprehensive user documentation in the
DataLad Handbook (handbook.datalad.org)
  • High-level function/command overviews,
    Installation, Configuration, Cheatsheet
  • Narrative-based code-along course
  • Independent on background/skill level,
    suitable for data management novices
  • Step-by-step solutions to common
    data management problems, like
    how to make a reproducible paper

Further Information



Slides: https://github.com/datalad-handbook/course/

Thanks!