Learn R Programming

dcGOR (version 1.0.2)

Anno-class: Definition for S4 class Anno

Description

Anno has 3 slots: annoData, termData and domainData

Arguments

Value

  • Class Anno

Creation

An object of this class can be created via: new("Anno", annoData, termData, domainData)

Methods

Class-specific methods:
  • dim():
{retrieve the dimension in the object} annoData():{retrieve the slot 'annoData' in the object} termData():{retrieve the slot 'termData' (as class InfoDataFrame) in the object} domainData():{retrieve the slot 'domainData' (as class InfoDataFrame) in the object} tData():{retrieve termData (as data.frame) in the object} dData():{retrieve domainData (as data.frame) in the object} termNames():{retrieve term names (ie, row names of termData) in the object} domanNames():{retrieve domain names (ie, row names of domainData) in the object}

itemize

  • str():

item

  • show():
  • as(matrix, "Anno"):
  • as(dgCMatrix, "Anno"):
  • [i,j]:

Access

Ways to access information on this class:
  • showClass("Anno"):
{show the class definition} showMethods(classes="Anno"):{show the method definition upon this class} getSlots("Anno"):{get the name and class of each slot in this class} slotNames("Anno"):{get the name of each slot in this class} selectMethod(f, signature="Anno"):{retrieve the definition code for the method 'f' defined in this class}

See Also

Anno-method

Examples

Run this code
# create an object of class Anno, only given a matrix
annoData <- matrix(runif(50),nrow=10,ncol=5)
as(annoData, "Anno")

# create an object of class Anno, given a matrix plus information on its columns/rows
# 1) create termData: an object of class InfoDataFrame
data <- data.frame(x=1:5, y=I(LETTERS[1:5]), row.names=paste("Term",
1:5, sep="_"))
termData <- new("InfoDataFrame", data=data)
termData
# 2) create domainData: an object of class InfoDataFrame
data <- data.frame(x=1:10, y=I(LETTERS[1:10]),
row.names=paste("Domain", 1:10, sep="_"))
domainData <- new("InfoDataFrame", data=data)
domainData
# 3) create an object of class Anno
# VERY IMPORTANT: make sure having consistent names between annoData and domainData (and termData)
annoData <- matrix(runif(50),nrow=10,ncol=5)
rownames(annoData) <- rowNames(domainData)
colnames(annoData) <- rowNames(termData)
x <- new("Anno", annoData=annoData, domainData=domainData,
termData=termData)
x
# 4) look at various methods defined on class Anno
dim(x)
annoData(x)
termData(x)
tData(x)
domainData(x)
dData(x)
termNames(x)
domainNames(x)
# 5) get the subset
x[1:3,1:2]

Run the code above in your browser using DataLab