Description Usage Arguments Value DETAILS Author(s) Examples
View source: R/getGeneNeighborhood.R
Get orientation and distance info on the upstream and downstream features/genes from a GRanges
1 | getGeneNeighborhood(GeneGRanges)
|
GeneGRanges |
A |
A tibble
with the following columns:
GeneName
: Name of the focus gene
Chr
: Seqnames of the focus gene
Strand
: Strand of the focus gene
Precede
: Name of the gene that the focus gene precedes (ignoring strand info)
Follow
: Name of the gene that the focus gene follows (ignoring strand info)
Upstream
: Name of the gene located upstream of the focus gene
Downstream
: Name of the gene located downstream of the focus gene
StrandUpstream
: Strand of the gene located upstream of the focus gene
StrandDownstream
: Strand of the gene located downstream of the focus gene
UpstreamOrientation
: Orientation of the upstream gene relative to the focus gene (S=same strand, O=Opposite strand or other)
DownstreamOrientation
: Orientation of the downstream gene relative to the focus gene (S, O or other)
UpstreamDistance
: Distance between the focus gene and its upstream neighbor
DownstreamDistance
: Distance between the focus gene and its downstream neighbor
CountOvlAnyStrand
: Number of genes with which the focus gene overlaps
ovlType
: Type of overlaps (see DETAILS)
ovlGene
: Name of the gene with which the focus gene overlaps (when it overlaps with a single gene)
NeighborClass
: Class of gene neighborhood (see DETAILS)
UpstreamClass
: Class of upstream Neighborhood (takes into account the presence of an overlap)
DownstreamClass
: Class of downstream Neighborhood (takes into account the presence of an overlap)
GenePair
: Type of gene pair formed between the focus gene and the gene that follows (see DETAILS)
Distance2Pair
: Intergenic distance between the focus gene and the gene that follows
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:
c. The focus gene overlaps with more than 1 gene ("complex" overlap pattern)
I. The focus gene shares the same borders (start AND end) with a gene on the same strand
i. The focus gene shares the same borders (start AND end) with a gene on the opposite strand
H. The focus gene "hosts" (=contains entirely) a gene on the same strand
h. The focus gene "hosts" (=contains entirely) a gene on the opposite strand
G. The focus gene is the "guest" of (=is entirely contained within) a gene that is on the same strand
g. The focus gene is the "guest" of (=is entirely contained within) a gene that is on the opposite strand
U. The 5' end of the focus gene (TSS) overlaps with a gene that is on the same strand
u. The 5' end of the focus gene (TSS) overlaps with a gene that is on the opposite strand
D. The 3' end of the focus gene (TES) overlaps with a gene that is on the same strand
d. The 3' end of the focus gene (TES) overlaps with a gene that is on the opposite strand
The Neighborclass column is defined as follow:
In the absence of overlap: A 2-letter code using S (Same Strand) and O (Opposite Strand) to indicate the orientation of the uptstream (first letter) and downstream genes (second letter)
When ovlType is u/U or d/D: ovlType is combined with the information on the downstream (resp. upstream) gene to form the code (e.g. uS or uO)
In all other cases: NeighborClass is equal to ovlType
The codes in the GenePair column are defined as follow:
H2H: Head-to-Head orientation: <— —>
T2H: Tail-to-Head orientation: —> —>
T2T: Tail-to-Tail orientation: —> <—
Pascal GP Martin
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"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.