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
[WIP] ENH: Add --func-only option to skip anatomical processing #808
Conversation
Sync with refactored bold module
Ah yes, got it. I see now there is a whole new workflow to take care of the func-only case instead of editing the original func workflow. Also, I was thinking that it might be helpful for me to contribute a BIDSgenerator file that would be easily configured by people who want to use the pipeline but don't have the BIDS data format. I know our lab was hesitant to use the pipeline because of the overhead of renameing and restructuring data, so it might increase use if there is an add-on file that takes care of this. I could put in the places in run.py and other scripts where BIDSgenerator.py is called |
Sure, but it is a lot easier to keep things focused :). Feel free to open as many PRs as features you'd like to contribute. It's much more manageable when contributions are handled separatelly |
As you can see above, I just pushed one commit to your branch. You can see it where it says "convert indentation to spaces" above. To get those changes, make sure you |
Ok, so I don't mess this up: To open a PR to push the BIDSgenerator.py file and other files updated with (commented out) lines to handle this script, I would do a new PR from the https://github.com/poldracklab/fmriprep page on the master branch? |
Yes - to open a new PR:
|
Alrighty I just requested a new one-- it should be just two files, one added (BIDSgenerator.py) and one modified (run.py) |
Cool! Let's focus on getting this one merged first 👍 I have updated your PR comment up above with the tasks that need be done before merging. You will also see below my comment a message saying "All checks have failed". This means that there are problems with the code and it didn't pass tests. Let's not worry about this now, but tests will need to get green before we can merge. We'll address this in a future. Please let me know what is stopping you at this point (if any). |
Ok sounds good. I just connected up the onlyfunc workflow in base.py and I
need to know what to merge:
I did
git add --all
git commit -m "[my message]"
now what? (git push --set-upstream origin master?)
…On Wed, Nov 1, 2017 at 10:34 AM, Oscar Esteban ***@***.***> wrote:
Cool!
Let's focus on getting this one merged first 👍
I have updated your PR comment up above with the tasks that need be done
before merging.
You will also see below my comment a message saying "All checks have
failed". This means that there are problems with the code and it didn't
pass tests. Let's not worry about this now, but tests will need to get
green before we can merge. We'll address this in a future.
Please let me know what is stopping you at this point (if any).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJctLUepIenlJEV2NAz2vfJeiMOL2P2rks5syKuOgaJpZM4QOaz_>
.
|
The |
ok done
…On Wed, Nov 1, 2017 at 10:53 AM, Oscar Esteban ***@***.***> wrote:
git push
The --set-upstream origin is only for the first time you push. After that
origin is always set when you push.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJctLXn65-zj2tXhAxLO44IdsK-Mbzsbks5syLA2gaJpZM4QOaz_>
.
|
Indeed! I can see your changes here: 940340b BTW, with the Please remove it:
|
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 a couple quick things I noticed. This is looking good!
.zenodo.json
Outdated
"name": "Madeleine Snyder", | ||
"affiliation": "Harvard Medical School, Harvard University, Cambridge, Massachusetts" | ||
}, | ||
{ |
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.
Could you move this to just above Russ Poldrack? Outside contributors are listed in order of contribution, starting at Feilong Ma.
Also, we haven't generally included city and state in the affiliation. For consistency, I'd suggest dropping it. And do you have an ORCID? It doesn't take much time to get one, and they help disambiguate researchers with similar names, as well as persist across changes in institution/name.
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.
Sorry for the ordering issue, it's my bad. @madeleinesnyder please fix the ordering and add your ORCID if available/possible.
fmriprep/workflows/base.py
Outdated
]) | ||
|
||
if anat_only: | ||
return workflow |
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.
If I specify --anat-only
and --func-only
, this won't be hit, so the functional workflows will still be generated. There should probably at some point (possibly in run.py
) be a check to raise an exception if both flags are passed to fmriprep.
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.
Ok, I would just put in a simple if anat_only and func_only raise exception before any of the workflows are put together. Any reasons to put it elsewhere?
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.
The "proper" way to do this is using mutually exclusive options
# Create a mutually exclusive group for --anat-only and --func-only
g_blocks = parser.add_mutually_exclusive_group()
g_blocks.add_argument('--anat-only', action='store_true',
help='run anatomical workflows only')
g_blocks.add_argument('--func-only', action='store_true',
help='run functional workflows only '
'(dismiss the anatomical images if present).')
workflow.connect([ | ||
(inputnode, func_preproc_wf, [('subjects_dir', 'inputnode.subjects_dir')]), | ||
(bidssrc, bids_info, [ | ||
(('bold', fix_multi_bold_source_name), 'in_file')]), |
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.
fix_multi_bold_source_name
is undefined
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.
I assumed there was an analog to fic_multi_t1w_source_name, which pops up in the anat_only workflow.
(bidssrc, func_preproc_wf, [('bold', 'inputnode.bold')]), | ||
(summary, func_preproc_wf, [('subject_id', 'inputnode.subject_id')]), | ||
(bidssrc, ds_summary_report, [ | ||
(('bold', fix_multi_bold_source_name), 'source_file')]), |
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.
fix_multi_bold_source_name
is undefined
(('bold', fix_multi_bold_source_name), 'source_file')]), | ||
(summary, ds_summary_report, [('out_report', 'in_file')]), | ||
(bidssrc, ds_about_report, [ | ||
(('bold', fix_multi_bold_source_name), 'source_file')]), |
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.
fix_multi_bold_source_name
is undefined
I can put some hours on pushing this PR forward this week, WDYT @madeleinesnyder ? There are some outstanding errors, if you look at Travis tests:
|
Yes, I can come work on main campus if that would help. Or work remotely from my lab. Either works. Let me know. |
Hey @madeleinesnyder, we released fmriprep-1.0.0 yesterday. I am hoping that after next week I'll have more time and can help you finish this up. Let me know when you can touch base. |
Congrats! My schedule is pretty flexible all next week, so let me know what
time works best for you.
…On Thu, Dec 7, 2017 at 9:21 AM, Oscar Esteban ***@***.***> wrote:
Hey @madeleinesnyder <https://github.com/madeleinesnyder>, we released
fmriprep-1.0.0
<https://github.com/poldracklab/fmriprep/releases/tag/1.0.0> yesterday. I
am hoping that after next week I'll have more time and can help you finish
this up. Let me know when you can touch base.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJctLVWaYjYyJfjUTTV9rJEUv0DOE_45ks5s-B62gaJpZM4QOaz_>
.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
wf
.init_onlyfunc_preproc_wf