Bug in pysam for uncompressed bam output avoided, renaming of a variable to avoid name clashes.