Reduce memory usage for BamQc CollectMultipleMetrics and CollectGcBiasMetrics