utils-geneset {iSEEu} | R Documentation

## Gene set utilities

### Description

Utility functions to control the behavior of the GeneSetTable.

### Usage

    .getIdentifierType()

    .setIdentifierType(value)

    .getOrganism()

    .setOrganism(value)

    .getGeneSetCommands(collection, mode)

    .setGeneSetCommands(value)

### Arguments

`value` | For `.setIdentifierType` and `.setOrganism`, a string containing the type of identifier or organism package to use. For `.setGeneSetCommands`, a named list containing two character vectors, see Details.
`collection` | String specifying the gene set collection.
`mode` | String specifying the mode of operation for the returned commands.

### Details

By default, `.getGeneSetCommands` will extract GO and KEGG terms. The organism and identifier type relates to the manner in which this default extraction is performed.

Users can add their own gene set collections by supplying a named list to `.setGeneSetCommands`. Each element of the list should be a named character vector of length two, with names `"show"` and `"extract"` - see the return value for what these are. The names of the list should be unique and will be used in the GeneSetTable interface.

Alternatively, any element of the list may be `NULL`, in which case it is excluded from the interface. This is useful for setting, e.g., `GO=NULL` to ignore the in-built GO terms.

### Value

`.getIdentifierType` will return the identifier type to use, defaulting to `"ENTREZID"`.

`.getOrganism` will return the organism package to use, defaulting `"org.Hs.eg.db"`.

`.getGeneSetCommands` will return:

- If `mode="show"`, a string containing R commands that create `tab`, a data.frame of all gene sets for a given `collection`.

- If `mode="extract"`, a format string containing R commands that (after formatting) create `selected`, a character vector of gene identities for the selected gene set. This format string should accept one string argument corresponding to the deparsed name of the gene set.

Each of the setter functions will set the corresponding option and return `NULL`, invisibly.

### Author(s)

Aaron Lun

### See Also

GeneSetTable, where these functions have their effect.

### Examples

    .setIdentifierType("ENSEMBLID")
    .getIdentifierType()

    .setOrganism("org.Mm.eg.db")
    .getOrganism()

    .getGeneSetCommands("GO", "show")
    .getGeneSetCommands("GO", "extract")

    .setGeneSetCommands(
        list(AaronRandomCollection=
            c(
                show='tab <- some_function_to_list_my_gene_sets()',
                extract='selected <- some_function_to_get_one_gene_set(%s)'
            )
        )
    )

    .getGeneSetCommands("AaronRandomCollection", "show")
    .getGeneSetCommands("AaronRandomCollection", "extract")

[Package iSEEu version 1.0.1 Index]