clinica icon indicating copy to clipboard operation
clinica copied to clipboard

Add BIDS reading task to Pydra

Open ghisvail opened this issue 2 years ago • 5 comments

Integrated from preliminary work done in pydra-bids.

ghisvail avatar Aug 08 '22 15:08 ghisvail

This implementation passes the tests, but there are issues with type alignments between the nipype tasks and the BIDS reader task. I am investigating.

ghisvail avatar Aug 11 '22 09:08 ghisvail

Looks like I found the issue. Testing on T1 linear works as expected.

ghisvail avatar Aug 11 '22 13:08 ghisvail

I wonder whether we can do better than converting the query results to a tuple or single value and listing the keys to the output spec. Best would be to be able to say I am going to return a dictionary (directly resulting from the query) whose keys are listed in the output spec of the FunctionTask.

I have asked on Mattermost, we'll see. So far, this solution is doing the job.

ghisvail avatar Aug 11 '22 14:08 ghisvail

I think it makes sense to add the functionality to filter on subject/session in this PR.

That's gonna take longer then. Is that ok?

ghisvail avatar Aug 16 '22 13:08 ghisvail

I think it makes sense to add the functionality to filter on subject/session in this PR.

That's gonna take longer then. Is that ok?

I mean it's primary reason brought forward motivating the use of ancpbids so it seems the PR is not complete without this feature

omar-rifai avatar Aug 16 '22 15:08 omar-rifai

I have iterated quite a bit on this since the initial design and eventually reached a design for tasks defining dynamic specifications that I am happy with. It is easily testable and easier to read than the initial design based on factories.

Since pydra-bids will likely appeal to a wider audience than just Clinica, I'd propose to publish it as its own package and have Clinica depend on it.

ghisvail avatar Oct 20 '22 17:10 ghisvail

I'd propose to publish it as its own package and have Clinica depend on it.

https://pypi.org/project/pydra-bids/

ghisvail avatar Nov 17 '22 14:11 ghisvail