minor fixes to avoid singularity/apptainer issue for get_delay_dir
I managed to get split-directions working with toil-cwl-runner, but had to make a fix to the get_delay_cal_direction.cwl step, and the get_delay_dir.py script. The issue was that singuarity/apptainer prints a harmless warning on some systems which is stdout. On line 11 of get_delay_cal_direction.cwl, the stdout gets dumped in delay_dir.csv. The next step reads this file expecting to find source,ra,dec but then fails because the first line is the singularity/apptainer warning.
The fix I implemented and tested was:
modify get_delay_cal_direction.cwl:
- update line 11 to be
stdout: get_delay-dir.txt
modify get_delay_dir.py:
- update lines 28-29 to the following:
with open('delay_dir.csv','w') as f:
f.write("Source_id,RA,DEC\n")
f.write("DelayCal,{:f},{:f}".format(ra,dec))
This ensures that the delay_dir.csv file only ever contains what the next step expects.
I was going to fork and create a merge request, but it seems I do not have permissions to do this.