e8a8edec508fcf886d5c6329ff0729b1cff845e8,hicexplorer/utilities.py,,exp_obs_matrix_norm,#Any#Any#Any#,287
Before Change
distance = np.ceil(np.absolute(row - col) / 2).astype(np.int32)
if len(pSubmatrix.data) > 0:
data_type = type(pSubmatrix.data[0])
expected = expected_interactions_in_distance_[distance]
pSubmatrix.data = pSubmatrix.data.astype(np.float32)
pSubmatrix.data /= expected
After Change
expected_interactions_in_distance = expected_interactions_norm(pLength_chromosome, pChromosome_count, pSubmatrix)
row_sums = np.array(pSubmatrix.sum(axis=1).T).flatten()
total_interactions = pSubmatrix.sum()
row, col = pSubmatrix.nonzero()
// data = pSubmatrix.data.tolist()
for i in range(len(row)):
expected = expected_interactions_in_distance[np.absolute(row[i]-col[i])]
expected /= row_sums[row[i]] * row_sums[col[i]] / total_interactions
pSubmatrix.data[i] /= expected
return pSubmatrix
def toString(s):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: deeptools/HiCExplorer
Commit Name: e8a8edec508fcf886d5c6329ff0729b1cff845e8
Time: 2018-09-04
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/utilities.py
Class Name:
Method Name: exp_obs_matrix_norm
Project Name: dask/dask-image
Commit Name: cbbcea8795e8da754a5b3ffb1a08ef66afd84eef
Time: 2018-09-02
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/_utils.py
Class Name:
Method Name: _ravel_shape_indices
Project Name: AIRLab-POLIMI/mushroom
Commit Name: b98d2eb19fbb21c89bf8d6a7f609ac9aa9b81f5e
Time: 2019-07-10
Author: carlo.deramo@gmail.com
File Name: mushroom/approximators/parametric/pytorch_network.py
Class Name: PyTorchApproximator
Method Name: _fit_batch