NearestGenomicNeighbor: Find closest gene for genomic intervals within the same TAD.

Description Usage Arguments Details Author(s)

Description

Function accepts genomic intervals of regions (e.g. from ChIP-seq), genes and TADs and will return a data frame with the region coordiates, the closest gene, the distance to it and the intersecting TAD. Input format is GRanges. Genes.gr must have a slot <gene_id> with gene names.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
NearestGenomicNeighbor(
  Genes.gr,
  Regions.gr,
  TADs.gr,
  cTADs.gr = NULL,
  max.distance = NULL,
  Find.Genes = "closest",
  cores = detectCores() - 1,
  Sort.output = FALSE
)

Arguments

Genes.gr

GRanges with gene coordinates, will be collapse to start position depending on strand

Regions.gr

GRanges with genomic regions to find nearby genes, will be collapsed to interval center

TADs.gr

GRanges with TAD intervals

cTADs.gr

an optional set of GRanges with the complement of TADs and the genome, see details

max.distance

numerical, a cutoff for maximum istance of region to gene

cores

workers for mclapply

Sort.output

logical, whether to sort output by chromosome and start position

Find.Genes=c("closest", "all")

whether to return only the closest or all genes within the same TAD, limited by max.distance

Details

Currently, in case that one regions has > 1 associated gene with identical distance (ties), it will return all tied genes. Also, when cTADs.gr is provided (the complement of genome and TADs), then these "cTADs" will be included into the GRanges of the normal TADs and treated equally. This has the advantage that regions outside of TADs are not categorically excluded but the disadvantage that the assignment is even more unreliable than the nearest-matching we do anyway, this is why this parameter is optonal.

Author(s)

Alexander Toenges


ATpoint/dailytRumpet documentation built on April 28, 2020, 1:47 a.m.