Description Usage Arguments Details Value Examples
Converts GeneSetCollection objects to CategorizedCollection objects.
1 2 | as.CategorizedCollection(GScollection, category = "uncategorized",
subCategory = "uncategorized")
|
GScollection |
An object of class |
category |
The name of the category that all the gene sets will be assigned to (see details). |
subCategory |
The name of the subcategory that all the gene sets will be assigned to (see details). |
This function sets the CollectionType
for each set
in the collection to CategorizedCollection. If
GScollection
contains BroadCollection
gene sets,
their fields category
and subcategory
will be
used. Otherwise the category
and subcategory
fields will be used.
A CategorizedCollection object
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ## Not run:
## To run this example, first obtain the MSigDB database in XML
## format (see
## http://software.broadinstitute.org/gsea/downloads.jsp). It is
## assumed that the database is locally available as the file
## "msigdb_v6.0.xml".
The \code{importMSigDB.xml} function is just a shortcut to the
following:
db <- getBroadSets("msigdb_v6.1.xml")
db <- as.CategorizedCollection(db)
## The database is now in an acceptable format to create a local
## repository using createRepository
## End(Not run)
## A small sample of the MSigDB as imported by importMSigDB.xml is
## included in gep2pep. The following creates (and deletes) a
## gep2pep repository.
db_sample <- loadSamplePWS()
## The function \code{as.CategorizedCollection} can also be used to
## create arbitrary gene set collections specifying the categories
## and subcategories once for all the sets:
library(GSEABase)
mysets <- as.CategorizedCollection(
GeneSetCollection(
list(GeneSet(c("g1", "g2"), setName="set1"),
GeneSet(c("g3", "g4"), setName="set2"))
),
category="mycategory",
subCategory="mysubcategory"
)
newCollection <- GeneSetCollection(c(db_sample, mysets))
## The created repository will include both the sample gene sets
## and the two sets just created:
repo_path <- file.path(tempdir(), "gep2pepTemp")
rp <- createRepository(repo_path, newCollection)
## removing temporary repository
unlink(repo_path, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.