gunz_cm.metrics.reconstruction package
Submodules
gunz_cm.metrics.reconstruction.n_way_interactions module
Module for calculating metrics related to genomic interaction data and 3D chromatin reconstructions.
Examples
- gunz_cm.metrics.reconstruction.n_way_interactions.measure_nways_interaction_found(points: ndarray, fpath_fmt: str, target_nways_vals: List[int], region: str, resolution: int, ds_ratio: int = 1, num_thres_vals: int = 100, log_thres: bool = True) Dict[int, ndarray][source]
Measures the percentage of n-way interactions found within distance thresholds.
This function analyzes a 3D point cloud (a chromatin reconstruction) to determine how well it captures known n-way genomic interactions. It calculates the percentage of true interactions that are found within progressively larger distance thresholds in the 3D model.
- pointsnp.ndarray
The (N, 3) array of 3D coordinates representing the reconstruction.
- fpath_fmtstr
A format string for the path to the n-way interaction data files. Must contain placeholders for {region}, {resolution}, and {nway}.
- target_nways_valslist[int]
A list of n-way interaction orders to analyze (e.g., [3, 4, 5]).
- regionstr
The genomic region or chromosome being analyzed (e.g., ‘chr1’).
- resolutionint
The resolution of the data in base pairs.
- ds_ratioint, optional
The downsampling ratio to apply to the points. Defaults to 1.
- num_thres_valsint, optional
The number of distance thresholds to evaluate. Defaults to 100.
- log_thresbool, optional
If True, use logarithmically spaced distance thresholds. Defaults to True.
- dict[int, np.ndarray]
A dictionary where keys are the n-way values and values are arrays containing the percentage of interactions found at each threshold.
Examples