Description Usage Arguments Value Author(s) See Also Examples
View source: R/dist2Neighbors.R
Extract distances to the upstream and downstream neighbors.
This is essentially a wrapper around getDistSide
with
the possibility to use several gene sets and with
extra checks on the gene set(s)
1 2 3 4 5 | dist2Neighbors(
GeneNeighborhood = NULL,
geneset = NULL,
genesetName = "GeneSet"
)
|
GeneNeighborhood |
A |
geneset |
Either a character vector of identifiers defining the genes of interest or a (named) list of such character vectors. |
genesetName |
Character string. Name of the gene set (only used if
|
A tibble with the following columns:
GeneName. ID of the focus gene.
Neighbor. ID of the gene neighbor
Orientation. Orientation of the neighbor (same or opposite strand).
Side. Upstream or Downstream.
Distance in bp
GeneSet. Name of the gene set
Pascal GM Martin
getGeneNeighborhood
getDistSide
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Obtain gene neighborhood information:
GeneNeighbors <- getGeneNeighborhood(Genegr)
## Get a (random) set of (100) genes:
set.seed(123)
randGenes <- sample(names(Genegr), 100)
## Extract distances to the upstream/downstream neighbors for this set:
distForRandGenes <- dist2Neighbors(GeneNeighborhood = GeneNeighbors,
geneset = randGenes,
genesetName = "RandomGenes")
## Or for this set of genes and for all genes (the 'gene universe'):
myGeneSets <- list("RandomGenes" = randGenes,
"AllGenes" = GeneNeighbors$GeneName)
distForGeneSets <- dist2Neighbors(GeneNeighbors,
myGeneSets)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.