qpileup remove mode removes the BAMs from the pileup collection, and adds a header line: "##METADATA=MODE:remove,...". However, the "##METADATA=MODE:add" line point to that BAM is still reminded in the HDF header. It shouldn't be a problem, when both "remove" and "add" header lines exist. While, in merge mode, it throws away the "remove" header line, but only keeps the "add" header line. Hence problem occurs, the merged HDF header provides incorrect information.
Here, we delete the the "##METADATA=MODE:add" header line when a matched BAM is removed. So the correct information can pass to the downstream pipeline.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
[X] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
It is too expensive to create unit test for the updated method, here we used a bash script to run qpileup and check the final output hdf file header. The test is passed
Are WDL Updates Required?
not required
Checklist:
[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
Description
qpileup remove mode removes the BAMs from the pileup collection, and adds a header line: "##METADATA=MODE:remove,...". However, the "##METADATA=MODE:add" line point to that BAM is still reminded in the HDF header. It shouldn't be a problem, when both "remove" and "add" header lines exist. While, in merge mode, it throws away the "remove" header line, but only keeps the "add" header line. Hence problem occurs, the merged HDF header provides incorrect information.
Here, we delete the the "##METADATA=MODE:add" header line when a matched BAM is removed. So the correct information can pass to the downstream pipeline.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
It is too expensive to create unit test for the updated method, here we used a bash script to run qpileup and check the final output hdf file header. The test is passed
Are WDL Updates Required?
not required
Checklist: