Add check for Arvados when an optional output for a step is missing #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please see Issue #57
In get_output_task in arvados_platform.py if an output is missing for e.g. it could be an optional output from an optional step of the pipeline we get an error:
File "/scratch/mount1/06-RNA-Seq-pipeline-solve-issues/RNA-Seq-Launcher/launcher/src/launcher.py", line 507, in do_work
outputs = construct_output_list(platform, args.reference_model, merge_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mount1/06-RNA-Seq-pipeline-solve-issues/RNA-Seq-Launcher/launcher/src/launcher.py", line 34, in construct_output_list
source_file = platform.get_task_output(merge_task, output_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ec2-user/.pyenv/versions/RNASeq_pipeline_solve_issues_py3.11.0/lib/python3.11/site-packages/cwl_platform/arvados_platform.py", line 434, in get_task_output
if 'location' in output_field:
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Therefore, we need to add a check in get_output_task if the output_field is None we return None.
In SevenBridges, if the file is missing it is already returned as None.