FBA analysis pipeline help

fba

#1

Hi,

I am performing FBA using warps generated from ANTS using the intructions: http://mrtrix.readthedocs.io/en/latest/spatial_normalisation/warping_images_with_warps_from_other_packages.html

I want to apply FOD modulation during this step (which also requires FOD reorientation to be performed as default).

However, in the FBA multi shell analysis pipeline, reorientation is performed in a subsequent step using the fixel images (not while warping the fods).

So, can I perform modulation + reorientation while waping the FOD’s and skip this step in my analysis?

Regards,
Karthik


#2

Yep, that should work. Reorientation can be performed either while warping the FODs, or either subsequently as a direct reorientation of the fixels. Don’t do both though, of course. Either the one, or the other. :wink:

As to modulation: if you do that, then your subsequent stats will be stats of the FDC (not the FD). If you don’t do that, you can still do FD and FC separately, and multiply them to obtain FDC (as done in the manual). In that way, you’ve got all 3 of them, separately, at your disposal.

So essentially: modulation should not be needed, unless you want to directly obtain FDC, and FDC only.


#3

Thanks, I would need to compute FD, FC and FDC :wink:

Continuing with the FBA, I computed the voxel and analysis fixel mask. After playing with several thresholds, I realized that there is no optimum value for the rat brains :face_with_raised_eyebrow: (too high threshold tends to cut off the white matter areas and induce holesl!)

However, in trying to include the wm areas, size of the analysis fixel mask looks enormous…

Capture

Looking forward to your comments :slight_smile:

Karthik


#4

Well, that’s rather “no optimum for 2-tissue CSD”, aggravated by the context being a rat brain with massive grey matter volume. :wink: You could always try to manually mask out some of the gray matter areas; the benefit of the rat is that it’s at least not as folded as in a human…

But this would more naturally be solved in 3-tissue CSD, where a lot of the signal that creates “false” WM FD in the rat cortex would be filtered out. As it stands, there is indeed not a single threshold that will work globally in your case.

I do agree your threshold needs to of course be low enough so as to not exclude actual WM. So for the 2-tissue case at hand, I think the best option would be the manual masking out of some volumes of GM as I mentioned…


#5

I managed to make a white matter mask by thresholding the warped fa images, and then created a analysis fixel mask. It still includes some gm though :slight_smile:

Let’s see how this pans out :wink:


#6

Looks reasonable, but always be careful when thresholding FA: you may (all too) easily mask out crossing WM areas, some which may have lower FA values than the (still relatively oriented) GM. So well, always quality-check the result. :slightly_smiling_face:

It’s better to be on the safe side, and still include some GM (while still removing the massive bulk of it), rather than throw out WM. Even throwing out WM fixels that weren’t going to come out as significant in your analysis may still inadvertently impact the results in nearby fixels if there was a genuine (though not per se significant) effect in them: nearby fixels’ effects boost each other via the connectivity-based fixel enhancement.

So long story short: make sure you’ve definitely got a nice complete WM mask. :wink:


#7

Ok, thanks! I will run the analysis with this mask, and keep you posted :wink:


#8

Quick update!

I ran the CFE analysis for computing FD… But, it crashed at some point due to memory issues!

I just looked at the documentation and it says that one must downsample the fod template prior to fba in such a scenario.

So, should I downsample all the other coregistered animals aswell or just the template?

Thanks :slight_smile:


#9

Yeah, so essentially you’ve got too many fixels in your template fixel analysis mask for the amount of memory your machine has. I’m not sure if you’re close to realistic numbers, or still far off, but downsampling the template is the way to go.

The most (scientificially) optimal way of fixing things at this stage is to redo everything from the template building step and onwards: so not just modifying some things in between, but really deleting everything from there onwards an redoing the steps, otherwise you’ll get yourself in trouble in difficult to diagnose ways. By the time you’ve got that sorted out, letting everything automatically re-run was already going to be faster and much cleaner.

What you want to do is thus, when you build the template, indicate a larger voxel size to build the template at.

Either that, or buy some more memory. :wink: …or run in on a more appropriate computer / computing environment, if you’re not already doing so.


#10

Ok, downsampling the data by a factor of 2 (from 75 um) might be my best bet for now :smiley:

I’m running the analysis on a server that has been under a heavy workload off late!

But, I will try a few things, tricks and get back to you :wink:


#11

I managed to get some interesting results :wink: However, a bit too late for ISMRM :neutral_face:

Thanks a lot,
Karthik


#12

:thinking: but there’s still 7 hours left… Loads of time! :stuck_out_tongue_winking_eye:


#13

I’ve once written 2 abstracts in that time. It’s perfectly feasible within realistic physical constraints. :grin:

(and if you’ve got a few collaborators and Google docs, you can even do an abstract in less than an hour… :exploding_head:)


#14

I was quite motivated to have an abstract! Unfortunately, my supervisor wasn’t up for it :disappointed:


#15

Good news is that I got group-wise significant results or fixels :wink:

Now, I’m interested in calculating a difference map i.e. mean control minus mean tbi to see differences that fwe might wipe out :smile:

How can I compute such a map?

Looking forward to your comments :slight_smile:


#16

Sounds like you’re after an absolute effect map, which is part of the output of FBA. You can also compute a relative effect (percentage); see the docs on this: http://mrtrix.readthedocs.io/en/latest/fixel_based_analysis/computing_effect_size_wrt_controls.html

But be careful with interpreting effect sizes that aren’t per se significant differences…


#17

Just to clarify :slight_smile: I’m looking to visualize the fd results as in the image: The fa mean difference map (control-TBI) is overlaid on the mean FA map

I’m slightly confused with regards to displaying the fba results, so I have some more questions!

If I load the abs_effect file on the fod template and threshold, color it by an arbitrary value, would it reflect the same?

Is it the same as having subtracted beta1 (control mean) - beta0(tbi mean)?

How would I represent the percentage effect correctly? Is it just loading the percentage effect map and thresholding it according to the fwe values (0.95-1)?

Thanks :slight_smile:


#18

Hi,

I created a fixel mask (using a much lower threshold) for fod lobe segmentation to include parts of the gray matter (see pic below). The fixelcfe stats for fd works fine! But, when I run it for fdc i get the error: subject data contains non-finite values: -nan. Is there a way to override this by setting the fixels which are nan to zero?


Is there any sense in even trying to extend the fba to include more of the gray matter? Looking forward to your comments :slight_smile:


#19

With regards to the above post, is it advisable to lower the fmls peak value (fod2fixel) from the default 0.1 in some scenarios?


#20

If I load the abs_effect file on the fod template and threshold, color it by an arbitrary value, would it reflect the same?

Is it the same as having subtracted beta1 (control mean) - beta0(tbi mean)?

The absolute effect size is the inner product between the contrast and the beta coefficients (code). So assuming that:

  • The first column contains 1s for TBI subjects and 0s for control subjects;
  • The second column contains 1s for control subjects and 0s for TBI subjects;
  • Your contrast is [ -1 1 ]

, then yes, this is equivalent to beta1 - beta0. But this is not necessarily true for any arbitrary experimental design.

How would I represent the percentage effect correctly? Is it just loading the percentage effect map and thresholding it according to the fwe values (0.95-1)?

This has to do with being very specific about what data you want to inform what aspect of the visualisation. Typically yes, one would use the percentage effect data to set the colour of each fixel, and the FWE (1 - p-value) image to threshold the fixel display. But it’s best to be explicit about this, rather than “loading the percentage effect map” :+1:

But, when I run it for fdc i get the error: subject data contains non-finite values: -nan.

Given the analysis of FD works without issue, this can only occur if there are non-finite values in your FC somewhere. You could find these using:
mrcalc FC.mif -isnan badFC.mif
, and looking for the fixels that light up in mrview. You could even take the sum of these images across subjects, to find the issue(s) more quickly. Exactly where these are, and how prevalent they are, might provide some insight into what’s going wrong.

Is there a way to override this by setting the fixels which are nan to zero?

You can; but it would be better to first figure out why you are getting NaN values before you go about masking them.

Is there any sense in even trying to extend the fba to include more of the gray matter?

This depends as much on your hypothesis as the underlying techniques used. Generally the fixel correspondence in these areas is poorer, and hence the within-group variances are very large.

With regards to the above post, is it advisable to lower the fmls peak value (fod2fixel) from the default 0.1 in some scenarios?

You certainly can; there’s no “correct” value. Generally for hard-constraint / multi-tissue CSD the FOD amplitudes are smaller than single-tissue soft-constraint CSD, so you can get away with smaller thresholds before you begin to include spurious data. But bear in mind that technically each time you try a different set of masking / segmentation thresholds and re-test your hypothesis, you should be adjusting your p-value threshold for multiple comparisons :neutral_face:

Rob