-
Notifications
You must be signed in to change notification settings - Fork 95
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
[ENH] BIDS Derivatives-compatible outputs #574
[ENH] BIDS Derivatives-compatible outputs #574
Conversation
io.filewrite( | ||
data_oc, | ||
op.join(out_dir, 'desc-optcom_bold.nii.gz'), | ||
ref_img | ||
) |
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.
Write OC data earlier than before. Much more transparent this way.
fout = filewrite(ts, op.join(out_dir, 'ts_OC'), ref_img) | ||
LGR.info('Writing optimally combined time series: {}'.format(op.abspath(fout))) | ||
|
||
write_split_ts(ts, mmix, mask, comptable, ref_img, out_dir=out_dir, suffix='OC') |
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.
Just moved down. Not removed.
""" | ||
acc = comptable[comptable.classification == 'accepted'].index.values | ||
|
||
fout = filewrite(ts, op.join(out_dir, 'ts_OC'), ref_img) |
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.
Moved to main workflow.
Codecov Report
@@ Coverage Diff @@
## main #574 +/- ##
==========================================
- Coverage 93.64% 93.58% -0.07%
==========================================
Files 26 26
Lines 2029 2041 +12
==========================================
+ Hits 1900 1910 +10
- Misses 129 131 +2
Continue to review full report at Codecov.
|
For transparency, here is what the ICA decomposition json will look like, with two example components:
|
Do we want to output sidecar jsons for these files as well? To specify |
Sorry, which files ? |
We'd probably want jsons for all of the files. At least the core niftis. EDIT: And a top-level derivatives description json? |
I think the only things left are:
|
I was just talking with @jbteves about this and I have one non-trivial concern. Sorry for not bringing this up earlier. This is going to be a major breaking change on outputs. Right now it seems to be close, but not quite matching the BIDS derivatives format and BIDS deviates isn't totally fixed either. That means we'll have another breaking change for output names in the near future (probably within the coming year). You've put so much work into this that I don't want it sitting stagnate until we agree on perfect file naming. One middle ground might be to add a --BIDSoutput flag that would use the new names when true & the current names when false. The default would currently be false. Doing that would allow for incremental changes in BIDS derivatives output names within main for the people using those outputs (and this would allow for issue and fixes that come from active use) while not breaking things for people using the current output names. Knowing that file naming happens all over the code, this will be a bit of a headache & this whole topic is worth discussion (probably at tomorrows dev call). I figured I'd comment now instead of just speaking up during the dev call so that others could think about this in advance. I also have a tangential suggestion. If we are making breaking changes to file names, is it time to finally get ride of 'Optimally Combined' / 'OptCom' / 'OC' in file names? There are several weighted summation methods in the code and @jsheunis has just proposed a new one. Having several methods all being saved as 'optimally combined' creates unnecessary confusion. Josh also noted 'Com' can mean 'components' in other situations, which adds to the confusion. Perhaps 'Weighted Sum' / 'WSum' / 'WS' is another option??? |
I think we're well-timed for a breaking change as we approach our first minor-version release, which usually signals backwards-incompatible API changes :) I'd suggest that we pin ourselves to a set BIDS version for a while, and bump at the next minor-version release. But I agree with your broader point that this is worth discussing !
I'm fine with that change, though it's a good push for us to think about where we can explicitly denote the combination method. I'd argue that this is something that should be more transparently documented to end-users as they can call more methods. |
Per today's call, @handwerkerd and @jbteves will look into a name-swapping option next week. |
Quick thing: I noticed that this actually isn't quite compliant because we don't keep the subject and session for the outputs. Should we maybe also add a |
This won't make |
Just so we don't forget it, we discussed that updating the file names can be a burden if BIDS guidelines keep changing. A solution could be to have a |
Alright, I have a significant draft of what's basically a BIDS derivatives enabler + major modularization of |
@jbteves I worry about keeping eyes on a PR to my fork. In my experience PRs like that tend to get ignored.. What if we change the target of this PR to a new branch and then merged? Then you could open your PR to that branch and we could have a draft PR from that branch to |
I'm not quite sure I follow. In my branch, everything in this one is merged already. |
This would mean opening a PR to
This should work fine, but it won't let us evaluate your changes in isolation. They'll be mixed in with my changes. My alternative was to (1) change the target of this PR to a new branch (e.g., |
Oh, okay, I follow now. Sorry, I don't know how I misunderstood that. Yes, let's retarget to a branch on this repo that I can open a PR to it and shows up here for everyone to see. That sounds good, thanks! |
Done! EDIT: You can target |
Closes #146 and closes #649.
Changes proposed in this pull request:
TODO
gscontrol_raw()
)desc-ICA_metrics.tsv
vs.desc-[tedana|AROMA]_metrics.tsv
EDIT:
Whoops, I thinkCircumvented by just havingdesc-tedana_metrics.tsv
isn't specific enough since we'll have metrics from ICA and PCA.... 🤔desc-PCA
for the TEDPCA metrics anddesc-tedana
for the final TEDICA metrics.