Skip to content

Pointing the correct previous stage when running "cobrawap run_stage" command #68

@cosimolupo

Description

@cosimolupo

When invoking the cobrawap run_stage --stage X command line, STAGE_INPUT field is reconstructed by browsing the stage list provided in the top-level config file, locating the current stage X with index n, and then pointing at the stage with index n-1 in such list.

However, two problems may arise from this approach:

  1. If first stage in top-level config stage list is chosen (n=0), STAGE_INPUT will automatically point at the last item of the same list (n=-1). This would be anyway incorrect. A check on the stage index n should be introduced, skipping the reconstruction of STAGE_INPUT field when first stage in the config stage list is chosen (i.e. when n=0).
  2. Even after having fixed the issue here above, if stage01_data_entry is not present in the top-level config stage list, it could still be possible to ask for running e.g. stage02_processing without having the necessary link STAGE_INPUT to the output from stage01_data_entry, clearly causing an error in the execution of the command. A possible solution could be to rely on the full list of stages retrieved from the ~/.cobrawap/config file, in turn built by looking for stages in the pipeline_path folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions