
Link peaks to nearby genes by correlation over groups of cells
peak_to_gene_sc.RdArchR's addPeak2GeneLinks(). Peak and gene counts are summed per level of
group_by (fine clusters, or meta cell assignments, of the kept cells),
log-normalised per group, log2(x / total * 1e4 + 1), and correlated over
the groups for every peak within max_distance of a gene's TSS. p-values
are the two-sided t-test of each correlation, FDR Benjamini-Hochberg over
all pairs. Unlike Signac's LinkPeaks() there is no GC-matched
background, which needs the genome sequence.
Usage
peak_to_gene_sc(
object,
gtf,
group_by,
max_distance = 250000L,
biotypes = "protein_coding",
genes = NULL,
min_cells = 10L,
fdr = 0.05,
.verbose = TRUE
)Arguments
- object
SingleCellsMultiModalclass with RNA and ATAC.- gtf
String. Gene annotation for the TSSs, matched to the RNA on
gene_idwithout its version.- group_by
String. obs column whose levels are the groups; ArchR uses a few hundred groups of ~100 cells.
- max_distance
Integer. Largest distance from a peak to a TSS.
- biotypes
Optional character vector. Gene biotypes to link.
NULLkeeps all.- genes
Optional character vector. Gene ids to restrict to;
NULLfor every gene with a TSS.- min_cells
Integer. Groups with fewer kept cells are left out.
- fdr
Optional numeric. Keep links below this FDR;
NULLkeeps every tested pair.- .verbose
Boolean. Controls verbosity.