def _addDataFile(self, filename):
        varFile = self.openFile(filename)
        if varFile.index is None:
            raise exceptions.NotIndexedException(filename)
        for chrom in varFile.index:
            # Unlike Tabix indices, CSI indices include all contigs defined
            # in the BCF header.  Thus we must test each one to see if
            # records exist or else they are likely to trigger spurious
            # overlapping errors.
            chrom, _, _ = self.sanitizeVariantFileFetch(chrom)
            if not isEmptyIter(varFile.fetch(chrom)):
                if self._chromFileMap in chrom:
                    raise exceptions.OverlappingVcfException(filename, chrom)
                self._updateMetadata(varFile)
                self._updateCallSetIds(varFile)
                self._chromFileMap[chrom] = filename
        varFile.close()
dataset/ETHPy150Open ga4gh/server/ga4gh/datamodel/variants.py/HtslibVariantSet._addDataFile/swapped operands of `in`