multivelo.aggregate_peaks_10x
- multivelo.aggregate_peaks_10x(adata_atac, peak_annot_file, linkage_file, peak_dist=10000, min_corr=0.5, gene_body=False, return_dict=False, parallel=False, n_jobs=1)
Peak to gene aggregation.
This function aggregates promoter and enhancer peaks to genes based on the 10X linkage file.
- Parameters:
adata_atac (
AnnData) – ATAC anndata object which stores raw peak counts.peak_annot_file (str) – Peak annotation file from 10X CellRanger ARC.
linkage_file (str) – Peak-gene linkage file from 10X CellRanger ARC. This file stores highly correlated peak-peak and peak-gene pair information.
peak_dist (int (default: 10000)) – Maximum distance for peaks to be included for a gene.
min_corr (float (default: 0.5)) – Minimum correlation for a peak to be considered as enhancer.
gene_body (bool (default: False)) – Whether to add gene body peaks to the associated promoters.
return_dict (bool (default: False)) – Whether to return promoter and enhancer dictionaries.
- Returns:
A new ATAC anndata object which stores gene aggreagted peak counts.
Additionally, if return_dict==True – A dictionary which stores genes and promoter peaks. And a dictionary which stores genes and enhancer peaks.