I am having difficulties running the preparePairs function in diffHiC, for a bam file that I aligned using bwa mem. The bam file has been sorted by name. When I call the function
preparePairs("test1.bam", param=param, file="test1.h5", dedup=TRUE, minq=10)
I get the following message:
diagnostics=preparePairs("test_sort.bam", hs.param, file="test.h5", dedup=TRUE, minq=10) Error in chromosomes[[chrs[x]]] : subscript out of bounds
I appreciate any suggestion.