42dcbde0e602cba7adb911a2072df3887afd61f4,hicexplorer/utilities.py,,exp_obs_matrix_lieberman,#Any#Any#Any#,215
Before Change
pSubmatrix.data[i] = pSubmatrix.data[i] / expected_interactions_in_distance_[distance[i]]
except Exception:
log.debug("pSubmatrix.data[i]: {}".format(pSubmatrix.data[i]))
log.debug("distance[i]: {}".format(distance[i]))
log.debug("expected_interactions_in_distance_[distance[i]]: {} ".format(expected_interactions_in_distance_[distance[i]]))
exit(1)
After Change
// log.info("expected_interactions_in_distance_[distance[0]]: {}".format(type(expected_interactions_in_distance_[distance[0]])))
if len(pSubmatrix.data) > 0:
data_type = type(pSubmatrix.data[0])
// from copy import deepcopy
// data = deepcopy(pSubmatrix.data)
expected = expected_interactions_in_distance_[distance]
// log.info("len(expected); {}".format(len(expected)))
// log.info("len(data): {}".format(len(pSubmatrix.data)))
pSubmatrix.data = pSubmatrix.data.astype(np.float32)
pSubmatrix.data /= expected
// data2 = deepcopy(data)
pSubmatrix.data = convertInfsToZeros_ArrayFloat(pSubmatrix.data).astype(data_type)
// for i in range(len(pSubmatrix.data)):
// try:
// if expected_interactions_in_distance_[distance[i]] == 0:
// pSubmatrix.data[i] = 0.0
// else:
// pSubmatrix.data[i] = pSubmatrix.data[i] / expected_interactions_in_distance_[distance[i]]
// except Exception:
// log.debug("pSubmatrix.data[i]: {}".format(pSubmatrix.data[i]))
// log.debug("distance[i]: {}".format(distance[i]))
// log.debug("expected_interactions_in_distance_[distance[i]]: {} ".format(expected_interactions_in_distance_[distance[i]]))
// exit(1)
// if len(pSubmatrix.data) > 0:
// try:
// nt.assert_equal(data, pSubmatrix.data)
// except:
// foo = data - pSubmatrix.data
// mu = np.nonzero(foo)
// print(mu)
// log.info("data: {}".format(data[mu]))
// log.info("data: {}".format(data2[mu]))
// // data2
// log.info("pSubmatrix.data: {}".format(pSubmatrix.data[mu]))
return pSubmatrix
def toString(s):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: deeptools/HiCExplorer
Commit Name: 42dcbde0e602cba7adb911a2072df3887afd61f4
Time: 2018-03-03
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/utilities.py
Class Name:
Method Name: exp_obs_matrix_lieberman
Project Name: ilastik/ilastik
Commit Name: ce79a890b20d577d81155b0c969f6a4fae6edd26
Time: 2012-08-30
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/opVigraWatershed.py
Class Name: OpVigraWatershed
Method Name: execute
Project Name: scikit-image/scikit-image
Commit Name: b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6
Time: 2020-05-04
Author: rfezzani@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: rgba2rgb