I've been using the diffHiC package for awhile. I would like to read in the bam file, which is the output after running presplit_map.py, using Rsamtools or GenomicAlignment package. I cannot read in the bam file using either of these packages. However, I can read in the bam file using preparePairs function from diffHic. I've looked under the hood of preparePairs, and they are using two functions that are hidden. What are these speciality functions? Are they written in python/R?