OSCR

Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners.

Code ↔ Paper

9 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

8 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 9 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › Data analysis › Functional data preprocessing ↔ preproc_seg/Pipeline.sh, lines 1 to 39 · score 0.94 · outermost edge, reversed phase, co registered functional, acquisition slab, distortion corrected, preprocessed · block oscr:b:HXKFV6ZA5Z788-4 · Report a mismatch
  2. [2] § Methods › Data analysis › Anatomical data processing ↔ preproc_seg/Pipeline.sh, lines 495 to 583 · score 0.91 · skull stripped, FSL FAST, MP2RAGE, BET, Singularity, tissue · block oscr:b:H9KF1NQV8CQGW-N · Report a mismatch
  3. [3] § Methods › Data analysis › General linear model (GLM) analysis ↔ preproc_seg/Pipeline.sh, lines 495 to 583 · score 0.87 · ANTs multivariate template, aCompCor, GM mask, functional slab, inference, cropped · block oscr:b:H9KF1NQV8CQGW-N · Report a mismatch
  4. [4] § Results › Part 2: Sequence validation with an autobiographical memory paradigm › Disentangling brain activations between memory and math trials ↔ voxelwise_glm/sensitivity_analysis/sensitivity.R, lines 1 to 24 · score 0.72 · minimum detectable, sample Cohen, standardized MDES, sensitivity, power · block oscr:b:9G3RNFMMDWNXH-0 · Report a mismatch
  5. [5] § Methods › Data analysis › General linear model (GLM) analysis ↔ voxelwise_glm/subfield_activity_contrast_reg.sh, lines 113 to 186 · score 0.68 · GM mask, functional slab, inference, ANTs, cropped, template · block oscr:b:0SYYXT8968NEF-D · Report a mismatch
  6. [6] § Methods › Data analysis › Extraction of laminar profiles in HC subfields ↔ layering/VPF_create_hippocampus_layers.m, lines 1 to 138 · score 0.61 · inner surface, equidistant, landmark, MATLAB, boundary, CA4 · block oscr:b:NV4KMA27S191T-Y · Report a mismatch
  7. [7] § Results › Part 2: Sequence validation with an autobiographical memory paradigm › Disentangling brain activations between memory and math trials ↔ Figurs_script/subfield_activity_plots.R, lines 1 to 12 · score 0.57 · entire anatomically defined, hippocampal subfields, conjunction, ROIs, voxels, memory · block oscr:b:VVGJ8X4Y4TB72-Q · Report a mismatch
  8. [8] § Results › Part 2: Sequence validation with an autobiographical memory paradigm › Laminar profiles of HC subfields for memory vs math trials ↔ layering/SLopes_significance_assessment/sig_assessment.R, lines 114 to 150 · score 0.52 · random intercepts, fitted, interaction, mixed, profiles, model · block oscr:b:1C39DGZM4TYRM-2 · Report a mismatch
  9. [9] § Results › Part 2: Sequence validation with an autobiographical memory paradigm › Disentangling brain activations between memory and math trials ↔ Figurs_script/Contrast_to_noise_ratio/CNR.sh, the whole file · a weak match · score 0.51 · ResMS.nii, noise ratio, CNR, HC, VASO · block oscr:b:2TC4FBQMG4BVS-8 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Shell · 583 lines · 29 KB · no license · 3 matches

  1. #!/bin/bash
  2. # This script should be run from the parent directory i.e., Part2 folder
  3. #--------------------------------------------------
  4. # Section1: entire preprocessing pipeline which consists of the following steps:
  5. # 1) Remove slices at the outermost edge of the acquisition slab
  6. # 2) Remove dummy volumes
  7. # 3) Apply NORDIC denoising
  8. # 4) Perform motion and distortion correction (if reverse PE data is available)
  9. # 5) MPRAGE-ize the anatomy (requires `presurfer`)
  10. # 6) Co-register functional data to anatomical reference
  11. # 7) Generate basic QC measures (e.g., mean images and tSNR maps)
  12. #--------------------------------------------------
  13. # Remove 3 slices (1 from bottom and 2 from top at the edge of acquisition)
  14. while IFS= read -r line1 && IFS= read -r line2 <&3; do fslroi $line1 $line2 0 -1 0 -1 1 33; done < Files.txt 3< Files_Slice_rm.txt
  15. # Discard two dummy volumes and the last two noise volumes at the end
  16. cat FOLDERS.txt | while read line; do NumVol=`3dinfo -nv "$line/vaso_sliceRemove.nii.gz"`; b="$((NumVol - 3))"; 3dTcat -prefix $line/vaso_slice_Vol_Remove.nii.gz $line/vaso_sliceRemove.nii.gz[2.."$b"]; done
  17. cat FOLDERS.txt | while read line; do NumVol=`3dinfo -nv "$line/bold_sliceRemove.nii.gz"`; b="$((NumVol - 3))"; 3dTcat -prefix $line/bold_slice_Vol_Remove.nii.gz $line/bold_sliceRemove.nii.gz[2.."$b"]; done
  18. # Run NORDIC, and gzip the outputs
  19. START_DIR=$(pwd)
  20. cat FOLDERS.txt | while read line; do cd $line/ || continue ; matlab -nodisplay -nodesktop -r "run('$START_DIR/NORDIC_snippet.m'); quit"; cd "$START_DIR"; done
  21. cat FOLDERS.txt | while read line; do cd $line/ || continue ; gzip NORDIC_bold_slice_Vol_Remove.nii; gzip NORDIC_vaso_slice_Vol_Remove.nii; cd "$START_DIR"; done
  22. # Do motion and distortion correction using ANTS pipeline
  23. cat FOLDERS_no_PA.txt | while read line; do cd $line/ || continue
  24. if [ -d ../reverse_phase ]; then
  25. "$START_DIR"/sk_ants_Realign_Estimate_KA.sh -n 28 -t 3 -a NORDIC_bold_slice_Vol_Remove.nii.gz -b ../reverse_phase/NORDIC_bold_slice_Vol_Remove.nii.gz
  26. "$START_DIR"/sk_ants_Realign_Estimate_KA.sh -n 28 -t 3 -a NORDIC_vaso_slice_Vol_Remove.nii.gz -b ../reverse_phase/NORDIC_vaso_slice_Vol_Remove.nii.gz
  27. else
  28. echo "Skipping $line: reverse_phase directory not found."
  29. fi
  30. cd "$START_DIR"; done
  31. # merge motion and distortion corrected data
  32. cat FOLDERS_no_PA.txt | while read line; do cd $line/ || continue
  33. if [ -d ../reverse_phase ]; then
  34. cd NORDIC_bold_slice_Vol_Remove_mats
  35. M=$(ls *_0GenericAffine.mat | wc -l)
  36. F=$(($M-1))
  37. D=$((1$F))
  38. for n in $(seq 1000 $D); do
  39. antsApplyTransforms \
  40. --output-data-type int \
  41. --dimensionality 3 \
  42. --interpolation LanczosWindowedSinc \
  43. --transform NORDIC_bold_slice_Vol_Remove_"$n"_0GenericAffine.mat \
  44. --transform ../NORDIC_bold_slice_Vol_Remove_DistCorr_01Warp.nii.gz \
  45. --input ../NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_slice_Vol_Remove_"$n".nii.gz \
  46. --output ../NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_slice_Vol_Remove_"$n"_MoCo_DisCor.nii.gz \
  47. --reference-image ../NORDIC_bold_slice_Vol_Remove_DistCorr_template0.nii.gz \
  48. -v
  49. done
  50. cd ../NORDIC_bold_slice_Vol_Remove_split
  51. ImageMath 4 NORDIC_bold_MoCo_DisCor_merged.nii.gz TimeSeriesAssemble 3 0 *_MoCo_DisCor.nii.gz
  52. # do the same for vaso
  53. cd ../NORDIC_vaso_slice_Vol_Remove_mats
  54. for n in $(seq 1000 $D); do
  55. antsApplyTransforms \
  56. --output-data-type int \
  57. --dimensionality 3 \
  58. --interpolation LanczosWindowedSinc \
  59. --transform NORDIC_vaso_slice_Vol_Remove_"$n"_0GenericAffine.mat \
  60. --transform ../NORDIC_vaso_slice_Vol_Remove_DistCorr_01Warp.nii.gz \
  61. --input ../NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_slice_Vol_Remove_"$n".nii.gz \
  62. --output ../NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_slice_Vol_Remove_"$n"_MoCo_DisCor.nii.gz \
  63. --reference-image ../NORDIC_vaso_slice_Vol_Remove_DistCorr_template0.nii.gz \
  64. -v
  65. done
  66. cd ../NORDIC_vaso_slice_Vol_Remove_split
  67. ImageMath 4 NORDIC_vaso_MoCo_DisCor_merged.nii.gz TimeSeriesAssemble 3 0 *_MoCo_DisCor.nii.gz
  68. else
  69. echo "Skipping $line: reverse_phase directory not found."
  70. fi
  71. cd "$START_DIR"; done
  72. # In Sub 002 and session_3 in sub 001 where there are no reverse-phase data, adapted version of k_ants_Realign_Estimate_KA.sh is performed for motion correction
  73. cd 002/func/Run2/
  74. mkdir NORDIC_bold_slice_Vol_Remove_split NORDIC_vaso_slice_Vol_Remove_split
  75. ImageMath 4 NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_slice_Vol_Remove_.nii.gz TimeSeriesDisassemble NORDIC_bold_slice_Vol_Remove.nii.gz
  76. ImageMath 4 NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_slice_Vol_Remove_.nii.gz TimeSeriesDisassemble NORDIC_vaso_slice_Vol_Remove.nii.gz
  77. cd NORDIC_bold_slice_Vol_Remove_split/;
  78. # 1000-1149 indicate volume indices, counting from 0, making 150 volumes in total.
  79. VOLUMES=$(seq 1000 1149)
  80. for n in $VOLUMES; do
  81. antsRegistration \
  82. --verbose 1 \
  83. --float 1 \
  84. --dimensionality 3 \
  85. --use-histogram-matching 1 \
  86. --interpolation LanczosWindowedSinc \
  87. --collapse-output-transforms 1 \
  88. --output [ NORDIC_bold_$n, NORDIC_bold_"$n"_slice_Vol_Remove_Warped.nii.gz , 1 ] \
  89. --winsorize-image-intensities [ 0.005 , 0.995 ] \
  90. --initial-moving-transform [ NORDIC_bold_slice_Vol_Remove_1000.nii.gz , NORDIC_bold_slice_Vol_Remove_$n.nii.gz , 1 ] \
  91. --transform Rigid[0.1] \
  92. --metric MI[ NORDIC_bold_slice_Vol_Remove_1000.nii.gz , NORDIC_bold_slice_Vol_Remove_$n.nii.gz , 1 , 64 , Regular , 0.25] \
  93. --convergence [ 500x250 , 1e-6 , 10 ] \
  94. --shrink-factors 2x1 \
  95. --smoothing-sigmas 1x0vox
  96. done
  97. for n in $VOLUMES; do
  98. ConvertTransformFile 3 NORDIC_bold_"$n"0GenericAffine.mat NORDIC_bold_"$n"_ants2itk.mat --hm --ras
  99. c3d_affine_tool -ref NORDIC_bold_slice_Vol_Remove_1000.nii.gz \
  100. -src NORDIC_bold_slice_Vol_Remove_$n.nii.gz \
  101. NORDIC_bold_"$n"_ants2itk.mat -ras2fsl \
  102. -o NORDIC_bold_"$n"_itk2fsl.mat
  103. done
  104. # $FSLDIR refers to fsl root directory which is /usr/local/fsl in Linux systems. The below commands save motion estimates into text files and shows the motion plots
  105. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz | grep "Translations" | awk '{print $5 " " $6 " " $7}';done > translation.txt
  106. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz | grep "Rotation Angles" | awk '{print $6 " " $7 " " $8}';done > Rotation.txt
  107. paste translation.txt Rotation.txt > Motion.params
  108. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Translations (mm)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o Motion_translations.png
  109. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Rotations (deg)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o Motion_rotations.png
  110. for n in $VOLUMES; do ${FSLDIR}/bin/rmsdiff NORDIC_bold_1000_itk2fsl.mat NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsabs
  111. for n in $(seq 1001 1149); do F=$(($n-1)); ${FSLDIR}/bin/rmsdiff NORDIC_bold_"$F"_itk2fsl.mat NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsrel
  112. ${FSLDIR}/bin/fsl_tsplot -i Motion.rmsabs,Motion.rmsrel -t 'Mean Displacements (mm)' -u 1 -a absolute,relative -w 640 -h 144 -o Motion_rms.png
  113. ImageMath 4 NORDIC_bold_MoCo.nii.gz TimeSeriesAssemble 3 0 *_Warped.nii.gz
  114. # now repeat the above for vaso
  115. cd ../NORDIC_vaso_slice_Vol_Remove_split/
  116. for n in $VOLUMES; do
  117. antsRegistration \
  118. --verbose 1 \
  119. --float 1 \
  120. --dimensionality 3 \
  121. --use-histogram-matching 1 \
  122. --interpolation LanczosWindowedSinc \
  123. --collapse-output-transforms 1 \
  124. --output [ NORDIC_vaso_$n, NORDIC_vaso_"$n"_slice_Vol_Remove_Warped.nii.gz , 1 ] \
  125. --winsorize-image-intensities [ 0.005 , 0.995 ] \
  126. --initial-moving-transform [ NORDIC_vaso_slice_Vol_Remove_1000.nii.gz , NORDIC_vaso_slice_Vol_Remove_$n.nii.gz , 1 ] \
  127. --transform Rigid[0.1] \
  128. --metric MI[ NORDIC_vaso_slice_Vol_Remove_1000.nii.gz , NORDIC_vaso_slice_Vol_Remove_$n.nii.gz , 1 , 64 , Regular , 0.25] \
  129. --convergence [ 500x250 , 1e-6 , 10 ] \
  130. --shrink-factors 2x1 \
  131. --smoothing-sigmas 1x0vox
  132. done
  133. for n in $VOLUMES; do
  134. ConvertTransformFile 3 NORDIC_vaso_"$n"0GenericAffine.mat NORDIC_vaso_"$n"_ants2itk.mat --hm --ras
  135. c3d_affine_tool -ref NORDIC_vaso_slice_Vol_Remove_1000.nii.gz \
  136. -src NORDIC_vaso_slice_Vol_Remove_$n.nii.gz \
  137. NORDIC_vaso_"$n"_ants2itk.mat -ras2fsl \
  138. -o NORDIC_vaso_"$n"_itk2fsl.mat
  139. done
  140. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz | grep "Translations" | awk '{print $5 " " $6 " " $7}';done > translation.txt
  141. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz | grep "Rotation Angles" | awk '{print $6 " " $7 " " $8}';done > Rotation.txt
  142. paste translation.txt Rotation.txt > Motion.params
  143. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Translations (mm)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o Motion_translations.png
  144. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Rotations (deg)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o Motion_rotations.png
  145. for n in $VOLUMES; do ${FSLDIR}/bin/rmsdiff NORDIC_vaso_1000_itk2fsl.mat NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsabs
  146. for n in $(seq 1001 1149); do F=$(($n-1)); ${FSLDIR}/bin/rmsdiff NORDIC_vaso_"$F"_itk2fsl.mat NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsrel
  147. ${FSLDIR}/bin/fsl_tsplot -i Motion.rmsabs,Motion.rmsrel -t 'Mean Displacements (mm)' -u 1 -a absolute,relative -w 640 -h 144 -o Motion_rms.png
  148. ImageMath 4 NORDIC_vaso_MoCo.nii.gz TimeSeriesAssemble 3 0 *_Warped.nii.gz
  149. cd ../../../../
  150. # In session_3 of sub 001, there are 3 runs. Creat a for loop to run the same motion correction as in sub 002.
  151. cd 001/func/session_3/
  152. RUNS=("Run7" "Run8" "Run9")
  153. for RUN in "${RUNS[@]}"; do
  154. RUN_DIR="${RUN}"
  155. cd "$RUN_DIR" || continue
  156. echo "Processing $RUN_DIR..."
  157. mkdir NORDIC_bold_slice_Vol_Remove_split NORDIC_vaso_slice_Vol_Remove_split
  158. ImageMath 4 NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_slice_Vol_Remove_.nii.gz TimeSeriesDisassemble NORDIC_bold_slice_Vol_Remove.nii.gz
  159. ImageMath 4 NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_slice_Vol_Remove_.nii.gz TimeSeriesDisassemble NORDIC_vaso_slice_Vol_Remove.nii.gz
  160. cd NORDIC_bold_slice_Vol_Remove_split || continue
  161. for n in $VOLUMES; do
  162. antsRegistration \
  163. --verbose 1 \
  164. --float 1 \
  165. --dimensionality 3 \
  166. --use-histogram-matching 1 \
  167. --interpolation LanczosWindowedSinc \
  168. --collapse-output-transforms 1 \
  169. --output [ NORDIC_bold_$n, NORDIC_bold_"$n"_slice_Vol_Remove_Warped.nii.gz , 1 ] \
  170. --winsorize-image-intensities [ 0.005 , 0.995 ] \
  171. --initial-moving-transform [ NORDIC_bold_slice_Vol_Remove_1000.nii.gz , NORDIC_bold_slice_Vol_Remove_$n.nii.gz , 1 ] \
  172. --transform Rigid[0.1] \
  173. --metric MI[ NORDIC_bold_slice_Vol_Remove_1000.nii.gz , NORDIC_bold_slice_Vol_Remove_$n.nii.gz , 1 , 64 , Regular , 0.25] \
  174. --convergence [ 500x250 , 1e-6 , 10 ] \
  175. --shrink-factors 2x1 \
  176. --smoothing-sigmas 1x0vox
  177. done
  178. for n in $VOLUMES; do
  179. ConvertTransformFile 3 NORDIC_bold_"$n"0GenericAffine.mat NORDIC_bold_"$n"_ants2itk.mat --hm --ras
  180. c3d_affine_tool -ref NORDIC_bold_slice_Vol_Remove_1000.nii.gz \
  181. -src NORDIC_bold_slice_Vol_Remove_$n.nii.gz \
  182. NORDIC_bold_"$n"_ants2itk.mat -ras2fsl \
  183. -o NORDIC_bold_"$n"_itk2fsl.mat
  184. done
  185. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz | grep "Translations" | awk '{print $5 " " $6 " " $7}';done > translation.txt
  186. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz | grep "Rotation Angles" | awk '{print $6 " " $7 " " $8}';done > Rotation.txt
  187. paste translation.txt Rotation.txt > Motion.params
  188. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Translations (mm)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o Motion_translations.png
  189. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Rotations (deg)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o Motion_rotations.png
  190. for n in $VOLUMES; do ${FSLDIR}/bin/rmsdiff NORDIC_bold_1000_itk2fsl.mat NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsabs
  191. for n in $(seq 1001 1149); do F=$(($n-1)); ${FSLDIR}/bin/rmsdiff NORDIC_bold_"$F"_itk2fsl.mat NORDIC_bold_"$n"_itk2fsl.mat NORDIC_bold_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsrel
  192. ${FSLDIR}/bin/fsl_tsplot -i Motion.rmsabs,Motion.rmsrel -t 'Mean Displacements (mm)' -u 1 -a absolute,relative -w 640 -h 144 -o Motion_rms.png
  193. ImageMath 4 NORDIC_bold_MoCo.nii.gz TimeSeriesAssemble 3 0 *_Warped.nii.gz
  194. # now repeat the above for vaso
  195. cd ../NORDIC_vaso_slice_Vol_Remove_split || continue
  196. for n in $VOLUMES; do
  197. antsRegistration \
  198. --verbose 1 \
  199. --float 1 \
  200. --dimensionality 3 \
  201. --use-histogram-matching 1 \
  202. --interpolation LanczosWindowedSinc \
  203. --collapse-output-transforms 1 \
  204. --output [ NORDIC_vaso_$n, NORDIC_vaso_"$n"_slice_Vol_Remove_Warped.nii.gz , 1 ] \
  205. --winsorize-image-intensities [ 0.005 , 0.995 ] \
  206. --initial-moving-transform [ NORDIC_vaso_slice_Vol_Remove_1000.nii.gz , NORDIC_vaso_slice_Vol_Remove_$n.nii.gz , 1 ] \
  207. --transform Rigid[0.1] \
  208. --metric MI[ NORDIC_vaso_slice_Vol_Remove_1000.nii.gz , NORDIC_vaso_slice_Vol_Remove_$n.nii.gz , 1 , 64 , Regular , 0.25] \
  209. --convergence [ 500x250 , 1e-6 , 10 ] \
  210. --shrink-factors 2x1 \
  211. --smoothing-sigmas 1x0vox
  212. done
  213. for n in $VOLUMES; do
  214. ConvertTransformFile 3 NORDIC_vaso_"$n"0GenericAffine.mat NORDIC_vaso_"$n"_ants2itk.mat --hm --ras
  215. c3d_affine_tool -ref NORDIC_vaso_slice_Vol_Remove_1000.nii.gz \
  216. -src NORDIC_vaso_slice_Vol_Remove_$n.nii.gz \
  217. NORDIC_vaso_"$n"_ants2itk.mat -ras2fsl \
  218. -o NORDIC_vaso_"$n"_itk2fsl.mat
  219. done
  220. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz | grep "Translations" | awk '{print $5 " " $6 " " $7}';done > translation.txt
  221. for n in $VOLUMES; do ${FSLDIR}/bin/avscale --allparams NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz | grep "Rotation Angles" | awk '{print $6 " " $7 " " $8}';done > Rotation.txt
  222. paste translation.txt Rotation.txt > Motion.params
  223. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Translations (mm)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o Motion_translations.png
  224. ${FSLDIR}/bin/fsl_tsplot -i Motion.params -t 'Rotations (deg)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o Motion_rotations.png
  225. for n in $VOLUMES; do ${FSLDIR}/bin/rmsdiff NORDIC_vaso_1000_itk2fsl.mat NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsabs
  226. for n in $(seq 1001 1149); do F=$(($n-1)); ${FSLDIR}/bin/rmsdiff NORDIC_vaso_"$F"_itk2fsl.mat NORDIC_vaso_"$n"_itk2fsl.mat NORDIC_vaso_slice_Vol_Remove_1000.nii.gz; done >> Motion.rmsrel
  227. ${FSLDIR}/bin/fsl_tsplot -i Motion.rmsabs,Motion.rmsrel -t 'Mean Displacements (mm)' -u 1 -a absolute,relative -w 640 -h 144 -o Motion_rms.png
  228. ImageMath 4 NORDIC_vaso_MoCo.nii.gz TimeSeriesAssemble 3 0 *_Warped.nii.gz
  229. # Return to Session_3 for next run
  230. cd ../../
  231. done
  232. # preparation to run BOCO function from Laynii package
  233. cat FOLDERS_no_PA.txt | while read line; do
  234. if [ -d ../reverse_phase ]; then
  235. 3dTcat -prefix $line/vaso_bold_combined.nii.gz \
  236. $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo_DisCor_merged.nii.gz \
  237. $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo_DisCor_merged.nii.gz
  238. else
  239. 3dTcat -prefix $line/vaso_bold_combined.nii.gz \
  240. $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo.nii.gz \
  241. $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo.nii.gz
  242. fi
  243. done
  244. cat FFOLDERS_no_PA.txt | while read line; do 3dTstat -cvarinv -prefix $line/T1_weighted_vaso_bold.nii.gz $line/vaso_bold_combined.nii.gz; done
  245. cat FFOLDERS_no_PA.txt | while read line; do
  246. if [ -d ../reverse_phase ]; then
  247. 3dTstat -mean -prefix $line/vaso_mean.nii.gz $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo_DisCor_merged.nii.gz
  248. 3dTstat -mean -prefix $line/bold_mean.nii.gz $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo_DisCor_merged.nii.gz
  249. 3dcalc -a $line/vaso_mean.nii.gz -b $line/bold_mean.nii.gz -prefix $line/T1_weighted_vaso_bold_divided.nii.gz -expr 'within(((a-b)/(a+b)+1),0,1.2)*(a-b)/(a+b)'
  250. 3dUpsample -datum short -prefix $line/vaso_upsamp.nii.gz -n 2 -input $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo_DisCor_merged.nii.gz
  251. 3dUpsample -datum short -prefix $line/bold_upsamp.nii.gz -n 2 -input $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo_DisCor_merged.nii.gz
  252. else
  253. 3dTstat -mean -prefix $line/vaso_mean.nii.gz $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo.nii.gz
  254. 3dTstat -mean -prefix $line/bold_mean.nii.gz $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo.nii.gz
  255. 3dcalc -a $line/vaso_mean.nii.gz -b $line/bold_mean.nii.gz -prefix $line/T1_weighted_vaso_bold_divided.nii.gz -expr 'within(((a-b)/(a+b)+1),0,1.2)*(a-b)/(a+b)'
  256. 3dUpsample -datum short -prefix $line/vaso_upsamp.nii.gz -n 2 -input $line/NORDIC_vaso_slice_Vol_Remove_split/NORDIC_vaso_MoCo.nii.gz
  257. 3dUpsample -datum short -prefix $line/bold_upsamp.nii.gz -n 2 -input $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo.nii.gz
  258. fi
  259. done
  260. cat FFOLDERS_no_PA.txt | while read line; do
  261. NumVol=`3dinfo -nv "$line/bold_upsamp.nii.gz"`
  262. b="$((NumVol - 2))"
  263. 3dTcat -prefix $line/bold_upsamp_shifted.nii.gz \
  264. $line/bold_upsamp.nii.gz'[0]' \
  265. $line/bold_DisCor_MoCor_upsamp.nii.gz[0.."b"]
  266. done
  267. cat FFOLDERS_no_PA.txt | while read line; do
  268. cd $line/ || continue
  269. LN_BOCO -Nulled vaso_upsamp.nii.gz -BOLD bold_upsamp_shifted.nii.gz
  270. gzip VASO_LN.nii
  271. rm bold_upsamp_shifted.nii.gz
  272. cd "$START_DIR"
  273. done
  274. cat FFOLDERS_no_PA.txt | while read line; do 3drefit -TR 3 $line/VASO_LN.nii.gz; done
  275. cat FFOLDERS_no_PA.txt | while read line; do 3dcalc -a $line/VASO_LN.nii.gz'[0..$(2)]' -expr 'a' -prefix $line/VASO_LN_origVols.nii.gz; done
  276. # remove the noisy background of the BOLD-corrected VASO, by generating a mask of BOLD data and then applying this mask to VASO
  277. cat FFOLDERS_no_PA.txt | while read line; do
  278. if [ -d ../reverse_phase ]; then
  279. 3dAutomask -prefix $line/bold_mask.nii.gz -apply_prefix $line/bold_MoCo_DisCor_maskApplied.nii.gz -dilate 2 $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo_DisCor_merged.nii.gz
  280. fslmaths $line/VASO_LN_origVols.nii.gz -mul $line/bold_mask.nii.gz $line/VASO_LN_origVols_maskApplied.nii.gz
  281. else
  282. 3dAutomask -prefix $line/bold_mask.nii.gz -apply_prefix $line/bold_MoCo_maskApplied.nii.gz -dilate 2 $line/NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo.nii.gz
  283. fslmaths $line/VASO_LN_origVols.nii.gz -mul $line/bold_mask.nii.gz $line/VASO_LN_origVols_maskApplied.nii.gz
  284. fi
  285. done
  286. # MPRAGIZE the anatomy to remove the noisy background of UNI image. Requires Presurfer to be added to MATLAB path in advance.
  287. cat FOLDERS-ANAT.txt | while read line; do cd $line/
  288. UNI='MP2RAGE-UNI_defaced.nii.gz'
  289. INV2='MP2RAGE-INV2_defaced.nii.gz'
  290. matlab -nodisplay -nodesktop -r "[mprageised_im, wmseg_im] = MPRAGEise('$UNI', '$INV2');quit"; cd "$START_DIR"; done
  291. # Co-registration of functional data to corresponding anatomical image
  292. while IFS= read -r line1 && IFS= read -r line2 <&3; do
  293. cd $line1/ || continue
  294. if [ -d ../reverse_phase ]; then
  295. align_epi_anat.py \
  296. -anat "$START_DIR"/$line2/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz \
  297. -anat_has_skull yes \
  298. -epi NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo_DisCor_merged.nii.gz \
  299. -epi_base 0 \
  300. -partial_coverage \
  301. -epi2anat \
  302. -prep_off \
  303. -epi_strip 3dAutomask \
  304. -cmass cmass \
  305. -giant_move \
  306. -suffix _coreg
  307. 3dAFNItoNIFTI -prefix NORDIC_bold_MoCo_DisCor_merged_coreg.nii.gz NORDIC_bold_MoCo_DisCor_merged_coreg+orig.
  308. 3dresample -master "$START_DIR"/$line2/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz -prefix NORDIC_bold_coreg_resampled.nii.gz -input NORDIC_bold_MoCo_DisCor_merged_coreg.nii.gz
  309. else
  310. align_epi_anat.py \
  311. -anat "$START_DIR"/$line2/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz \
  312. -anat_has_skull yes \
  313. -epi NORDIC_bold_slice_Vol_Remove_split/NORDIC_bold_MoCo.nii.gz \
  314. -epi_base 0 \
  315. -partial_coverage \
  316. -epi2anat \
  317. -prep_off \
  318. -epi_strip 3dAutomask \
  319. -cmass cmass \
  320. -giant_move \
  321. -suffix _coreg
  322. 3dAFNItoNIFTI -prefix NORDIC_bold_MoCo_coreg.nii.gz NORDIC_bold_MoCo_coreg+orig.
  323. 3dresample -master "$START_DIR"/$line2/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz -prefix NORDIC_bold_coreg_resampled.nii.gz -input NORDIC_bold_MoCo_DisCor_merged_coreg.nii.gz
  324. fi
  325. cd "$START_DIR"
  326. done < FOLDERS_no_PA.txt 3< FOLDERS-ANAT.txt
  327. # coregistration of vaso to anatomy involves manual approach using ITK-snap tools, to do so, first get the mean VASO image, split the volumes and then once the transformation matrix is generated from ITK-snap alignment
  328. cat FOLDERS_no_PA.txt | while read line; do
  329. mkdir $line/vaso_split
  330. 3dTstat -mean -prefix $line/VASO_LN_origVols_masked_mean.nii.gz $line/VASO_LN_origVols_maskApplied.nii.gz
  331. cp $line/VASO_LN_origVols_maskApplied.nii.gz $line/vaso_split/
  332. cd $line/vaso_split/ || continue
  333. fslsplit VASO_LN_origVols_maskApplied.nii.gz vaso -t
  334. cd "$START_DIR"
  335. done
  336. echo "Waiting for VASO_coreg.txt to be created via manual alignment with ITK-snap. Press Ctrl+C to cancel"
  337. while [ ! -f VASO_coreg.txt ]; do
  338. sleep 3600 # check every hour
  339. done
  340. echo "Manual registration completed. Continuing with script..."
  341. ## Once VASO_coreg is created, then apply it to all VASO volumes. If the process was cancelled, create a new .sh script by pasting the lines below.
  342. while IFS= read -r line1 && IFS= read -r line2 <&3; do
  343. cd $line1/vaso_split/ || continue
  344. for n in $VOLUMES; do
  345. antsApplyTransforms --interpolation BSpline[5] -d 3 -i vaso$n.nii.gz -r "$START_DIR"/$line2/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz -t VASO_coreg.txt -o vaso$n-coreg.nii.gz
  346. done
  347. fslmerge -t VASO_LN_coreg.nii.gz *-coreg.nii.gz
  348. cd "$START_DIR"
  349. done < FOLDERS_no_PA.txt 3< FOLDERS-ANAT.txt
  350. echo "Visually Investigate the Goodness of Alignment for BOLD and VASO "
  351. # Merge all co-registered BOLD data into a single NIfTI (.nii) file, which will serve as the input for a MATLAB-based sampling script. While the code can be executed separately for each run followed by merging the resulting .mat files, we choose instead to combine all runs beforehand to generate a single .mat file as the final output. Similarly, merge all co-registered VASO data. Note that this step requires a lot of RAM around 500 GB.
  352. subjects=(001 002 003 004 005 006)
  353. for subj in "${subjects[@]}"; do
  354. echo "Processing subject $subj..."
  355. # Find coreg BOLD files
  356. files=$(find $subj -type f -name "NORDIC_bold_coreg_resampled.nii.gz" | sort)
  357. outdir="${subj}/func"
  358. 3dTcat -prefix "${outdir}/NORDIC_BOLD_coreg_merged_all.nii.gz" $files
  359. echo "Done with $subj"
  360. done
  361. # Apply the same for VASO
  362. for subj in "${subjects[@]}"; do
  363. echo "Processing subject $subj..."
  364. # Find coreg BOLD files
  365. files=$(find $subj -type f -name "VASO_LN_coreg.nii.gz" | sort)
  366. outdir="${subj}/func"
  367. 3dTcat -prefix "${outdir}/NORDIC_VASO_coreg_merged_all.nii.gz" $files
  368. echo "Done with $subj"
  369. done
  370. # Following co-registration, obtain usual QC metrics including mean image and tSNR maps
  371. cat FOLDERS_no_PA.txt | while read line; do
  372. mkdir $line/QC_bold $line/QC_vaso
  373. fslmaths $line/vaso_split/VASO_LN_coreg.nii.gz -Tmean $line/QC_vaso/vaso_mean.nii.gz
  374. fslmaths $line/vaso_split/VASO_LN_coreg.nii.gz -Tstd $line/QC_vaso/vaso_tsd.nii.gz
  375. fslmaths $line/QC_vaso/vaso_mean.nii.gz -div $line/QC_vaso/vaso_tsd.nii.gz $line/QC_vaso/vaso_tsnr.nii.gz
  376. fslmaths $line/NORDIC_bold_coreg_resampled.nii.gz -Tmean $line/QC_bold/bold_mean.nii.gz
  377. fslmaths $line/NORDIC_bold_coreg_resampled.nii.gz -Tstd $line/QC_bold/bold_tsd.nii.gz
  378. fslmaths $line/QC_bold/bold_mean.nii.gz -div $line/QC_bold/bold_tsd.nii.gz $line/QC_bold/bold_tsnr.nii.gz
  379. done
  380. #--------------------------------------------------
  381. # Section2: HC segmentation to subfields using HippUnfold package (here is run through singularity container)
  382. #--------------------------------------------------
  383. echo "Starting with HC segmentation"
  384. while IFS= read -r line1 && IFS= read -r line2 <&3; do
  385. mkdir $line1/HUinput $line1/HUoutput_T1
  386. mkdir -p $line1/HUinput/sub-$line2/anat
  387. cp $line1/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz $line1/HUinput/sub-$line2/anat/T1w.nii.gz
  388. done < FOLDERS-ANAT.txt 3< Hippunfold_indices.txt
  389. # khanlab_hippunfold_latest.sif is located in my home directory, change the path accordingly otherwise it will complain
  390. SIF_PATH="/home/kahmadi/khanlab_hippunfold_latest.sif"
  391. # Check if the SIF file exists before proceeding
  392. if [ ! -f "$SIF_PATH" ]; then
  393. echo "ERROR: Cannot find SIF file at: $SIF_PATH"
  394. echo "Please edit the script and update the correct path to khanlab_hippunfold_latest.sif"
  395. exit 1
  396. fi
  397. cat FOLDERS-ANAT.txt | while read line; do
  398. singularity run -e "$SIF_PATH" $line/HUinput/ $line/HUoutput_T1 participant -p --cores all --modality T1w
  399. done
  400. #--------------------------------------------------
  401. # Section3: Whole brain segmentation using FSL FAST to get cropped masks of CSF, WM (to be used with 'aCompCor') and GM (to be used later during cluster-level inference in GLM analysis with SPM)
  402. #--------------------------------------------------
  403. echo "preparation for FAST segmentation"
  404. cat FOLDERS-ANAT.txt | while read line; do
  405. mkdir $line/FSL_fast; cp $line/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz $line/FSL_fast
  406. # Skull stripping (adjust -f if needed)
  407. bet $line/FSL_fast/MP2RAGE-UNI_defaced_MPRAGEised.nii.gz $line/FSL_fast/T1 -f 0.3 # double check the output, you may need to change -f value to 0.2 in some cases
  408. fast -n 3 -t 1 -o $line/FSL_fast/fast_T1 -b bias -B $line/FSL_fast/biasedRemoved $line/FSL_fast/T1.nii.gz
  409. done
  410. # get masks of each tissue type
  411. cat FOLDERS-ANAT.txt | while read line; do
  412. fslmaths $line/FSL_fast/fast_T1_pveseg.nii.gz -uthr 1 $line/FSL_fast/csf_new.nii.gz
  413. fslmaths $line/FSL_fast/fast_T1_pveseg.nii.gz -thr 3 $line/FSL_fast/WM_new.nii.gz
  414. fslmaths $line/FSL_fast/fast_T1_pveseg.nii.gz -uthr 2 -thr 2 $line/FSL_fast/GM_new.nii.gz
  415. fslmaths $line/FSL_fast/WM_new.nii.gz -bin $line/FSL_fast/WM_new_bin.nii.gz
  416. fslmaths $line/FSL_fast/GM_new.nii.gz -bin $line/FSL_fast/GM_new_bin.nii.gz
  417. done
  418. # crop them to macth functional slab
  419. awk -F/ '!seen[$1]++' FOLDERS_no_PA.txt > unique_no_PA.txt
  420. paste FOLDERS-ANAT.txt unique_no_PA.txt | while IFS=$'\t' read -r line1 line2; do
  421. fslmaths $line1/FSL_fast/WM_new_bin.nii.gz -mas $line2/QC_vaso/vaso_mean.nii.gz $line1/FSL_fast/WM_new_bin_cropped.nii.gz
  422. fslmaths $line1/FSL_fast/csf_new.nii.gz -mas $line2/QC_vaso/vaso_mean.nii.gz $line1/FSL_fast/csf_new_cropped.nii.gz
  423. fslmaths $line1/FSL_fast/GM_new_bin.nii.gz -mas $line2/QC_vaso/vaso_mean.nii.gz $line1/FSL_fast/GM_new_bin_cropped.nii.gz
  424. done
  425. # The outputs of FAST segmenetation may contain a few csf or wm voxels inside HC i.e., incorrectly segmented voxels. To make sure that no HC voxel is included in those masks erode them before feeding them to aCompCor. Manual edits might be necessary at this stage.
  426. cat FOLDERS-ANAT.txt | while read line; do
  427. fslmaths $line/FSL_fast/WM_new_bin_cropped.nii.gz -kernel gauss 0.8 -ero WM_new_bin_cropped_eroded.nii.gz
  428. fslmaths $line/FSL_fast/csf_new_cropped.nii.gz -kernel gauss 0.8 -ero csf_new_cropped_eroded.nii.gz
  429. done
  430. #--------------------------------------------------
  431. # Section4: Create a study-specific T1-template to be able to run 2nd-level analysis
  432. #--------------------------------------------------
  433. echo "creating T1-template"
  434. mkdir Template_from_T1s
  435. while IFS= read -r line1 && IFS= read -r line2 <&3; do
  436. cp $line1/FSL_fast/T1.nii.gz Template_from_T1s/T1_sub_"$line2".nii.gz
  437. done < FOLDERS-ANAT.txt 3< Hippunfold_indices.txt
  438. cd Template_from_T1s
  439. antsMultivariateTemplateConstruction2.sh -d 3 -o SST_ -c 2 -j 4 -k 1 -r 1 -t SyN -m CC T1_sub0*.nii.gz
  440. # In case you want to check whether the second-level results fall into HC subfields and restrict the cluster-level inferences to the GM mask of the template, use Hippunfold and FAST on the T1 template.
  441. mkdir FSL_fast HUinput HUoutput_T1
  442. mkdir -p HUinput/sub-0000/anat
  443. cp SST_template0.nii.gz HUinput/sub-0000/anat/T1w.nii.gz
  444. singularity run -e "$SIF_PATH" HUinput/ HUoutput_T1 participant -p --cores all --modality T1w
  445. ## GET GM mask of the template T1 and run Hippunfold on template T1
  446. cp SST_template0.nii.gz FSL_fast/
  447. # Running FAST directly on SST_template0.nii.gz may fail because the background of template image may have non-zero values. To solve this, first create a masked brain using 3dAutomask and then run fast
  448. cd FSL_fast/
  449. 3dAutomask -prefix masked.nii.gz -apply_prefix SST_template0_maksed.nii.gz -dilate 2 SST_template0.nii.gz
  450. fast -n 3 -t 1 -o fast_T1 -b bias -B biasedRemoved SST_template0_maksed.nii.gz
  451. fslmaths fast_T1_pveseg.nii.gz -uthr 2 -thr 2 GM_new.nii.gz
  452. fslmath GM_new.nii.gz -bin GM_new_bin.nii.gz
  453. cd "$START_DIR"
  454. echo "FINISHED"

Pipeline.sh at commit a4ef8f2, no license · at the source

Overview

Authors: Khazar Ahmadi1,2, Stephanie Swegle2, Sriranga Kashyap3, Antoine Bouyeure1, Peter Bandettini2, Nikolai Axmacher1, Laurentius Huber2,4
  1. Department of Neuropsychology, Institute of Cognitive Neuroscience, Faculty of Psychology, Ruhr University Bochum, Bochum, Germany
  2. National Institutes of Health, Bethesda, MD, United States
  3. Krembil Brain Institute, University Health Network, Toronto, ON, Canada
  4. Martinos Center, MGH, Harvard Medical School, Charlestown, MA, United States
Institutions: National Institutes of Health (United States); Ruhr University Bochum (Germany); University Health Network (Canada); Krembil Brain Institute (Canada); Harvard University (United States); Massachusetts General Hospital (United States)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1197
Dates: received 31 August 2025; accepted 23 February 2026; published online 9 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1197 · PMID 41970695 · PMCID PMC13069395 · OpenAlex W7136342614
Open access: diamond, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: fMRI (modality), human (organism), systems (subfield)
Methods: Smoothing, state filtering, decompositions, Statistics, fMRI & imaging, Spectral & time-frequency
Keywords: laminar fMRI, VASO contrast, hippocampus, memory, ultra-high field
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (864164)
Citations: cited by 2 papers (Europe PMC); 75 references in the paper

Abstract

Sub-millimeter resolution functional magnetic resonance imaging (fMRI) at ultra-high field (≥ 7T) has offered an unprecedented opportunity to probe mesoscopic computations at a columnar or laminar level. However, its application has been primarily restricted to the neocortex. Inferior brain regions, particularly the hippocampus (HC), are challenging targets for laminar fMRI. Recent developments in acquisition methods have shown the feasibility of laminar recordings in the HC using gradient-echo blood oxygenation level-dependent (BOLD) contrast. Nonetheless, the spatial specificity of the BOLD signal is compromised by the draining veins’ bias. Cerebral blood volume (CBV)-sensitive sequences including vascular space occupancy (VASO) have emerged as a promising approach to capture the laminar activity with mitigated venous bias. Yet, its feasibility in the HC is unclear and challenged by methodological constraints. Here, we optimized VASO to mitigate the macrovasculature contribution in HC. By evaluating a series of advanced acquisition strategies tailored to HC, we obtained improved VASO signal quality with minimal artifacts. The optimized protocol was further validated with an autobiographical memory task. Our findings show that combining the high detection power of gradient-echo BOLD with the vein-bias-mitigated VASO contrast allows for differentiation between neural activity-related BOLD signals and those biased by draining veins. These results demonstrate the feasibility of submillimeter VASO acquired with conventional 7T scanners in the HC to map the circuit-level mechanisms of memory retrieval across HC subfields, laying a foundation to investigate the microcircuitry of HC-driven complex cognitive functions and their alterations in neurodegeneration and epilepsy.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 9 matches between paragraphs and lines of code.

gitlab.ruhr-uni-bochum.de/neuropsy/vaso_hc

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: a4ef8f28dd92d233e86c4ece66c7f4708d8bd740, 16 January 2026
Languages: MATLAB (13), R (6), Shell (4)
Size: 87 files, 23 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: FSL (4 files), ggplot2 (4 files), ANTs (3 files), SPM (3 files), nlme (2 files), AFNI (1 file), emmeans (1 file), GIfTI library for MATLAB (1 file), Image Processing Toolbox (1 file), Tools for NIfTI and ANALYZE image (MATLAB) (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
24 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 23 scripts, each with its path and the digest of its content;
  • 9 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data and Code Availability

Anonymized data have been deposited on Zenodo: https://zenodo.org/records/16032692. All original codes are provided in this GitLab repository: https://gitlab.ruhr-uni-bochum.de/neuropsy/vaso_hc.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 29 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 7 authors, 5 keywords, 1 funder, 72 references.

Cite

This paper

Ahmadi, K., Swegle, S., Kashyap, S., Bouyeure, A., Bandettini, P., Axmacher, N., & Huber, L. (2026). Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1197. https://doi.org/10.1162/imag.a.1197

BibTeX

@article{ahmadi2026blood,
author = {Ahmadi, Khazar and Swegle, Stephanie and Kashyap, Sriranga and Bouyeure, Antoine and Bandettini, Peter and Axmacher, Nikolai and Huber, Laurentius},
title = {{Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = apr,
volume = {4},
pages = {IMAG.a.1197},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1197},
url = {https://doi.org/10.1162/imag.a.1197},
pmid = {41970695},
pmcid = {PMC13069395}
}

RIS

TY - JOUR
AU - Ahmadi, Khazar
AU - Swegle, Stephanie
AU - Kashyap, Sriranga
AU - Bouyeure, Antoine
AU - Bandettini, Peter
AU - Axmacher, Nikolai
AU - Huber, Laurentius
TI - Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/04/09
VL - 4
SP - IMAG.a.1197
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1197
UR - https://doi.org/10.1162/imag.a.1197
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1197",
"type": "article-journal",
"title": "Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Ahmadi",
"given": "Khazar"
},
{
"family": "Swegle",
"given": "Stephanie"
},
{
"family": "Kashyap",
"given": "Sriranga"
},
{
"family": "Bouyeure",
"given": "Antoine"
},
{
"family": "Bandettini",
"given": "Peter"
},
{
"family": "Axmacher",
"given": "Nikolai"
},
{
"family": "Huber",
"given": "Laurentius"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1197",
"DOI": "10.1162/imag.a.1197",
"PMID": "41970695",
"PMCID": "PMC13069395",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1197",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
9
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1162/imag_a_00532 [code]
Characterizing BOLD activation patterns in the human hippocampus with laminar fMRI.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: nlme, GIfTI library for MATLAB, SPM, 3 other tools, fMRI, systems, 19 references, 2 authors
[2] doi:10.1371/journal.pone.0280855 [code]
Cerebral blood volume sensitive layer-fMRI in the human auditory cortex at 7T: Challenges and capabilities.
Journal: PloS one
In common: AFNI, Tools for NIfTI and ANALYZE image (MATLAB), ANTs, 3 other tools, fMRI, systems, 14 references
[3] doi:10.3389/fnins.2025.1537026 [code]
Mapping curvature domains in human V4 using CBV-sensitive layer-fMRI at 3T.
Journal: Frontiers in neuroscience
In common: Tools for NIfTI and ANALYZE image (MATLAB), FSL, SPM, 1 other tool, fMRI, systems, 13 references
[4] doi:10.1038/s41598-026-37599-4 [code]
Impact of thermal and physiological denoising on laminar functional connectivity.
Journal: Scientific reports
In common: Tools for NIfTI and ANALYZE image (MATLAB), Image Processing Toolbox, fMRI, systems, 15 references
[5] doi:10.1162/imag_a_00263 [code]
Characterisation of laminar and vascular spatiotemporal dynamics of CBV and BOLD signals using VASO and ME-GRE at 7T in humans.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: AFNI, ANTs, FSL, fMRI, systems, 13 references
[6] doi:10.1162/imag.a.1157 [code]
Laminar CBV and BOLD response characteristics over time and space in the human primary somatosensory cortex at 7T.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: AFNI, ANTs, FSL, fMRI, systems, 12 references
[7] doi:10.1093/cercor/bhad151 [code]
Imaging the columnar functional organization of human area MT+ to axis-of-motion stimuli using VASO at 7 Tesla.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: AFNI, ANTs, FSL, 1 other tool, fMRI, 11 references
[8] doi:10.1016/j.isci.2025.112967 [code]
Contextual responses drive a unique laminar signature in human V1.
Journal: iScience
In common: Tools for NIfTI and ANALYZE image (MATLAB), ANTs, FSL, 2 other tools, systems, 9 references
[9] doi:10.64898/2026.02.06.704362 [code]
Functional gradients dissociate between cortical layers
Journal: bioRxiv (preprint)
In common: AFNI, ANTs, FSL, 1 other tool, fMRI, systems, 10 references
[10] doi:10.1002/hbm.26094 [code]
Modelling the depth-dependent VASO and BOLD responses in human primary visual cortex.
Journal: Human brain mapping
In common: Image Processing Toolbox, fMRI, systems, 12 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1162/imag.a.1197.svg)](https://openscicode.org/badge/doi/10.1162/imag.a.1197)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1162/imag.a.1197.svg
   :target: https://openscicode.org/badge/doi/10.1162/imag.a.1197
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1162/imag.a.1197"><img src="https://openscicode.org/badge/doi/10.1162/imag.a.1197.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.