Skip to content

Populating of IntendedFor doesn't work as intended #554

Open
@pvelasco

Description

@pvelasco

Summary

Originally raised in #482 (comment).

I messed up the workflow for the population of the "IntendedFor" field, and it doesn't behave as expected.
Because the population of "IntendedFor" needs to run after all the files are "bidsified", we decided that this feature would be run as a --command option, instead of the default behavior. So, if the --command populate-intended-for option is passed, that is what happens: instead of the regular workflow, process_extra_commands is called.
However, even if that option is not passed, convert also runs populate_intended_for if the POPULATE_INTENDED_FOR_OPTS dict is included in the heuristic file.

So, question @yarikoptic : should I fix this so that it is called only when passing the --command populate-intended-for argument, or only when present in the heuristic (regardless of the --command)? The advantage of running it when present in the heuristic is that you only need to run heudiconv once; if you control it via de --command argument, you need to call heudiconv twice: once for the initial classification and then again to populate the field. The advantage of controlling it via the --command is that you have more control: you can run heudiconv without the population of the intended if so you desire using a heuristic file that has the POPULATE_INTENDED_FOR_OPTS.
There is a third option: to have a new argument: --populate-intended-for, which will run the population of the "IntendeFor" fields at the end of heudiconv, so that the user doesn't need to call it twice.

Platform details:

Choose one:

  • Local environment
  • Container: nipy/heudiconv:latest, but then I download the current master (e747f05) and pip install it.
  • Heudiconv version: 0.10.0, upgraded to master (current: e747f05)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions