DCAN-Labs / abcd-hcp-pipeline

bids application for processing functional MRI data, robust to scanner, acquisition and age variability.
https://hub.docker.com/r/dcanumn/abcd-hcp-pipeline
BSD 3-Clause "New" or "Revised" License
49 stars 19 forks source link

How should multiple sessions be handled? #47

Closed iamdamion closed 2 years ago

iamdamion commented 2 years ago

Question: I have been testing the pipeline using a single subject and single session. However, our collections are longitudinal and we preprocess as scans come in. I see that there's an argument to process all sessions for a subject as one. However, the help doesn't show an argument to specify a single session and it's unclear how multiple sessions are handled if they are slowly being added.

If one session is processed and then a new session is BIDS sorted and added, if the pipeline is run again for that subject, will it check for outputs, skip the already processed session, and only process the new session? Or will it try to reprocess all ses- folders under that sub- folder?

If the latter, how do you suggest we handle our workflow using the DCAN pipeline (processing only a single session)? Thanks.

arueter1 commented 2 years ago

Hi Damion! Thanks for the question. I've assigned @ericfeczko and @hough129 to this and they will get back to you as soon as they are able. Please note that we are experience a very high volume of collaborator requests at this point in time, so we are experiencing some delays in getting back to folks. Thanks in advance for your patience!

madisoth commented 2 years ago

Hi Damion,

I am not set up to test this right now, but I believe --participant-label can actually accept either:

(1) a list of subject IDs, or (2) a Python dictionary with subject IDs as the keys, and session ID lists as the values EDIT: Seems this is not actually implemented, despite the comment in read_bids_dataset in helpers.py implying it was.

In case (1) I believe all sessions for the subject(s) would be reprocessed. In (2) only the specified subject-session pair(s) should be processed.

I am in total agreement that should be made explicit in the documentation (assuming it actually works as I am guessing), or we just should make it two separate options, --participant-label and --session-id, to be consistent with nhp-abcd-bids-pipeline and infant-abcd-bids-pipeline.

ericearl commented 2 years ago

@madisoth I agree with your last statement a lot and that might be a small change given the code already exists in nhp-abcd-bids-pipeline and infant-abcd-bids-pipeline.

@iamdamion If you want this done sooner I might be able to help you make those edits and make a PR?

iamdamion commented 2 years ago

@madisoth As a user, I agree that adding an explicit session-id option would be great. This isn't an extremely urgent need for us right now (I actually am running into a hard stop error on the DCANBOLD step that I'm going to add a new issue request for after this comment).

@ericearl If you have time, I'd be happy to do that and help get a PR set up. I could email you and set up a time to go over it if that works for you.

Thanks everyone!

iamdamion commented 2 years ago

@madisoth Looks like @ericearl and I are going to take a stab at this on friday. We'll update here if we get a PR ready.

iamdamion commented 2 years ago

Pull request has been made. The update works and is flexible for multiple IDs and multiple visits at the same time.

arueter1 commented 2 years ago

I believe the pull request went through. I am going to close this out. Feel free to open it again if necessary!