Script to fix malformed bam files