arcfish.tl.LoopTestAbstract#
- class arcfish.tl.LoopTestAbstract(adata: AnnData)#
Abstract class for each test alternative. Every testing object passed to
LoopCallermust implement the methods in this class.- Parameters:
adata (AnnData) – adata of a single chromosome, created by
arcfish.pp.FOF_CT_Loader.create_adata().
Methods
__init__(adata)append_pval(result, cut_lo, cut_up, outer_cut)Performing tests and append the test results to the dictionary passed in.
append_summit(result)How to define loop summit from each loop cluster.
ij_background(i, j, d1d, outer_cut)Define the local background for the (i,j) entry.
- abstract static ij_background(i: int, j: int, d1d: ndarray, outer_cut: int) ndarray#
Define the local background for the (i,j) entry.
- Parameters:
- Returns:
A boolean matrix with background entries equal to True.
- Return type:
(p, p) np.ndarray
- abstract append_pval(result: dict, cut_lo: int, cut_up: int, outer_cut: int)#
Performing tests and append the test results to the dictionary passed in. Must add stat and pval as keys to result, with the values being (p,p) matrix. Can also add other key-value pairs.
- abstract append_summit(result: dict)#
How to define loop summit from each loop cluster.
Loop candidates within the same cluster will have the same number in result[“label”]. Add a boolean (p,p) matrix to result[“summit”], where entries equal to True are the selected loop summit for each cluster.
- Parameters:
result (dict) – The result dictionary to add summit.