INNER CODE UNIT · Python
writeAggregateHDF
deeptools/HiCExplorer · hicexplorer/chicAggregateStatistic.py:134
def writeAggregateHDF(pOutFileName, pOutfileNamesList, pAcceptedScoresList, pArgs):
aggregateFileH5Object = h5py.File(pOutFileName, 'w')
aggregateFileH5Object.attrs['type'] = "aggregate"
aggregateFileH5Object.attrs['version'] = __version__
counter = 0
for key_outer, data_outer in zip(pOutfileNamesList, pAcceptedScoresList):
matrix_combination_key = key_outer[0][0] + '_' + key_outer[1][0]
if matrix_combination_key not in aggregateFileH5Object:
matrixCombinationGroup = aggregateFileH5Object.create_group(matrix_combination_key)
else:
matrixCombinationGroup = aggregateFileH5Object[matrix_combination_key]
for key, data in zip(key_outer, data_outer):
if len(data) == 0: