Category (version 2.38.0)

ChrBandTree-class: Class "ChrBandTree"

Description

This class represents chromosome band annotation data for a given experiment. The class is responsible for storing the mapping of band to set of gene IDs located within that band as well as for representing the tree structured relationship among the bands.

Arguments

Objects from the Class

Objects should be created using NewChrBandTree or ChrBandTreeFromGraph.

Slots

toParentGraph:
Object of class "graph" representing the tree of chromosome bands. Edges in this directed graph go from child to parent.
toChildGraph:
Object of class "graph". This is the same as toParentGraph, but with the edge directons reversed. This is not an ideal implementation due to the duplication of data, but it provides quick access to parents or children of a given node.
root:
Object of class "character" giving the name of the root node. The convention is to use "ORGANISM:".
level2nodes:
Object of class "list" providing a mapping of levels in the tree to the set of nodes at that level. Levels X is defined as the set of nodes with a path length of X from the root node.

Methods

allGeneIds
Return a vector of gene IDs representing the gene universe for this ChrBandTree
childrenOf
Return a list with an element for each the character vector n. Each element is a character vector of node names of the children of the named element.
geneIds
Return a vector of gene IDs for a single band.
lgeneIds
Return a list of vectors of gene IDs when given more than one band. The "l" prefix is for list.
parentOf
Return the parents of the specified bands. See childrenOf for a description of the structure of the return value.
treeLevels
Return an integer vector identifying the levels of the tree.
level2nodes(g, level)
Return the nodes in the tree that are at the level specified by level. The level argument can be either numeric or character, but should match a level returned by treeLevels.

Examples

Run this code
library("hgu95av2.db")
set.seed(0xfeee)
univ = NULL ## use all Entrez Gene IDs on the chip (not recommended)
ct = NewChrBandTree("hgu95av2.db", univ)

length(allGeneIds(ct))

exampleLevels(ct)

geneIds(ct, "10p11")
lgeneIds(ct, "10p11")
lgeneIds(ct, c("10p11", "Yq11.22"))

pp = parentOf(ct, c("10p11", "Yq11.22"))
childrenOf(ct, unlist(pp))

treeLevels(ct)

level2nodes(ct, 0)
level2nodes(ct, 0L)
level2nodes(ct, "0")

level2nodes(ct, 1)

Run the code above in your browser using DataCamp Workspace