I am using bamtools count tool to count no. of reads aligned to human genome 19 using the following commands.
bamtools count -in in.bam -region chr_1:122500000..122749999
Segmentation fault
bamtools count -in in.bam -region chr_1:134000000..134249999
0
As you can notice, the first is coming back with Seg fault and the second one is coming up with 0 reads. I checked both these genomic regions and they are nothing but N's in the reference and therefore no read should align to it.
However, why the same tool would yield two different results. Could somebody please elaborate on the issue and also a way to fix the code so that it reports 0 alignments instead of segfault.
Any help is greatly appreciated.
Kind regards
Hardip
PS: I am familiar with C++ language and can understand few things here and there but far from expert or even advanced user of the language.