Modified to allow non-paired .bam files to be analyzed.