GeneSetCollection-methods: Methods to construct GeneSetCollection instances

Description Usage Arguments Methods See Also Examples

Description

Use GeneSetCollection to construct a collection of gene sets from GeneSet arguments, or a list of GeneSets.

Usage

1
GeneSetCollection(object, ..., idType, setType)

Arguments

object

An argument determining how the gene set collection will be created, as described in the methods section.

...

Additional arugments for gene set collection construction, as described below.

idType

An argument of class GeneIdentifierType, used to indicate how the geneIds will be represented.

setType

An argument of class CollectionType, used to indicate how the collection is created.

Methods

signature(object = "GeneSet",idType="missing", setType="missing")

Construct a gene set collection from one or more GeneSet arugments.

signature(object = "list", idType="missing", setType="missing")

Construct a gene set collection from a list of GeneSets.

signature(object="missing", idType="AnnotationIdentifier", setType="CollectionType")
signature(object="missing", idType="AnnotationIdentifier", setType="CollectionIdType")

Construct a gene set collection of CollectionType entities (e.g., pathways for KEGGCollection, protein families for PfamCollection) implied by the map found in annotation(idType). If setType is a CollectionIdType and length(ids(setType))>0, the gene set collection is filtered to contain only those sets implied by the ids.

signature(object="character", idType="AnnotationIdentifier", setType="CollectionType")
signature(object="character", idType="AnnotationIdentifier", setType="CollectionIdType")
signature(object="character", idType="AnnotationIdentifier", setType="GOCollection")

Construct a gene set collection of CollectionType entities (e.g., pathways for KEGGCollection, protein families for PfamCollection) implied by the map found in annotation(idType). Use only those identifiers in object. If setType is a CollectionIdType and length(ids(setType))>0, the gene set collection is filtered to contain only those sets implied by the ids.

signature(object="character", idType="AnnotationIdentifier", setType="PfamCollection")

Construct a gene set collection by mapping all values in object to PfamIds found in the PFAM map implied by idType.

signature(object="character", idType="AnnotationIdentifier", setType="PrositeCollection")

Construct a gene set collection by mapping all values in object to ipi_ids found in the PFAM map implied by idType.

signature(object="character", idType="AnnotationIdentifier", setType="ChrlocCollection")

Construct a gene set collection by mapping all values in object to chromosome, strand, and position information found in the map implied by idType.

signature(object="ExpressionSet", idType="missing", setType="CollectionType")
signature(object="ExpressionSet", idType="missing", setType="CollectionIdType")

Construct a gene set collection using the annotation and featureNames of object to identify elements for CollectionType gene sets (e.g., pathways for KEGGCollection, protein families for PfamCollection) implied by object. The gene set collection contains only those AnnotationIdentifiers found in featureNames(object); if setType is a CollectionIdType and length(ids(setType))>0, the gene set collection is further filtered to contain only those sets implied by the ids.

signature(object="ExpressionSet", idType="missing", setType="GOCollection")

Construct a gene set collection using the annotation and featureNames of object to identify GO pathways implied by object. The map between featureNames and GO pathway identifiers is derived from the GO2PROBE table of the annotation package of object. The gene set collection contains only those AnnotationIdentifiers found in featureNames(object). The evidenceCode of GOCollection can be used to restrict the pathways seleted to those with matching evidence codes.

signature(object="ExpressionSet", idType="missing", setType="PfamCollection")

Construct a gene set collection by mapping all values in featureNames(object) to PfamIds found in the PFAM map implied by idType=AnnotationIdentifer(annotation(object)).

signature(object="ExpressionSet", idType="missing", setType="PrositeCollection")

Construct a gene set collection by mapping all values in featureNames(object) to ipi_id found in the PFAM map implied by idType=AnnotationIdentifer(annotation(object)).

signature(object="ExpressionSet", idType="missing", setType="ChrlocCollection")

Construct a gene set collection by mapping all values in featureNames(object) to chromosome, strand, and position information found in the CHRLOC map implied by idType=AnnotationIdentifer(annotation(object)).

signature(object="missing", idType="AnnotationIdentifier", setType="GOCollection")
signature(object="GOAllFrame", idType="missing", setType="GOCollection")

Construct a gene set collection containing all GO pathways referenced in the GOALLFrame provided. Each gene set only those Identifiers found in GOALLFrame. The ontology of each GOALLFrame GO ID will be included in the gene Set of that GO ID .

See Also

GeneSetCollection-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
gs1 <- GeneSet(setName="set1", setIdentifier="101")
gs2 <- GeneSet(setName="set2", setIdentifier="102")

## construct from indivdiual elements...
gsc <- GeneSetCollection(gs1, gs2)
## or from a list
gsc <- GeneSetCollection(list(gs1, gs2))

## set names must be unique
try(GeneSetCollection(gs1, gs1))

data(sample.ExpressionSet)
gsc <- GeneSetCollection(sample.ExpressionSet[200:250],
                         setType = GOCollection())

## Not run: 
## from KEGG identifiers, for example
library(KEGG.db)
lst <- head(as.list(KEGGEXTID2PATHID))
gsc <- GeneSetCollection(mapply(function(geneIds, keggId) {
    GeneSet(geneIds, geneIdType=EntrezIdentifier(),
            collectionType=KEGGCollection(keggId),
            setName=keggId)
}, lst, names(lst)))

## End(Not run)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: XML
Loading required package: graph

Attaching package:graphThe following object is masked frompackage:XML:

    addNode

Error in validObject(.Object) : 
  invalid classGeneSetCollectionobject: each setName must be distinct




KEGG.db contains mappings based on older data because the original
  resource was removed from the the public domain before the most
  recent update was produced. This package should now be considered
  deprecated and future versions of Bioconductor may not have it
  available.  Users who want more current data are encouraged to look
  at the KEGGREST or reactome.db packages

Warning message:
Package 'KEGG.db' is deprecated and will be removed from Bioconductor
  version 3.12 

GSEABase documentation built on Dec. 13, 2020, 2 a.m.