I’m wondering what’s the best way to generate the individual tracts and visualizations when running QSIprep (prep and recon) on diffusion data. The recon step (pyafq_tractometry) outputs many files, including 2 trk files which contain a collection of tracts bundled in a single tractogram.
After exploring the pyAFQ documentation, I found that I can use the pyAFQ command-line-interface by running pyAFQ /path/to/config.toml where config.toml is filled out with the proper paths and specs. This produces individual tracts and viz from the QSIprep output. Is there a standard way to build this into the QSIprep recon step so it’s all done at once when run on my HPC?
Moreover, is there a way that I can customize the visualizations that are output? i.e. make color-coded tract scenes that are automatically generated?
cli_parser.add_argument(
'-q',
'--generate-qsiprep-json-only',
dest='generate_json',
action="store_true",
default=False,
help="Generate two default json files at the path"
+ " (which should be a folder) specified without running pyAFQ;"
+ " this json can be used to define a recon workflow in qsiprep.")
So, using the pyAFQ CLI I would need to generate a QSIprep JSON and modify it, and pass it into QSIprep --recon-spec? Sorry for my inexperience. Thanks!
Hmm interesting. I wonder why it’s not outputting the bundles and clean_bundles. It’s not crashing so that doesn’t make sense.
The end of my operational file looks like this:
230623-16:14:42,635 nipype.workflow INFO:
[Node] Finished "run_afq", elapsed time 24830.610387s.
@Ariel_Rokem Would you possibly have a suggestion?
I am not sure why you are not getting these bundle folders. It does look like everything is completing as intended and they should be there.
There should also be another output in each subject’s folder, which is a .html file that contains a visualization with color-coded bundles that can be viewed interactively. Do I understand correctly that this file also isn’t generated?
In addition to this visualization, you can use the fury to generate publication-quality visualizations such as those in this example.
Hey @mkersey, one more question: how confident are you that the qsiprep image that you are using is indeed running version 0.18 of qsiprep? The reason I ask is that this should have been fixed in 0.18, and I worry that you might be seeing this because you are inadvertently running a previous version. Thanks!
I was actually running the recon separately from the prep with the —recon-only flag so that I could try multiple different recon options, which I should have specified earlier. I just tried running it altogether (prep + recon) on another case and triple checked that I was using version 0.18. Now I see the bundles and viz files! I’m amazed by how great the visualizations look. I don’t know why it didn’t it didn’t produce these folders when I ran recon-only after running prep.