Exemplo n.º 1
0
 def _checkCallSetIds(self, variantFile):
     """
     Checks callSetIds for consistency
     """
     if len(self._callSetIdMap) > 0:
         callSetIds = set([
             self.getCallSetId(sample)
             for sample in variantFile.header.samples])
         if callSetIds != set(self._callSetIdMap.keys()):
             raise exceptions.InconsistentCallSetIdException(
                 variantFile.filename)
Exemplo n.º 2
0
 def _updateCallSetIds(self, variantFile):
     """
     Updates the call set IDs based on the specified variant file.
     """
     # If this is the first file, we add in the samples. If not, we check
     # for consistency.
     if len(self._callSetIdMap) == 0:
         for sample in variantFile.header.samples:
             self.addCallSet(sample)
     else:
         callSetIds = set([
             self.getCallSetId(sample)
             for sample in variantFile.header.samples])
         if callSetIds != set(self._callSetIdMap.keys()):
             raise exceptions.InconsistentCallSetIdException(
                 variantFile.filename)