getGeneNeighborhood: Extract info on upstream and downstream features/genes

Description Usage Arguments Value DETAILS Author(s) Examples

View source: R/getGeneNeighborhood.R

Description

Get orientation and distance info on the upstream and downstream features/genes from a GRanges

Usage

1
getGeneNeighborhood(GeneGRanges)

Arguments

GeneGRanges

A GRanges of feature/gene annotations

Value

A tibble with the following columns:

DETAILS

Up/DownstreamOrientation columns do not precise if the up/downstream gene overlaps with the focus gene.

A distance of 0 in Up/DownstreamDistance columns can indicate that the genes overlap or that they are adjacent.

The type of overlaps in the ovlType column are coded as follow:

The Neighborclass column is defined as follow:

The codes in the GenePair column are defined as follow:

Author(s)

Pascal GP Martin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 
library(TxDb.Athaliana.BioMart.plantsmart25)
GeneNeighbors <- getGeneNeighborhood(GenomicFeatures::genes(TxDb.Athaliana.BioMart.plantsmart25))
# There are 155 genes (0.461%) that overlap with >1 gene
table(GeneNeighbors$NeighborClass)
#
#   c    g    G    h    H    i    I   Od   OD   OO   OS   Sd   SD   SO   SS   uO   UO   uS   US
# 155  257  137  190   92    4   64 1448   52 6203 7461 1415   65 6237 9358  152   37  196   65
table(table(GeneNeighbors$GenePair))
#
#  H2H   T2H   T2T
# 7762 17173  7754

## End(Not run)


set.seed(123)
#The package includes a \code{GRanges} named Genegr with 676 random genes on a single chromosome:
  Genegr

#Extract info on the neighbors of these genes:
  GeneNeighbors <- getGeneNeighborhood(Genegr)

#Classes of neighborhoods:
  table(GeneNeighbors$NeighborClass)
#Classes of gene pairs:
  table(GeneNeighbors$GenePair)

#Up/DownstreamOrientation columns don't document overlaps of the upstream/downstream gene:
  table(GeneNeighbors$NeighborClass[GeneNeighbors$UpstreamOrientation=="O"])
#This information is present in the Up/DownstreamClass columns:
  table(GeneNeighbors$NeighborClass[GeneNeighbors$DownstreamClass=="OppositeOverlap"])

pgpmartin/GeneNeighborhood documentation built on Sept. 2, 2021, 6:37 a.m.