lib5c.algorithms.correlation module¶
Module for computing correlations between 5C replicates.
-
lib5c.algorithms.correlation.
make_pairwise_correlation_matrix
(counts_superdict, correlation='pearson', rep_order=None)[source]¶ Computes a matrix of pairwise correlation coefficients among a set of 5C replicates.
- Parameters
counts_superdict (Dict[str, Dict[str, np.ndarray]]) – The keys to the outer dict are replicate names as strings. The values are standard “counts dicts” whose keys are region names as strings and whose values are square symmetric matrices of counts.
correlation ({'pearson', 'spearman'}) – Controls which correlation will be used.
rep_order (Optional[List[str]]) – Pass a list of strings to specify the order of the replicates in the rows and columns of the returned correlation matrix. If this kwarg is omitted the columns and rows of the returned correlation matrix will be arranged in the iteration order of the keys of
counts_superdict
.
- Returns
The square, symmetric pairwise correlation matrix.
- Return type
np.ndarray
-
lib5c.algorithms.correlation.
make_pairwise_correlation_matrix_from_counts_matrix
(counts_matrix, correlation='pearson')[source]¶ Computes a matrix of pairwise correlation coefficients among a set of 5C replicates.
- Parameters
counts_matrix (np.ndarray) – The rows are replicates, the columns are FFLJs.
correlation ({'pearson', 'spearman'}) – Controls which correlation will be used.
- Returns
The square, symmetric pairwise correlation matrix.
- Return type
np.ndarray