diff --git a/.gitignore b/.gitignore index b5c3114..e0018ad 100644 --- a/.gitignore +++ b/.gitignore @@ -156,4 +156,4 @@ Thumbs.db # Common editor files *~ *.swp -_scratch/ \ No newline at end of file +_scratch/ diff --git a/src/dask_ngs/_index.py b/src/dask_ngs/_index.py index 8f6a3cb..10bfd20 100644 --- a/src/dask_ngs/_index.py +++ b/src/dask_ngs/_index.py @@ -10,6 +10,7 @@ COMPRESSED_POSITION_SHIFT = 16 UNCOMPRESSED_POSITION_MASK = 0xFFFF BLOCKSIZE = 65536 +BAM_PSEUDO_BIN = 37450 def read_bai(path: str): @@ -36,7 +37,7 @@ def read_bai(path: str): # bin number bin_id = int.from_bytes(f.read(4), **int_kwargs) - if bin_id == 37450: + if bin_id == BAM_PSEUDO_BIN: # This is an entry that describes the "pseudo-bin" for the # reference, using the same byte layout as normal bins but # interpreted differently.