Skip to content

Commit

Permalink
Single reference compatibitlity
Browse files Browse the repository at this point in the history
  • Loading branch information
betteridiot committed Mar 19, 2019
1 parent 50f1877 commit 72addad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bamnostic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ def _unpack_data(self):
self.read_name = unpack('<{}s'.format(self._l_read_name), self._range_popper(self._l_read_name)).decode()[:-1]

self.tid = self.reference_id = self.refID
self.reference_name = self._io._header.refs[self.refID][0]
try:
self.reference_name = self._io._header.refs[self.refID][0]
except KeyError:
if self.refID == -1 and len(self._io._header.refs) == 1:
self.reference_name = self._io._header.refs[0][0]

def _cigar_builder(self):
"""Just unpacks the cigar data to be processed later. Ensures the cursor
Expand Down

0 comments on commit 72addad

Please sign in to comment.