QSIRecon Custom Atlas and Response Functions

Hello,
My team has been using QSIPrep and now we’re moving on to QSIRecon. I’ve been able to successfully process a subject with QSIRecon, but before I continue with more subjects my team has a couple of questions that we can’t seem to find the answer to on the documentation page.

  1. How exactly do we use a custom atlas? I saw the section for it on the documentation page, but it’s still not exactly clear to me how we can use a custom atlas (say from Freesurfer). Also, the link in that section does not seem to work.

  2. Is there a way to use our own response functions? My team is interested in creating average response functions from a set of controls and then using those response functions for our entire set of subjects. Is this possible?

  3. Is there a workflow that generates FA and ADC/MD maps?

Thank you for all your help!

Best,
Sofie

Hi @scchung,

Documentation is here: Built-In Reconstruction Workflows — qsirecon 1.2.1.dev4+g9c2ed9aa5 documentation. You have to make a BIDS valid atlas (i.e. following BEP038), pass in the folder containing your atlas as a --datasets, then add the name of your atlas as an argument for --atlases

No, not at the moment, but you can use QSIRecon just for response function generating step and then average after. (see next posts)

Several. DIPY DKI uses the tensor component of a kurtosis model (multishell compatible). DSI Studio GQI uses an ordinary least squares and TORTOISE uses a weighted linear least squares approach. You may consider only using b-values less than some cut off such as 1200 unless using the multishell DKI. You can see an example of all approaches being combined here: qsirecon/qsirecon/data/pipelines/abcd_recon.yaml at main · PennLINC/qsirecon · GitHub.

Best,
Steven

Just to follow up on @Steven’s post: technically QSIRecon expects atlases to follow an older version of the BEP. BIDS has since merged the BEP with some changes, so QSIRecon expects something that isn’t actually BIDS-compliant.

Here is an example tree from a test:

/path
├── atlas-carpet
│   ├── atlas-carpet_space-MNI152NLin2009cAsym_dseg.json
│   ├── atlas-carpet_space-MNI152NLin2009cAsym_dseg.tsv
│   └── atlas-carpet_space-MNI152NLin2009cAsym_res-01_dseg.nii.gz
└── dataset_description.json

In the dataset_description.json, you should have DatasetType set to atlas. Since, in that example, the atlas dataset is located at /path and the name of the atlas (from atlas-<label>) is carpet, you could pass that in as --datasets carpet=/path --atlases carpet.

We plan to overhaul atlas organization to match BIDS in the near future, but we don’t have a timeline for it yet.

We did add the ability to ingress custom response functions not that long ago. You could run QSIRecon to generate the subject-wise response functions, then average them with your own code, and then incorporate those into a new pipeline.

This is a very new addition so we don’t have any good documentation on it. We do have a pair of pipelines set up for testing that you could use as a template:

The first pipeline estimates the response functions:

The second one uses averaged response functions stored in --recon-spec-aux-files with the names wm.txt, gm.txt, and csf.txt: