docs: def _read_mask(self, l, ret, mask='upper'):
          """
          Reads mask from 1 bit file to convert bases to identify poor quality
          bases that will either be converted to lowercase or 'N'. In the
          2 bit file, 'N' or any other invalid base is written as 'A'.
          Therefore the 'N' mask file is required to correctly identify where
          invalid bases are.
          
          Parameters
          ----------
          l : tuple
              location
          ret : list
              list of bases which will be modified in place
          mask : str, optional
              Either 'upper', 'lower', or 'n'. If 'lower', poor quality bases 
              will be converted to lowercase.
          """
          
          if mask.startswith('u'):
              return
           
          file = os.path.join(self.__dir, l.chr + ".mask.1bit")
               
          if not os.path.exists(file):
              return
          
          data = DNA2Bit._read_1bit_file(file, l)
          
          d = DNA2Bit._read1bit(data, l)
          
          if mask.startswith('l'):
              for i in range(0, len(ret)):
                  if d[i] == 1:
                      ret[i] = DNA_UC_TO_LC_MAP[ret[i]] #ret[i].lower()
          else:
              # Use N as mask
              for i in range(0, len(ret)):
                  if d[i] == 1:
                      ret[i] = DNA_N_UC