R/classes.R

require(methods)

# S4 classes

setClass("DGEExact",
representation("list")
)

setClass("DGEList",
representation("list")
)

setClass("DGEGLM",
representation("list")
)

setClass("DGELRT",
representation("list")
)

setClass("TopTags",
representation("list")
)

# Set inheritance
# The LargeDataObject class is set in limma and provides a show method

setIs("DGEList","LargeDataObject")
setIs("DGEExact","LargeDataObject")
setIs("DGEGLM","LargeDataObject")
setIs("DGELRT","LargeDataObject")

# Show method

setMethod("show", "TopTags", function(object) {
	if(object$test=="exact") {
		cat("Comparison of groups: ",paste(rev(object$comparison),collapse="-"),"\n")
	} else {
		cat("Coefficient: ",object$comparison,"\n")
	}
	print(object$table)
})

Try the edgeR package in your browser

Any scripts or data that you put into this service are public.

edgeR documentation built on May 31, 2017, 11:02 a.m.