Added support for using BAM file input