Explore an existing dataset
datalad clone https://hub.datalad.org/edu/penguins.git
- Open a terminal and "clone" an existing dataset.
- Explore the different files and directories in your terminal.
- Does anything seem "off"?
- What's the difference between "LICENSE.txt" and "adelie/manifest.txt"?
- Can you obtain the content of "examples/adelie.jpg", and also drop it again?
- Can you find a content identifier of "examples/adelie.jpg"?
Explore an existing dataset
Clone the dataset and change into it:
datalad clone https://hub.datalad.org/edu/penguins.git
cd penguins
Find the identifier:
git-annex lookupkey examples/adelie.jpg
Get and drop file content:
datalad get examples/adelie.jpg
datalad drop examples/adelie.jpg
Content identifiers
- Files in datasets have content-based identifiers
- The internal data organization based on identity hash:
$ md5sum adelie.jpg
96d64a3ce9491ec4a8e277bcb31bb016 adelie.jpg
- File identity rather than (potentially large/sensitive) file content is committed - version controlling files without checking contents into Git
Content identifiers
- git-annex tracks location information of files:
- File availability information is stored to
record a decentral network of file content.
A file can exist in multiple different locations.
$ git annex whereis adelie.jpg
whereis adelie.jpg (3 copies)
41726d7d-6e14-4e23-936b-89452c0dccf8 -- [uncurl]
83f2736d-70a7-412a-89df-01ee16326913 -- jsheunis@bnbmac48.local:~/Documents/psyinf/edu/palmerpenguins
9948e337-6ea4-4df5-81a6-ef4709b6121f -- git@2f026f1d3470:/var/lib/gitea/git/repositories/jsheunis/palmerpenguins.git [origin]
uncurl: https://upload.wikimedia.org/wikipedia/commons/e/e8/Adeliepinguin-01.jpg
ok
Transport logistics: Lots of data, little disk-usage
-
Cloned datasets are lean.
"Meta data" (file names, availability) are present, but no file content:
$ datalad clone git@github.com:psychoinformatics-de/studyforrest-data-phase2.git
install(ok): /tmp/studyforrest-data-phase2 (dataset)
$ cd studyforrest-data-phase2 && du -sh
18M .
Files' contents can be retrieved on demand:
$ datalad get sub-01/ses-movie/func/sub-01_ses-movie_task-movie_run-1_bold.nii.gz
get(ok): /tmp/studyforrest-data-phase2/sub-01/ses-movie/func/sub-01_ses-movie_task-movie_run-1_bold.nii.gz (file) [from mddatasrc...]
Have access to more data on your computer than you have disk-space:
# eNKI dataset (1.5TB, 34k files):
$ du -sh
1.5G .
# HCP dataset (~200TB, >15 million files)
$ du -sh
48G .