hic3defdr.util.thresholding module¶
-
hic3defdr.util.thresholding.
size_filter
(clusters, cluster_size)[source]¶ Filters out clusters which are smaller than cluster_size.
Parameters: - clusters (list of set of tuple of int) – The clusters to filter.
- cluster_size (int) – The minimum size of a cluster needed to pass this filter.
Returns: The filtered clusters.
Return type: list of set of tuple of int
-
hic3defdr.util.thresholding.
threshold_and_cluster
(qvalues, row, col, fdr)[source]¶ Thresholds pixels by comparing their q-values to a target FDR and clusters the significant and insignificant pixels.
Parameters: - qvalues (np.ndarray) – The qvalue for each pixel under consideration.
- col (row,) – The row and column indices corresponding to the qvalues.
- fdr (float) – The FDR to threshold on.
Returns: sig_clusters, insig_clusters – Lists of the significant and insignificant clusters, respectively.
Return type: list of set of tuple of int