Calculate gene-tile distances for ArchR gene activitiesSource:
ArchR-style gene activity scores are based on a weighted sum of each tile according to the signed distance from the tile to a gene body. This function calculates the signed distances according to ArchR's default parameters.
chromosome_sizes = NULL,
tile_width = 500,
addArchRBug = FALSE
Gene coordinates given as GRanges, data.frame, or list. See
help("genomic-ranges-like")for details on format and coordinate systems. Required attributes:
end: genomic position
strand: +/- or TRUE/FALSE for positive or negative strand
(optional) Size of chromosomes as a genomic-ranges object
Size of tiles to consider
Replicate ArchR bug in handling nested genes
Tibble with one range per tile, with additional metadata columns gene_idx (row index of the gene this tile corresponds to) and distance.
Distance is a signed distance calculated such that if the tile has a smaller start coordinate than the gene and the gene is on the + strand, distance will be negative. The distance of adjacent but non-overlapping regions is 1bp, counting up from there.