Note
Go to the end to download the full example code.
8.2. UKB VBM GMD Extraction¶
Authors: Federico Raimondo
License: BSD 3 clause
Added README.md to /github/home/nilearn_data
Dataset created in /github/home/nilearn_data/oasis1
Downloading data from https://www.nitrc.org/frs/download.php/6364/archive_dartel.tgz ...
Downloaded 29433856 of 905208634 bytes (3.3%, 30.1s remaining)
Downloaded 82935808 of 905208634 bytes (9.2%, 20.1s remaining)
Downloaded 138747904 of 905208634 bytes (15.3%, 16.8s remaining)
Downloaded 193208320 of 905208634 bytes (21.3%, 14.9s remaining)
Downloaded 248045568 of 905208634 bytes (27.4%, 13.4s remaining)
Downloaded 300285952 of 905208634 bytes (33.2%, 12.2s remaining)
Downloaded 351404032 of 905208634 bytes (38.8%, 11.2s remaining)
Downloaded 404955136 of 905208634 bytes (44.7%, 10.0s remaining)
Downloaded 459046912 of 905208634 bytes (50.7%, 8.9s remaining)
Downloaded 511787008 of 905208634 bytes (56.5%, 7.8s remaining)
Downloaded 562118656 of 905208634 bytes (62.1%, 6.8s remaining)
Downloaded 615473152 of 905208634 bytes (68.0%, 5.7s remaining)
Downloaded 665780224 of 905208634 bytes (73.5%, 4.7s remaining)
Downloaded 717856768 of 905208634 bytes (79.3%, 3.7s remaining)
Downloaded 772259840 of 905208634 bytes (85.3%, 2.6s remaining)
Downloaded 824811520 of 905208634 bytes (91.1%, 1.6s remaining)
Downloaded 879386624 of 905208634 bytes (97.1%, 0.5s remaining) ...done. (18 seconds, 0 min)
Extracting data from /github/home/nilearn_data/oasis1/7088b0bf88f5650db26e32ec3afdd589/archive_dartel.tgz..... done.
Downloading https://templateflow.s3.amazonaws.com/tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz
0%| | 0.00/10.7M [00:00<?, ?B/s]
1%| | 69.6k/10.7M [00:00<00:22, 478kB/s]
3%|▎ | 366k/10.7M [00:00<00:07, 1.38MB/s]
14%|█▍ | 1.53M/10.7M [00:00<00:02, 4.38MB/s]
54%|█████▍ | 5.81M/10.7M [00:00<00:00, 16.2MB/s]
79%|███████▊ | 8.38M/10.7M [00:00<00:00, 18.0MB/s]
100%|██████████| 10.7M/10.7M [00:00<00:00, 15.6MB/s]
import tempfile
import junifer.testing.registry # noqa: F401
from junifer.api import run
datagrabber = {
"kind": "OasisVBMTestingDataGrabber",
}
markers = [
{
"name": "Schaefer1000x7_TrimMean80",
"kind": "ParcelAggregation",
"parcellation": ["Schaefer1000x7"],
"method": "trim_mean",
"method_params": {"proportiontocut": 0.2},
},
{
"name": "Schaefer1000x7_Mean",
"kind": "ParcelAggregation",
"parcellation": ["Schaefer1000x7"],
"method": "mean",
},
{
"name": "Schaefer1000x7_Std",
"kind": "ParcelAggregation",
"parcellation": ["Schaefer1000x7"],
"method": "std",
},
]
storage = {
"kind": "SQLiteFeatureStorage",
}
with tempfile.TemporaryDirectory() as tmpdir:
uri = f"{tmpdir}/test.sqlite"
storage["uri"] = uri
run(
workdir="/tmp",
datagrabber=datagrabber,
markers=markers,
storage=storage,
)
Total running time of the script: (37 minutes 32.337 seconds)