uchrom.strc.loop¶
- class uchrom.strc.loop.LoopCallerParams(cut_lo: float = 100000.0, cut_up: float = 1000000.0, inner_cut: float = 25000.0, outer_cut: float = 50000.0, fdr_cutoff: float = 0.1, pval_cutoff: float = 1e-05, gap: float = 50000.0, k_sigma: float = 4.0, frac: float = 0.1, min_cluster_size: int = 1)[source]¶
Bases:
objectRuntime parameters for
call_loops_axiswise_f().Defaults mirror ArcFISH’s
LoopCaller.
- uchrom.strc.loop.call_loops_axiswise_f(cd, chrom: str, params: LoopCallerParams | None = None, device: str = 'auto', store: bool = True, result_key: str = 'loops', verbose: bool = False) DataFrame[source]¶
ArcFISH-style loop caller on a single chromosome.
- Parameters:
cd (
uchrom.ChromData) – Tracing data. Must containtrace_idinspotsand positive coordinates.chrom (str) – Chromosome name — matched against
cd.spots['chrom'].params (LoopCallerParams, optional) – Override any default.
device (str) –
'auto' | 'cpu' | 'cuda' | 'mps'— passed to GPU-friendly preprocessing.store (bool) – If True, also write the result DataFrame into
cd.results[result_key].result_key (str) – Key under which to store the result (default
'loops').
- Returns:
One row per called loop summit.
- Return type:
DataFrame
- class uchrom.strc.loop.axiswise_f.LoopCallerParams(cut_lo: float = 100000.0, cut_up: float = 1000000.0, inner_cut: float = 25000.0, outer_cut: float = 50000.0, fdr_cutoff: float = 0.1, pval_cutoff: float = 1e-05, gap: float = 50000.0, k_sigma: float = 4.0, frac: float = 0.1, min_cluster_size: int = 1)[source]¶
Bases:
objectRuntime parameters for
call_loops_axiswise_f().Defaults mirror ArcFISH’s
LoopCaller.
- uchrom.strc.loop.axiswise_f.call_loops_axiswise_f(cd, chrom: str, params: LoopCallerParams | None = None, device: str = 'auto', store: bool = True, result_key: str = 'loops', verbose: bool = False) DataFrame[source]¶
ArcFISH-style loop caller on a single chromosome.
- Parameters:
cd (
uchrom.ChromData) – Tracing data. Must containtrace_idinspotsand positive coordinates.chrom (str) – Chromosome name — matched against
cd.spots['chrom'].params (LoopCallerParams, optional) – Override any default.
device (str) –
'auto' | 'cpu' | 'cuda' | 'mps'— passed to GPU-friendly preprocessing.store (bool) – If True, also write the result DataFrame into
cd.results[result_key].result_key (str) – Key under which to store the result (default
'loops').
- Returns:
One row per called loop summit.
- Return type:
DataFrame