-
Notifications
You must be signed in to change notification settings - Fork 308
fix collect freesurfer #3588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix collect freesurfer #3588
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3588 +/- ##
==========================================
- Coverage 72.88% 72.85% -0.04%
==========================================
Files 60 60
Lines 4821 4823 +2
Branches 626 627 +1
==========================================
Hits 3514 3514
- Misses 1164 1165 +1
- Partials 143 144 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Given that, even if you use |
|
Do you mean that this change would break the pipeline when not using precomputed freesurfer? If I understand correctly the code, if using In my case I cannot simply use symlinks, as these session-level folder already exists as it is a true longitudinal freesurfer (including Covering all these cases with tests would be tricky, but important. |
|
I think the current changes would break things when using |
| (about, ds_report_about, [('out_report', 'in_file')]), | ||
| ]) # fmt:skip | ||
|
|
||
| if config.workflow.subject_anatomical_reference == 'sessionwise': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like this?
| if config.workflow.subject_anatomical_reference == 'sessionwise': | |
| if (config.workflow.subject_anatomical_reference == 'sessionwise') or (config.workflow.session_label is not None): |
I think it would not break that usecase. Trying to branch all the possibility, this is complex.
(BTW: Anyway, sorry I am getting lost in the multiverse, just to say that the logic from command-line options -> select files -> select single representative file / generic source (with the broken AFAIK the freesurfer outputs naming is not covered by tests in either fMRIPrep or sMRIPrep for circleCI or pytests, but I know running full freesurfer in tests would be a pain, unless we use |
|
The scenario I was imagining was a longitudinal dataset (let's say 4 sessions), and running fMRIPrep using either
That is definitely an issue when you update your fMRIPrep version. It shouldn't be a problem if you're rerunning with the same version though, right?
I think that's a great idea! I had a PR that raises an error if |
What output do you envision in smriprep and freesurfer for that usecase?
Maybe we should have For the usecase you describe, the simpler would be to have separate outputs derivatives folders, as sMRIPrep outputs will collide, and freesurfer will too with this fix.
No, with the same version, for apply and derivatives reuse, as described above.
The main issue is that a lot of the tests require workflow runtime, to check that the files it tries to grab makes sense. So for it to be lightweight, we should have a separated workflow that only grab files. Or maybe monkeypatch the heavy compute subworfklows. |
Changes proposed in this pull request
Currently when preprocessing fMRI only dataset using precomputed sMRIPrep+freesurfer (
--fs-no-resume) and passing--session-label yy, thefs_subject_idends up beingsub-xx_ses-yyusing the fMRI selected session, and thus it picks files from that folder. I noticed it because my jobs was only pre-fetching with dataladfreesurfer/sub-xxfolder from a precomputed longitudinal freesurfer, but the pipeline tried using freesurfer files fromsub-xx_ses-yyinstead, which were broken symlinks.Not sure what is the best approach, but it seems that it should only try to get session-specific freesurfer when using
--subject-anatomical-reference sessionwise, but it might require another case forfirst-lex.I am not 100% sure what are the outputs when you using this option:
Documentation that should be reviewed