Package: datalad-ukbiobank
DataLad extension for working with the UKbiobankThis software is aDataLadextension that equips DataLad
with a set of commands to obtain (and monitor) imaging data releases of the
UKbiobank (seedocumentationfor
more information).UKbiobankis a national and international health
resource with unparalleled research opportunities, open to all bona fide health
researchers. UK Biobank aims to improve the prevention, diagnosis and treatment
of a wide range of serious and life-threatening illnesses – including cancer,
heart diseases, stroke, diabetes, arthritis, osteoporosis, eye disorders,
depression and forms of dementia. It is following the health and well-being of
500,000 volunteer participants and provides health information, which does not
identify them, to approved researchers in the UK and overseas, from academia
and industry.Command(s) provided by this extensionukb-init-- Initialize an existing dataset to track a UKBiobank participantukb-update-- Update an existing dataset of a UKbiobank participantInstallationBefore you install this package, please make sure that youinstall a recent
version of git-annex.  Afterwards,
install the latest version ofdatalad-ukbiobankfromPyPi. It is recommended to use
a dedicatedvirtualenv:# create and enter a new virtual environment (optional)
virtualenv --system-site-packages --python=python3 ~/env/datalad
. ~/env/datalad/bin/activate

# install from PyPi
pip install datalad_ukbiobankYou will also need to download theukbfetchutility provided by the UK
Biobank. See theukbfetch documentationfor specifics.UseTo track UKB data for a single participant (example ID: 1234), start by
creating and initializing a new dataset:% datalad create 1234
% cd 1234
% datalad ukb-init --bids 1234 20227_2_0 20227_3_0 25755_2_0 25755_3_0In this example only two data records with two instances each are selected.
However, any other selection is supported too. The--bidsflag enables
an additional dataset layout with a BIDS-like structure.After initialization, runukb-updateat any time to (re-)download data
from UKB, and update the dataset in order to track changes longitudinally.datalad -c datalad.ukbiobank.keyfile=<pathtoaccesstoken> ukb-updateThis will maintain two or three branches:incoming: tracking the pristine UKB downloadsincoming-native: a "native" representation of the extracted downloads
for single file access using UKB naming conventionsincoming-bids: an alternative dataset layout using BIDS conventions
(if enabled withukb-init --bids)Changes can then be merged manually into the main branch. Alternatively,ukb-update --mergemergesincoming-native(orincoming-bidsif enabled)
automatically.Use with pre-downloaded dataRe-download can be avoided (while maintaining all other functionality), if theukbfetchutility is replaced by a shim that obtains the relevant files from
where they have been downloaded to. An example script is provided attools/ukbfetch_surrogate.sh.One simple way to use this script is to add a symlink at~/env/datalad/bin/for example:ln -s tools/ukbfetch_surrogate.sh ~/env/datalad/bin/ukbfetch`Use on non-UNIX-like operating systemsThis code relies on a number of POSIX filesystem features that may make it
somewhat hard to get working on Windows. Contributions to port this extension
to non-POSIX platforms are welcome, but presently this is not supported.SupportFor general information on how to use or contribute to DataLad (and this
extension), please see theDataLad websiteor themain GitHub project page.All bugs, concerns and enhancement requests for this software can be submitted here:https://github.com/datalad/ukbiobank/issuesIf you have a problem or would like to ask a question about how to use DataLad,
pleasesubmit a question to
NeuroStars.orgwith adataladtag.
NeuroStars.org is a platform similar to StackOverflow but dedicated to
neuroinformatics.All previous DataLad questions are available here:http://neurostars.org/tags/datalad/AcknowledgementsThis development was supported by European Union’s Horizon 2020 research and
innovation programme under grant agreementVirtualBrainCloud
(H2020-EU.3.1.5.3, grant no.
826421).