gatac.tl.get_marker_peaks#
- gatac.tl.get_marker_peaks(adata, key='marker_peaks', group=None, fdr_threshold=0.05, log2_fc_threshold=0.0, n_peaks=None)#
Extract marker peak names from stored results.
Convenience function to get peak names passing significance thresholds.
- Parameters:
- adata
AnnData Annotated data with marker peak results in uns.
- key
str Key in adata.uns containing results from marker_peaks.
- group
str, optional Specific group to extract. If None, return all groups.
- fdr_threshold
float FDR threshold (default: 0.05).
- log2_fc_threshold
float Minimum absolute log2 fold change (default: 0.0).
- n_peaks
int, optional Maximum number of peaks per group.
- adata
- Returns:
dict or list Dictionary mapping group names to peak lists, or list if group specified.
- Return type:
Examples
>>> import gatac as ga >>> # All groups at once >>> markers_by_group = ga.tl.get_marker_peaks(adata, fdr_threshold=0.05) >>> # A single group's top peaks >>> top_peak_names = ga.tl.get_marker_peaks(adata, group="CD8_T", fdr_threshold=0.05, n_peaks=100)