def sum(self, axis):
        if axis not in (0, 1):
            raise ValueError("Axis must be 0 or 1")

        summed = self.matrix.sum(axis=axis)
        if axis == 0:
            return self._new_instance(summed, row2word=[''])
        elif axis == 1:
            return self._new_instance(summed, col2word=[''])
        else:
            raise ValueError("Axis may only be 0 (rows) or 1 (cols)")
Load intervals overlapping chromatin marks into database
dataset/ETHPy150Open jimmycallin/pydsm/pydsm/indexmatrix.py/IndexMatrix.sum--crossover with--dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/loadChromatinMarkIntervals