Jörn Alexander Quent's notebook

where I share semi-interesting stuff from my work

Visualise your surface-based neuroimaging data on flat maps using ciftiTools

Recently I’ve tried to use the fantastic R-package ciftiTools to visualise surface-based neuroimaging data on flat maps. This was surprisingly tricky compared to using the standard inflated surfaces, which can be as easy as view_cifti_surface(my_xii). However when I supplied the flat surfaces that come with the HCP_S1200_Atlas, I ran into the issue that nothing was visible because of the initial rotation of the maps. Read more →

Running large simulations on a desktop computer with R (tips & tricks)

Let me briefly describe what I learned while attempting to run a large simulation on my desktop computer as I think it might be useful to others. Here is the problem: I was forced to run a simulation on my desktop computer because brms couldn’t be installed on my department’s high performance computing (HPC) cluster. Read more →

A way to get MNI coordinates for subcortical voxels of a CIFTI file

What do I want to do? In this post, I will demonstrate how it is possible to use the R packages cifti and ciftiTools to get the MNI coordinates of the subcortical voxels in your CIFTI file. This table can then be used to select voxels based on their coordinates and do further things with them like creating masks. Read more →

Understanding the basics of the general linear model (GLM) in the context of fMRI

Prelude Sources that I found useful General libraries Simple linear regression Multiple linear regression Special cases One sample t-test Two sample t-test Paired t-test Two-way ANOVA Does the contrast weighting matter for the test-statistics? Covariance matrix of the residuals A example design matrix for fMRI Multiple testing problem Calculate FWE FWE correction Random field theory Permutation tests FDR Conclusion Glossary Prelude I was revisiting some of the basics surrounding fMRI especially the GLM and contrasts. Read more →