TWFC/TWdFC for specific networks

Hi everyone,

I am currently analyzing rs-fMRI and dwi data with TWFC/TWdFC and have 2 questions I was hoping you might be able to help me with:

  1. I pre-processed my fMRI data in the CONN toolbox and it works well to run the TWFC an TWdFC on the processed BOLD data and tractograms constructed in MRtriX. However, I am particularly interested to look at connectivity in the reward network that I reconstructed from the rs-fMRI data with seeds in the NAc. For this purpose I used the generated BETA.nii files corresponding to the reward network for each participant. When I try an run the analysis, I get the following error message:

tckdfc: [100%] uncompressing image “stcog07_reward_lh.nii.gz”

tckdfc: [ 0%] Generating (static) TW-dFC image… tckdfc(70908,0x70000f91e000) malloc: can’t allocate region

:*** mach_vm_map(size=5629499534213120, flags: 60000100) failed (error code=3)

tckdfc(70908,0x70000f91e000) malloc: *** set a breakpoint in malloc_error_break to debug

This makes me wonder if I’m actually using the correct fMRI image? I’m new to fMRI analysis, but to my knowledge, the BETA files are the only ones containing the functional network information by subject, so I wouldn’t know what else to use.

Would it be incorrect to instead analyze the TWFC maps of the whole brain in an analysis toolbox like CONN with the same seed region in the NAc as used to reconstruct the reward system in the functional data to see what track-weighted functional connectivity networks come up?

  1. I previously performed tractography in this sample to reconstruct the medial forebrain bundle and anterior cingulum bundle, both of which run through regions in the reward system. Would it make sense to run TWFC or TWdFC with the .tck files just from the medial forebrain bundle and anterior cingulum?

Thanks, Lena

Hi Lena,

When I try an run the analysis, I get the following error message:

There’s a couple of things to disentangle here.

  1. I think part of the confusion may be coming from a nomenclature problem. There’s a conflict between these two:

    I am currently analyzing rs-fMRI and dwi data with TWFC/TWdFC

    tckdfc: [ 0%] Generating (static) TW-dFC image

    What you’re generating with “tckdfc -static” is not what was originally referred to as “TWFC”. The latter is actually just a specific configuration of the more general framework of “Track-Weighted Imaging (TWI)”, and the requisite steps are now described in our new Wiki section here. What’s referred to as “static” in the TWdFC manuscript and the tckdfc command is maybe more instructively thought of as the TWdFC method where the width of the sliding window is equal to the entire time series, such that only a single output volume is generated.

  2. This specific bit:

    tckdfc(70908,0x70000f91e000) malloc: can’t allocate region

    Refers to an inability of your system to allocate enough RAM to store image data.

    What I think is going on here is an uninformative error message due to misuse of the command. TWdFC (whether “static” or “dynamic”) expects a 4D time series as input, whereas the tckmap command utilised in the TWFC method expects the input associated image to be a 3D image. Given it sounds like you are referring to a beta coefficient image from a first-level fMRI analysis, I’m expecting this to be a 3D image. So what’s probably happening is that tckdfc is not properly checking to make sure that the input image is 4D rather than 3D, and it’s therefore trying to allocate memory in a non-sensible way.

Would it be incorrect to instead analyze the TWFC maps of the whole brain in an analysis toolbox like CONN with the same seed region in the NAc as used to reconstruct the reward system in the functional data to see what track-weighted functional connectivity networks come up?

disclaimer: not an fmri person

I think that as currently described it doesn’t make sense. Specifically a TWFC map requires a 3D image as input and produces a 3D image as output, so I don’t see how that could be fed to a functional connectivity toolbox. A TWdFC time series theoretically could maybe be provided to such a toolbox, but there would I think need to be a better justification for doing so. The TWdFC maps are essentially “the space of all functional connections projected into the white matter space” via streamlines; so whether or not subsequent processing of such data within a connectivity toolbox makes sense would need to be assessed carefully.

Would it make sense to run TWFC or TWdFC with the .tck files just from the medial forebrain bundle and anterior cingulum?

  • TWFC: Highlighting the specific involved white matter pathway is kind of what TWFC does; so if you’ve gone to the effort of selecting the streamlines corresponding to those bundles, I’m not sure that TWFC can provide you with anything more than what you already have (i.e. the segmented streamlines).

  • TWdFC: For segmented white matter bundles, the only way I see TWdFC contributing novel information is if there is contrast in how the BOLD timeseries fluctuate within the volume of the endpoints used to segment the bundle, and such contrast is manifested within the cross-section of the bundle. Whether or not there is an experiment where such would be valid, I don’t know. One context where it might make more sense is if you have just one grey matter region of interest (rather than a white matter bundle of interest, which kind of implies both endpoints are known), and what to see how that region co-fluctuates with other regions in a way that is constrained by the underlying white matter connectivity. But if your streamline endpoints are reasonably tightly constrained in order to segment the bundle, then basically all you’re going to see in the resulting TWdFC map is a time series that looks like the dynamic functional connectivity of those two endpoints, but displayed in the shape of the tract, which isn’t really providing any new information either.

Rob