add partial support for variant calling from multiple bam files, fix some bugs