5a04f03e55143925256bf1592a6edeb0612558e3,hicexplorer/hicPCA.py,,main,#Any#,71

Before Change



        copymatrix = deepcopy(corrmatrix)
        for row in range(copymatrix.shape[0]):
            row_value = float(sum(corrmatrix[row, :].tolist()[0]))

            for col in range(copymatrix.shape[1]):
                copymatrix[row, col] = float(corrmatrix[row, col]) - (row_value / corrmatrix.shape[0])

        corrmatrix = cov(copymatrix)

        corrmatrix = convertNansToZeros(csr_matrix(corrmatrix)).todense()

After Change


    start_list = []
    end_list = []
    // PCA is computed per chromosome
    length_chromosome_dict = {}
    for chrname in ma.getChrNames():
        chr_range = ma.getChrBinRange(chrname)
        length_chromosome_dict[chrname] = chr_range[1] - chr_range[0]
    for chrname in ma.getChrNames():
        chr_range = ma.getChrBinRange(chrname)

        submatrix = ma.matrix[chr_range[0]:chr_range[1], chr_range[0]:chr_range[1]]


        exp_obs_matrix_ = exp_obs_matrix(submatrix, length_chromosome_dict)
        exp_obs_matrix_ = convertNansToZeros(csr_matrix(exp_obs_matrix_)).todense()
        pearson_correlation_matrix = np.corrcoef(exp_obs_matrix_)
        pearson_correlation_matrix = convertNansToZeros(csr_matrix(pearson_correlation_matrix)).todense()
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: deeptools/HiCExplorer
Commit Name: 5a04f03e55143925256bf1592a6edeb0612558e3
Time: 2017-12-04
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/hicPCA.py
Class Name:
Method Name: main


Project Name: OpenNMT/OpenNMT-tf
Commit Name: ea2a0bfb9f60f7e03a3ed25244622e0d90b275a5
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/inputters/record_inputter.py
Class Name:
Method Name: write_sequence_record


Project Name: bokeh/bokeh
Commit Name: cd7a039d4c87544e19802643e08564a0fb954dac
Time: 2015-10-13
Author: nlr06886@gmail.com
File Name: examples/charts/file/stacked_bar.py
Class Name:
Method Name: