haowenz / chromap

Fast alignment and preprocessing of chromatin profiles
https://haowenz.github.io/chromap/
MIT License
192 stars 21 forks source link

[BUG] tabix error [E::hts_idx_push]chromosome blocks not continuous #172

Closed lishuangshuang0616 closed 2 months ago

lishuangshuang0616 commented 2 months ago

Will chromap --preset atac sort the generated BED file? I encountered an error when generating a .tbi file using tabix. What could be the reason?

mourisl commented 2 months ago

Yes, the output BED file is sorted. Could it be the chromosome name is not sorted lexicographically for tabix? What's the error message from tabix?

lishuangshuang0616 commented 2 months ago

tabix error [E::hts_idx_push]chromosome blocks not continuous

The order of chromosome names in the genome.fa I provided is out of order. Does that have any impact? So chromap is sorted according to the chromosome names of the genome, and this caused this error?

mourisl commented 2 months ago

Chromap sorts the chromosome following the order in the genome.fa file. I think the tabix assumes the chromosomes are sorted alphabetically. If that's the case, you can put the alphabetically-sorted chr ids in a file and put that file for the option "--chr-order". Hope this can resolve the issue.