sina-mansour / UKB-connectomics

This repository will host scripts used to map structural and functional brain connectivity matrices for the UK biobank dataset.
https://www.biorxiv.org/content/10.1101/2023.03.10.532036v1
62 stars 7 forks source link

MRtrix3 python API #1

Closed sina-mansour closed 2 years ago

sina-mansour commented 2 years ago

Following on the suggestion by @Lestropie (this commit):

RS: Porting to the MRtrix3 Python API would supersede some of the colouring / logging features, scratch directory usage, and make some of the syntax more clear. I have a particular distaste for Bash, though some prefer to remain in that space. But it would also mean that upon making the script publicly available, people would be offered a standardised help page as with other MRtrix3 commands etc.. Up to you, obviously I'd like people to be using the API given I created it, but I've also got the experience of things that go wrong when scripting in Bash that motivated me to create it. https://www.sciencedirect.com/science/article/pii/S1053811919307281#appsec2

sina-mansour commented 2 years ago

Hi Rob,

The script for tractography is actually a part of other scripts (both in python and bash) that together run the whole FC and SC mapping pipeline on Spartan.

The script already handles things such as basic logging and uses scratch space to speed up file access speed. However, the idea of the standardized help page along with the codes released sure sounds interesting. Do you reckon there's a way to merge the existing codebase with the Python API such that it requires minimal to no manipulations of the current structure and yet provides the benefits of the Python API?

On the other hand, given that the current structure of scripts and codes is functional and was used and tested in the atlas generation and FC mapping pipeline, I wonder if adding the Python API support may slow down a rapid deployment of the remaining SC pipeline.

Lestropie commented 2 years ago

I think that given the breadth of the existing functional code base it wouldn't be worthwhile. If the structural connectome construction were standalone it might make sense, but I don't think it makes sense looking at the project as a whole.