get_active_enhancers#
- alphagenome.interpretation.enhancer_scoring.get_active_enhancers(gradients_outputs, *, gtf, accessibility_outputs=None, accessibility_output_type=SC_ATAC, tile_size=500, step_size=250, window_size=2400, sigma=300.0, gradient_score_threshold='auto', atac_score_threshold=1.25, prefer_observed_accessibility=True)[source]#
Calls and merges active enhancer-to-gene links from input gradients.
For each
(biosample_name, gene_id)locus,tile_intervalwindows are scored withscore_enhancersand filtered bygradient_score_thresholdand optional 1-bp chromatin accessibility (atac_score, the per-tile maximum accessibility averaged across channels). Passing tiles are reduced per gene to localgradient_scoresummits within overlapping clusters, then overlapping summits across genes in the same(biosample_name, chromosome)are merged to their[min(start), max(end)]span while retaining each gene’s top summit scores.- Parameters:
gradients_outputs (
Sequence[InputGradientsOutput]) –InputGradientsOutputsequence with unique(biosample_name, gene_id)pairs.gtf (
DataFrame) – GENCODE GTF DataFrame used to resolveMANE_Selecttranscript TSSs.accessibility_outputs (
Sequence[Output] |None(default:None)) –dna_output.Outputsequence aligned withgradients_outputs, orNonewhenatac_score_thresholdisNone.accessibility_output_type (
Literal[SC_ATAC,ATAC] (default:SC_ATAC)) – Accessibility track to use (SC_ATACorATAC).tile_size (
int(default:500)) – Candidate tile width in bp.step_size (
int(default:250)) – Step between adjacent tiles in bp.window_size (
int(default:2400)) – Gaussian smoothing window width around each tile midpoint (bp).sigma (
float(default:300.0)) – Gaussian kernel standard deviation (bp).gradient_score_threshold (
Union[float,Literal['auto']] (default:'auto')) – Minimumgradient_score, or'auto'to useDEFAULT_GRADIENT_SCORE_THRESHOLDS(0.0012forSC_GENE_EXPRESSION,0.0017forRNA_SEQ).atac_score_threshold (
float|None(default:1.25)) – Minimumatac_score, orNoneto skip accessibility filtering.prefer_observed_accessibility (
bool(default:True)) – If True, averagesatac_scoreoverobservedchannels when present, falling back to all channels otherwise.
- Return type:
- Returns:
DataFrame with one row per
(biosample_name, merged peak, gene_id)link and columnschromosome,start,end,name,biosample_name,gene_id,gradient_score,tss, andtss_distance(|0.5 * (start + end) - tss|), plusgene_namewhen present on any target gene andatac_scorewhenaccessibility_outputsis provided.- Raises:
ValueError – If tiling or window parameters are invalid, if
'auto'lacks a threshold foroutput_type, ifaccessibility_outputsis missing, misaligned, not 1-bpSC_ATAC/ATAC, narrower than a gradient interval, or from a differentbiosample_name, if(biosample_name, gene_id)pairs repeat, or if a target gene has noMANE_SelectTSS on its chromosome ingtf.