Post-session retrieval and BIDS¶
Within 48h after the FIRST session¶
Anatomical images must be screened for incidental findings within 48h after the first session
- Send the T1-weighted and T2-weighted scan to ███ for screening and incidental findings.
- Indicate on our recruits spreadsheet that the participant's first session has been submitted for screening.
- Wait for response from ███ and note down the result of the screening in our our recruits spreadsheet.
To do so, you'll need to first download the data from PACS and then convert the data into BIDS.
What to do when there are incidental findings
- Discuss with ███ how to proceed with the participant.
- Exclude the participant from the study if ███ evaluates they don't meet the participation (inclusion and exclusion) criteria.
Within one week after the completed session¶
Download the data from the PACS with PACSMAN (only authorized users)¶
- Log-in into the PACSMAN computer (███)
-
Mount a remote filesystem through sshfs:
-
Edit the query file
vim $HOME/queries/last-session.csv
(most likely, just update with the session's date) -
Prepare and run PACSMAN, pointing the output to the mounted directory.
-
Unmount the remote filesystem:
Retrieve physiological recordings¶
- Check that the AcqKnowledge file(s) corresponding to the session were added to the Dropbox shared folder and completely uploaded from ████.
- Check that Psychopy's logs and ET's
.EDF
files corresponding to the session were added to the Dropbox shared folder and completely uploaded from ████.
Within two weeks after the completed session¶
Convert imaging data to BIDS with HeuDiConv¶
We use HeuDiConv to convert from the DICOM format generated by the scanner. In addition, starting from the piloting session five, we abide by ReproIn conventions. To support backward compatibility (and some extra, currently unsupported features by the original heuristic file), we have our own heuristic file.
Our custom heuristic file
Our heuristic file largely derives from ReproIn's at the time of writing.
The heuristic has a a protocols2fix: dict[str | re.Pattern[str], list[tuple[str, str]]]
(lines 113-148), where replacement patterns to permit backward compatibility are written.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
|
During piloting, we changed a number of settings
For example, the first four sessions did not follow Reproin conventions and filenames
varied substantially.
Please note the protocols2fix
variable in our heuristic file, where the compatibility is implemented.
-
Run HeuDiConv with our heuristic file
<path>/code/heudiconv/reproin.py
:Executing HeuDiConv#!/bin/bash heudiconv -s "001" -ss "pilot001" -b -l . -o /data/datasets/hcph/ \ -f <sops_clone_path>/code/heudiconv/reproin.py \ --files /data/datasets/hcph-pilot-sourcedata/\ sub-01/\ ses-18950702/
Session number MUST be updated manually
Example of the dataset organization
Piloting sessions 15 and 16 look like this:
├── ses-pilot015 │ ├── anat │ │ ├── sub-001_ses-pilot015_acq-original_T1w.json │ │ ├── sub-001_ses-pilot015_acq-original_T1w.nii.gz │ │ ├── sub-001_ses-pilot015_acq-undistorted_T1w.json │ │ ├── sub-001_ses-pilot015_acq-undistorted_T1w.nii.gz │ │ ├── sub-001_ses-pilot015_T2w.json │ │ └── sub-001_ses-pilot015_T2w.nii.gz │ ├── dwi │ │ ├── sub-001_ses-pilot015_acq-highres_dir-LR_dwi.bval │ │ ├── sub-001_ses-pilot015_acq-highres_dir-LR_dwi.bvec │ │ ├── sub-001_ses-pilot015_acq-highres_dir-LR_dwi.json │ │ └── sub-001_ses-pilot015_acq-highres_dir-LR_dwi.nii.gz │ ├── fmap │ │ ├── sub-001_ses-pilot015_acq-b0_dir-RL_epi.json │ │ ├── sub-001_ses-pilot015_acq-b0_dir-RL_epi.nii.gz │ │ ├── sub-001_ses-pilot015_acq-bold_dir-RL_part-mag_epi.json │ │ ├── sub-001_ses-pilot015_acq-bold_dir-RL_part-mag_epi.nii.gz │ │ ├── sub-001_ses-pilot015_acq-bold_dir-RL_part-phase_epi.json │ │ ├── sub-001_ses-pilot015_acq-bold_dir-RL_part-phase_epi.nii.gz │ │ ├── sub-001_ses-pilot015_magnitude1.json │ │ ├── sub-001_ses-pilot015_magnitude1.nii.gz │ │ ├── sub-001_ses-pilot015_magnitude2.json │ │ ├── sub-001_ses-pilot015_magnitude2.nii.gz │ │ ├── sub-001_ses-pilot015_phasediff.json │ │ └── sub-001_ses-pilot015_phasediff.nii.gz │ ├── func │ │ ├── sub-001_ses-pilot015_task-bht_echo-1_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-1_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-1_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-1_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-2_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-2_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-2_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-2_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-3_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-3_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-3_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-3_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-4_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-4_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_echo-4_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-bht_echo-4_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-bht_part-mag_events.tsv │ │ ├── sub-001_ses-pilot015_task-bht_part-phase_events.tsv │ │ ├── sub-001_ses-pilot015_task-qct_echo-1_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-1_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-1_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-1_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-2_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-2_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-2_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-2_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-3_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-3_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-3_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-3_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-4_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-4_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_echo-4_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-qct_echo-4_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-qct_part-mag_events.tsv │ │ ├── sub-001_ses-pilot015_task-qct_part-phase_events.tsv │ │ ├── sub-001_ses-pilot015_task-rest_echo-1_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-1_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-1_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-1_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-2_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-2_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-2_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-2_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-3_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-3_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-3_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-3_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-4_part-mag_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-4_part-mag_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_echo-4_part-phase_bold.json │ │ ├── sub-001_ses-pilot015_task-rest_echo-4_part-phase_bold.nii.gz │ │ ├── sub-001_ses-pilot015_task-rest_part-mag_events.tsv │ │ └── sub-001_ses-pilot015_task-rest_part-phase_events.tsv │ └── sub-001_ses-pilot015_scans.tsv └── ses-pilot016 ├── anat │ ├── sub-001_ses-pilot016_acq-original_T1w.json │ ├── sub-001_ses-pilot016_acq-original_T1w.nii.gz │ ├── sub-001_ses-pilot016_acq-undistorted_T1w.json │ ├── sub-001_ses-pilot016_acq-undistorted_T1w.nii.gz │ ├── sub-001_ses-pilot016_T2w.json │ └── sub-001_ses-pilot016_T2w.nii.gz ├── dwi │ ├── sub-001_ses-pilot016_acq-highres_dir-RL_dwi.bval │ ├── sub-001_ses-pilot016_acq-highres_dir-RL_dwi.bvec │ ├── sub-001_ses-pilot016_acq-highres_dir-RL_dwi.json │ └── sub-001_ses-pilot016_acq-highres_dir-RL_dwi.nii.gz ├── fmap │ ├── sub-001_ses-pilot016_acq-b0_dir-AP_epi.json │ ├── sub-001_ses-pilot016_acq-b0_dir-AP_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-b0_dir-LR_epi.json │ ├── sub-001_ses-pilot016_acq-b0_dir-LR_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-b0_dir-PA_epi.json │ ├── sub-001_ses-pilot016_acq-b0_dir-PA_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-b0_dir-RL_epi.json │ ├── sub-001_ses-pilot016_acq-b0_dir-RL_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-AP_part-mag_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-AP_part-mag_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-AP_part-phase_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-AP_part-phase_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-LR_part-mag_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-LR_part-mag_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-LR_part-phase_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-LR_part-phase_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-PA_part-mag_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-PA_part-mag_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-PA_part-phase_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-PA_part-phase_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-RL_part-mag_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-RL_part-mag_epi.nii.gz │ ├── sub-001_ses-pilot016_acq-bold_dir-RL_part-phase_epi.json │ ├── sub-001_ses-pilot016_acq-bold_dir-RL_part-phase_epi.nii.gz │ ├── sub-001_ses-pilot016_magnitude1.json │ ├── sub-001_ses-pilot016_magnitude1.nii.gz │ ├── sub-001_ses-pilot016_magnitude2.json │ ├── sub-001_ses-pilot016_magnitude2.nii.gz │ ├── sub-001_ses-pilot016_phasediff.json │ └── sub-001_ses-pilot016_phasediff.nii.gz ├── func │ ├── sub-001_ses-pilot016_task-bht_echo-1_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-1_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-1_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-1_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-2_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-2_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-2_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-2_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-3_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-3_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-3_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-3_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-4_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-4_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_echo-4_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-bht_echo-4_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-bht_part-mag_events.tsv │ ├── sub-001_ses-pilot016_task-bht_part-phase_events.tsv │ ├── sub-001_ses-pilot016_task-qct_echo-1_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-1_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-1_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-1_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-2_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-2_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-2_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-2_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-3_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-3_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-3_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-3_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-4_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-4_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_echo-4_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-qct_echo-4_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-qct_part-mag_events.tsv │ ├── sub-001_ses-pilot016_task-qct_part-phase_events.tsv │ ├── sub-001_ses-pilot016_task-rest_echo-1_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-1_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-1_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-1_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-2_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-2_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-2_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-2_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-3_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-3_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-3_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-3_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-4_part-mag_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-4_part-mag_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_echo-4_part-phase_bold.json │ ├── sub-001_ses-pilot016_task-rest_echo-4_part-phase_bold.nii.gz │ ├── sub-001_ses-pilot016_task-rest_part-mag_events.tsv │ └── sub-001_ses-pilot016_task-rest_part-phase_events.tsv └── sub-001_ses-pilot016_scans.tsv
We started to generate phase and magnitude only after session 15
As a result, the piloting data up to session 14 will look more like:
├── ses-pilot014 │ ├── anat │ │ ├── sub-001_ses-pilot014_acq-original_T1w.json │ │ ├── sub-001_ses-pilot014_acq-original_T1w.nii.gz │ │ ├── sub-001_ses-pilot014_acq-undistorted_T1w.json │ │ ├── sub-001_ses-pilot014_acq-undistorted_T1w.nii.gz │ │ ├── sub-001_ses-pilot014_T2w.json │ │ └── sub-001_ses-pilot014_T2w.nii.gz │ ├── dwi │ │ ├── sub-001_ses-pilot014_acq-highres_dir-PA_dwi.bval │ │ ├── sub-001_ses-pilot014_acq-highres_dir-PA_dwi.bvec │ │ ├── sub-001_ses-pilot014_acq-highres_dir-PA_dwi.json │ │ └── sub-001_ses-pilot014_acq-highres_dir-PA_dwi.nii.gz │ ├── fmap │ │ ├── sub-001_ses-pilot014_acq-b0_dir-AP_epi.json │ │ ├── sub-001_ses-pilot014_acq-b0_dir-AP_epi.nii.gz │ │ ├── sub-001_ses-pilot014_acq-bold_dir-PA_run-1_epi.json │ │ ├── sub-001_ses-pilot014_acq-bold_dir-PA_run-1_epi.nii.gz │ │ ├── sub-001_ses-pilot014_acq-bold_dir-PA_run-2_epi.json │ │ ├── sub-001_ses-pilot014_acq-bold_dir-PA_run-2_epi.nii.gz │ │ ├── sub-001_ses-pilot014_magnitude1.json │ │ ├── sub-001_ses-pilot014_magnitude1.nii.gz │ │ ├── sub-001_ses-pilot014_magnitude2.json │ │ ├── sub-001_ses-pilot014_magnitude2.nii.gz │ │ ├── sub-001_ses-pilot014_phasediff.json │ │ └── sub-001_ses-pilot014_phasediff.nii.gz │ ├── func │ │ ├── sub-001_ses-pilot014_task-bht_echo-1_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_echo-1_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_echo-2_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_echo-2_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_echo-3_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_echo-3_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_echo-4_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_echo-4_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_events.tsv │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-1_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-1_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-2_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-2_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-3_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-3_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-4_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-1_echo-4_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-1_events.tsv │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-1_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-1_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-2_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-2_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-3_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-3_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-4_bold.json │ │ ├── sub-001_ses-pilot014_task-bht_run-2_echo-4_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-bht_run-2_events.tsv │ │ ├── sub-001_ses-pilot014_task-qct_echo-1_bold.json │ │ ├── sub-001_ses-pilot014_task-qct_echo-1_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-qct_echo-2_bold.json │ │ ├── sub-001_ses-pilot014_task-qct_echo-2_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-qct_echo-3_bold.json │ │ ├── sub-001_ses-pilot014_task-qct_echo-3_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-qct_echo-4_bold.json │ │ ├── sub-001_ses-pilot014_task-qct_echo-4_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-qct_events.tsv │ │ ├── sub-001_ses-pilot014_task-rest_echo-1_bold.json │ │ ├── sub-001_ses-pilot014_task-rest_echo-1_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-rest_echo-2_bold.json │ │ ├── sub-001_ses-pilot014_task-rest_echo-2_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-rest_echo-3_bold.json │ │ ├── sub-001_ses-pilot014_task-rest_echo-3_bold.nii.gz │ │ ├── sub-001_ses-pilot014_task-rest_echo-4_bold.json │ │ ├── sub-001_ses-pilot014_task-rest_echo-4_bold.nii.gz │ │ └── sub-001_ses-pilot014_task-rest_events.tsv │ └── sub-001_ses-pilot014_scans.tsv
Clean-up after BIDS conversion and preparation for archival¶
-
Delete incorrect files generated by HeuDiConv:
-
Compact DICOM session folder and remove it if successful
-
Remove write permissions on the newly downloaded data:
Generate BIDS' events files¶
-
Execute conversion with
code/events/psychopy2events
:
Example of a session with events files
The corresponding events files are highlighted below:
ses-024
├── anat
├── dwi
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bval
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bvec
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.nii.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_stim.json
│ └── sub-001_ses-024_acq-highres_dir-AP_stim.tsv.gz
├── fmap
├── func
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bval
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bvec
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.nii.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_stim.json
│ └── sub-001_ses-024_acq-highres_dir-AP_stim.tsv.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_events.tsv
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_stim.json
│ ├── sub-001_ses-024_task-qct_dir-AP_stim.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_events.tsv
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_stim.json
│ └── sub-001_ses-024_task-rest_dir-AP_stim.tsv.gz
│ └── sub-001_ses-024_task-rest_dir-AP_events.tsv
└── sub-001_ses-024_scans.tsv
Convert physiological recordings into BIDS (in-house)¶
-
Install the necessary packages.
-
Update the appropriate session number within cell 3 in the conversion Jupyter notebook.
- Execute the notebook.
Example of a session with physiological recordings
The execution of the notebook on session 24 yields the following new outputs (highlighted):
ses-024
├── anat
├── dwi
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bval
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.bvec
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_dwi.nii.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_acq-highres_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_acq-highres_dir-AP_stim.json
│ └── sub-001_ses-024_acq-highres_dir-AP_stim.tsv.gz
├── fmap
├── func
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_task-bht_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_task-bht_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_stim.json
│ ├── sub-001_ses-024_task-bht_dir-AP_stim.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_task-qct_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_stim.json
│ ├── sub-001_ses-024_task-qct_dir-AP_stim.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-cardiac_physio.json
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-cardiac_physio.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-respiratory_physio.json
│ ├── sub-001_ses-024_task-rest_dir-AP_recording-respiratory_physio.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_stim.json
│ └── sub-001_ses-024_task-rest_dir-AP_stim.tsv.gz
└── sub-001_ses-024_scans.tsv
Convert eye-tracking into BIDS (in-house)¶
Instead of the current specifications, we are using the following BEP
- Check that PyEDFRead is installed as described in the software annex.
- Employ our in-house conversion code, whose functioning is described in our EDF to BIDS conversion how-to.
Example of a session with eye-tracking recordings
The files corresponding to eye-tracking are highlighted below:
ses-024
├── anat
├── dwi
├── fmap
├── func
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-bht_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-bht_dir-AP_eyetrack.json
│ ├── sub-001_ses-024_task-bht_dir-AP_eyetrack.tsv.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-qct_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-qct_dir-AP_eyetrack.json
│ ├── sub-001_ses-024_task-qct_dir-AP_eyetrack.tsv.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-1_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-2_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-3_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-mag_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.json
│ ├── sub-001_ses-024_task-rest_dir-AP_echo-4_part-phase_bold.nii.gz
│ ├── sub-001_ses-024_task-rest_dir-AP_eyetrack.json
│ └── sub-001_ses-024_task-rest_dir-AP_eyetrack.tsv.gz
└── sub-001_ses-024_scans.tsv
Add new data to the DataLad dataset¶
As new sessions are collected, the corresponding BIDS structures MUST be saved within the DataLad dataset and pushed to remote storage systems:
-
Save the files in the dataset history using the command below. Replace
<session_id>
below with the number of the session (e.g.,pilot017
):Always double-check that data are annexed and the metadata committed to git
Although the creation of a procedure should ensure data and metadata are added to the appropriate version control (Git or Git-Annex), it is possible that some metadata or data formats are not anticipated, or do not follow the general rules.
A generally good strategy is to avoid recursion (i.e., do not use the
-r
flag), and leverage Bash'sfind
andxargs
tools. For example, the following command line selects metadata files that should be committed to Git within one session (pilot020
) and saves them:find sub-001/ses-pilot020 -name "*.tsv" -or -name "*.json" -or -name "*.bvec" -or -name "*.bval" | xargs datalad save --to-git -m '"add(pilot020): new session metadata"'
Correspondingly, we can store NIfTI data and physiological information:
find sub-001/ses-pilot020 -name "*.nii.gz" -or -name "*_eyetrack.tsv.gz" -or -name "*_physio.tsv.gz" -or -name "*_stim.tsv.gz" | xargs datalad save -m '"add(pilot020): new session NIfTI data, eye tracking and physio"'
Please read DataLad's
save
documentationIf you overeagerly datalad-saved too many files
You can revert the
datalad save
operation without deleting changes with:where
COMMIT
is the hash of the last commit you want to keep (all the later commits will be dropped).To check the commit hash where you can roll history back to, you may want to use:
Saving batches of sessions
It is possible to save several sessions with the following Bash script by enumerating them in the array defined in the first line here:
SESSIONS=( 001 003 pilot21 ); \ for SESSION in ${SESSIONS[@]}; do \ find sub-001/ses-$SESSION -name "*.tsv" -or -name "*.json" -or -name "*.bvec" -or -name "*.bval" | xargs datalad save --to-git -m '"add('"$SESSION"'): new session metadata"'; \ find sub-001/ses-$SESSION -name "*.nii.gz" -or -name "*_eyetrack.tsv.gz" -or -name "*_physio.tsv.gz" -or -name "*_stim.tsv.gz" | xargs datalad save -m '"add('"$SESSION"'): new session NIfTI data, eye tracking and physio"'; \ done
-
Push the new data to the remote storage (if your git containing DataLad and the Git annex is different from
origin
, e.g.,github
, replace the name below):Always double-check that data in the annex are uploaded to the RIA store
Formal QC¶
-
Consult the session logs to anticipate session peculiarities (e.g the session was aborted prematurely) and potential quality issues (e.g the participan fell asleep). Those are saved in the issues of our repository with the label . Keep note of the peculiar events, associated with their session index, and keep it close to you during quality control.
-
Run the BIDS Validator to check the formal quality of the dataset (filenames, homogeneity of modalities and parameters across sessions, etc.)
BIDS non-compliance: WARNINGS and ERRORS
We do not fully comply with current BIDS specifications, so some ERRORS and WARNINGS will emerge. If errors and warnings are not listed here, please reach out to decide on a solution.
-
ERRORS: Because we follow BEP 020 and it is not official yet, ET-related files will source ERRORS:
-
WARNINGS: some warnings are expected. Warnings that are not among this list should be addressed and BIDS conversion should be re-run on the affected files:
-
During the piloting phase of the study, we tried out different sequence parameters and sequence type. As such, the following warning is expected:
-
The
_magnitude{1,2}.nii.gz
files corresponding to some pilot sessions are missing:[WARN] Each _phasediff.nii[.gz] file should be associated with a _magnitude1.nii[.gz] file. (code: 92 MISSING_MAGNITUDE1_FILE) ./sub-001/ses-pilot001/fmap/sub-001_ses-pilot001_phasediff.nii.gz ./sub-001/ses-pilot004/fmap/sub-001_ses-pilot004_phasediff.nii.gz ./sub-001/ses-pilot006/fmap/sub-001_ses-pilot006_phasediff.nii.gz
-
Visual assessment of unprocessed data with MRIQC¶
Checking the data quality shortly after they are acquired increases the likelihood of catching systematic artifacts early enough to avert spreading throughout the whole dataset. It also modulates the burden of visual inspection over time, such that we avoid overwhelming raters with outbursts of images to assess. Better pacing in rating throughput also contributes to reducing raters' attrition and fatigue.
- Screen all the unprocessed data and assess them as described in the next section.
Upon updates and bugfixes of the dataset¶
Update PyBIDS's database index¶
The PyBIDS index cache dramatically speeds up MRIQC, fMRIPrep and dMRIPrep
To speed up the tear-up time of NiPreps tools (MRIQC, fMRIPrep, and dMRIPrep) and other relevant code using PyBIDS, we have added a database cache under the /data/datasets/hcph-dataset/.bids-index/
folder.
This cache can be leverage by adding the --bids-database-dir /data/datasets/hcph-dataset/.bids-index/
to the corresponding command line.
-
Unlock the database file to enable update:
-
Reset the database file:
python -m pip install "pybids>=0.16" $( dirname $( which python ) )/pybids layout --reset-db --no-validate --index-metadata . .bids-index/
Successful execution will finalize with a message:
Successfully generated database index at /data/datasets/hcph-dataset/.bids-index
. -
Save the dataset again:
-
Push the changes back to the repos: