puretabix/tabix.py
def fetch_bytes(self, name, start, end=None):
        """
        Returns bytes in the region of interest
        """
        # quick check
        if name not in self.index.indexes.keys():
            return b""

        # default if only start specified
        if not end:
            end = start

        # use the index to get "virtual" file offsets that include all of the region of interest
        virtual_start, virtual_end = self.index.lookup_virtual(name, start, end)

        # location not indexed, return empty string
        if not virtual_start and not virtual_end:
            return b""

        return self.fetch_bytes_virtual(virtual_start, virtual_end)

        Returns bytes in the region of interest
        
Returns bytes in the region of interest
Returns bytes in the region of interest
def fetch_bytes(self, name, start, end=None):
        if name not in self.index.indexes.keys():
            return b""
        if not end:
            end = start
        virtual_start, virtual_end = self.index.lookup_virtual(name, start, end)
        if not virtual_start and not virtual_end:
            return b""
        return self.fetch_bytes_virtual(virtual_start, virtual_end)
def fetch_bytes ( self , name , start , end = None ) : if name not in self . index . indexes . keys ( ) : return b"" if not end : end = start virtual_start , virtual_end = self . index . lookup_virtual ( name , start , end ) if not virtual_start and not virtual_end : return b"" return self . fetch_bytes_virtual ( virtual_start , virtual_end )
Returns bytes in the region of interest
Returns bytes in the region of interest
"""
        Returns bytes in the region of interest
        """ # quick check # default if only start specified # use the index to get "virtual" file offsets that include all of the region of interest # location not indexed, return empty string
self
name
start
end