# Tract-wise fixel-based analysis with TractSeg

**URL:** https://community.mrtrix.org/t/tract-wise-fixel-based-analysis-with-tractseg/8104
**Category:** Uncategorized
**Tags:** tractography
**Created:** [December 10, 2024, 11:16am UTC](https://community.mrtrix.org/t/tract-wise-fixel-based-analysis-with-tractseg/8104 "2024-12-10T11:16:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LM10](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/l/c37758/32.png) [@LM10](https://community.mrtrix.org/u/LM10)
#### Post date: [December 10, 2024, 11:16am UTC](https://community.mrtrix.org/t/tract-wise-fixel-based-analysis-with-tractseg/8104/1 "2024-12-10T11:16:55Z")

</div>

Hi everyone,

I’d like to do a fixel-based analysis in certain tracts of interest (segmented with TractSeg) and was unsure about the best way to go about this. I’ve read these threads

> [@Calculating average FBA metrics of specific tracts](https://community.mrtrix.org/t/calculating-average-fba-metrics-of-specific-tracts/1805/):
>
> Hello, I came across [this](https://community.mrtrix.org/t/how-to-restrict-fixelcfestats-to-subset-of-tracts/845/4) reply by Rob, where he implies that it’s possible to “collapse” the measures (FD, FC, FDC) of a specified pathway and end up with a single measurement for the specified tract for each subject. I’m interested in doing exactly that, but I couldn’t find any more detailed information about that specific idea in the rest of the thread. So anyway, I produced a fixel mask for a specific region of my FOD template, and ran fixelcfestats successfully using the mask. My question…

> [@Fixel Based Analyses in Given Tract](https://community.mrtrix.org/t/fixel-based-analyses-in-given-tract/5390/):
>
> Hi, Really excited to try running an FBA. In addition to running an FBA on the entire fixel grid, I want to try running an FBA within a given tract. I primarily use TractSeg for tract segmentation/reconstruction. I see three potential ways to get a tract mask to use for FBA. Run TractSeg in native space → warp masks to template → find intersection of all subjects’ tract masks Warp FODs to template → run TractSeg in template space → find intersection of all subjects’ tract masks Run TractSeg o…

> [@How to restrict fixelcfestats to subset of tracts](https://community.mrtrix.org/t/how-to-restrict-fixelcfestats-to-subset-of-tracts/845):
>
> Hi everyone. I am trying to restrict fixelcfestats to run in an roi-based manner, using a seed-to-target region that I generated from tckgen (using the population template). Simply swapping out the track ROI for the full tractogram in fixelcfestats does not work, probably because I’m still feeding it the whole-brain FD images and/or whole brain analysis masks. Maybe I need to max out height or extent? Or maybe there is a way to convert the tractogram ROI to a fixel analysis mask ROI ? I also tr…

but since they all are a few years old there may be other recommendations or even a standard method by now.  
My first idea before reading all this was to 1) follow the regular steps for fixel-based analysis in template space, 2) to run TractSeg on each subject’s peaks file (by converting each subject’s wmfod.mif to wmfod.nii.gz, then running sh2peaks on it) with `TractSeg -i my/path/peaks.nii.gz`, 3) to apply the mask for a given tract to each subject’s template space FD/FDC/log(FC) file and extract the mean for that tract, and 4) to then use those means in statistical analysis.  
After reading those threads I get the impression that my approach is too simple and not considering some fine points, so I’d appreciate any thoughts on how to do this and whether there is some agreement about a more or less standard best practice at the moment!

Thank you in advance 🙂
