getDistSide: Filter a gene set and extract upstream or downstream...

Description Usage Arguments Value DETAILS See Also Examples

View source: R/getDistSide.R

Description

Extract distances to the upstream or downstream neighbors

Usage

1
getDistSide(GNN, glist, Side = c("Upstream", "Downstream"))

Arguments

GNN

A tibble obtained with the getGeneNeighborhood function. Can also be any data.frame with the relevant information.

glist

A character vector of gene IDs (must match GNN$GeneName)

Side

One of 'Upstream' or 'Downstream'

Value

A tibble with the following columns:

DETAILS

Note that the function removes overlapping upstream/downstream genes but not adjacent genes (for which distance = 0).

See Also

getGeneNeighborhood dist2Neighbors

Examples

1
2
3
4
5
6
7
8
9
## Obtain gene neighborhood information:
  GeneNeighbors <- getGeneNeighborhood(Genegr)
## Get a (random) set of (10) genes:
  set.seed(123)
  randGenes <- sample(names(Genegr), 10)
## Extract distances to the upstream neighbors for this set:
getDistSide(GeneNeighbors, randGenes, "Upstream")
## And for the downstream genes:
getDistSide(GeneNeighbors, randGenes, "Downstream")

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