OBOCollection-class {GSEABase} | R Documentation

## Class "OBOCollection"

### Description

`OBOCollection` extends the `GOCollection` class, and is usually constructed from a file formated following the OBO file format. See `CollectionType` for general use of collections with gene sets.

### Objects from the Class

Objects are instantiated with calls to `OBOCollection` or `getOBOCollection`.

### Slots

`OBOCollection` extends `GOCollection` and `OBOCollection` has the following additional slots (these slots are NOT meant to be manipulated directly by the user):

`.stanza`:

  A `data.frame` representing the stanzas present in an OBO file. Row names of the data frame are unique stanza identifiers. The `value` column contains the stanza name (e.g., ‘Term’, i.e., the stanza name associated with a GO identifier).

`.subset`

  A `data.frame` representing (optional) subsets defined in the collection. Subsets are defined in the header of an OBO file with a subsetdef tag. Row names of the data frame are the subsetdef names; the `value` column contains the subset definition.

`.kv`

  A `data.frame` representing key-value pairs in the OBO source file. The row names of the data frame correspond to lines in the OBO file. The `stanza_id` column indexes the row of `.stanza` describing the stanza in which the key-value pair occured. The remaining columns (`key`, `value`) contain the parsed key and value.

### Methods

`OBOCollection` has the following methods, in addition to those inherited from `GOCollection`.

These methods list and select subsets of `OBOCollection`:

subsets

  `signature(object="OBOCollection", display="named")`: return a character vector of subsets present in `object`. Valid values for `display` are ‘named’ (a named character vector, with names equal to the names of the subsets and values the descriptions), ‘full’ (a character vector of name and description, with each pair formated into a single entry as “name (description)”), ‘key’ (subset names), or ‘value’ (subset descriptions).

[

  `signature(object="OBOCollection", i="character", j="missing", ...)`: return an `OBOCollection` by selecting just those subsets whose name matches the string(s) in `i`. This method calls the `[,GOCollection` method so, e.g., `evidenceCode` can be used to restricts which evidence codes the collection will identify.

These methods coerce to and from `OBOCollection`:

as

  `signature(object="OBOCollection", "graphNEL")`: create a directed graph with nodes generated from `ids(object)` and edges from `is_a` relations of `object`.

as

  `signature(object="graphNEL", "OBOCollection")`: create an `OBOCollection` with `ids` from the graph nodes, and edges from `inNodes(object)`.

### Author(s)

Martin Morgan <Martin.Morgan@RoswellPark.org>

### References

http://www.geneontology.org for details of the OBO format.

### See Also

`OBOCollection` constructor; `CollectionType` classes.

### Examples

    fl <- system.file("extdata", "goslim_plant.obo", package="GSEABase")
    obo <- getOBOCollection(fl)
    obo
    subsets(obo)
    obo["goslim_plant", evidenceCode="TAS"]
    g <- as(obo["goslim_goa"], "graphNEL")
    if (interactive() && require("Rgraphviz")) {
        plot(g)
    }

[Package GSEABase version 1.54.0 Index]