Skip to content
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

Fix shells and lmax argurments #39

Merged
merged 2 commits into from
Jan 26, 2023
Merged

Fix shells and lmax argurments #39

merged 2 commits into from
Jan 26, 2023

Conversation

kaitj
Copy link
Collaborator

@kaitj kaitj commented Jan 26, 2023

Proposed changes

Resolves #34.

Fixes the arguments to pass space-separated command line arguments (snakemake) as comma-separated to mrtrix rules (as necessary)

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionalitiy)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through the poe quality task
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes

All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

@kaitj kaitj added the bug Something isn't working label Jan 26, 2023
@tkkuehn
Copy link
Collaborator

tkkuehn commented Jan 26, 2023

Do you mind merging from main so the linters work properly?

- adds necessary changes to pass space-separated command line arguments
(snakemake) as comma-separated to mrtrix
@kaitj
Copy link
Collaborator Author

kaitj commented Jan 26, 2023

Do you mind merging from main so the linters work properly?

Rebased from main, workflows should work now.

Copy link
Collaborator

@tkkuehn tkkuehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small suggestions relating to pre-existing issues, but the actual changes here look good to me.

@@ -128,7 +128,7 @@ parse_args:
--lmax:
help: '(Mrtrix3) the maximum spherical harmonic order for the output
FOD(s). For algorithms with multiple outputs, this should be
provided as a comma-sperated list of integers, one for each output
provided as a space-sperated list of integers, one for each output
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the changes at hand but while I'm looking at this, if --lmax can be ommitted, nargs should be "*".

@@ -130,8 +130,8 @@ rule dwi2response:
dwi=rules.nii2mif.output.dwi,
mask=rules.nii2mif.output.mask,
params:
shells=f"-shells {shells}" if shells else "",
lmax=f"-lmax {lmax}" if lmax else "",
shells=f"-shells {','.join(shells)}" if shells else "",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loking at the help text (and nargs) of the --shells argument, it needs to be there, right? Maybe worth erroring out/raising an exception somewhere if this isn't defined.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be required (similar to lmax).

@tkkuehn tkkuehn merged commit 00f39c5 into main Jan 26, 2023
@tkkuehn tkkuehn deleted the mrtrix-args-fix branch January 26, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shells and lmax flags
2 participants