def _read_dna(self, l, lowercase=False):
        """
        Read DNA from a 2bit file where each base is encoded in 2bit 
        (4 bases per byte).
        
        Parameters
        ----------
        l : tuple
            Location tuple
        
        Returns
        -------
        list
            Array of base chars
        """
        
        file = os.path.join(self.dir, l.chr + ".dna.2bit")
        
        if not os.path.exists(file):
            return []

        if file != self.__file:
            print('Caching {}...'.format(file))
            self.__file = file
            # Load file into memory
            f = open(file, 'rb')
            self.__data = f.read()
            f.close()
            
            
        return DNA2Bit._read2bit(self.__data, l, offset=True)
def _read_dna ( self , l , lowercase = False ) : file = os . path . join ( self . dir , l . chr + ".dna.2bit" ) if not os . path . exists ( file ) : return [ ] if file != self . __file : print ( 'Caching {}...' . format ( file ) ) self . __file = file f = open ( file , 'rb' ) self . __data = f . read ( ) f . close ( ) return DNA2Bit . _read2bit ( self . __data , l , offset = True )
Read DNA from a 2bit file where each base is encoded in 2bit 
        (4 bases per byte).
        
        Parameters
        ----------
        l : tuple
            Location tuple
        
        Returns
        -------
        list
            Array of base chars