Skip to content

[FIX] modified afni's cat_matvec to accept empty string opposed to opkey #2943

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

Merged
merged 4 commits into from
Sep 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions nipype/interfaces/afni/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,9 @@ class CatMatvec(AFNICommand):

def _format_arg(self, name, spec, value):
if name == 'in_file':
return spec.argstr % (' '.join([i[0] + ' -' + i[1]
for i in value]))
# Concatenate a series of filenames, with optional opkeys
return ' '.join('%s -%s' % (mfile, opkey) if opkey else mfile
for mfile, opkey in value)
return super(CatMatvec, self)._format_arg(name, spec, value)


Copy link
Member

Choose a reason for hiding this comment

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

Can you re-add this? Python style guidelines suggest 2 lines between classes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Expand Down