| xal {GSEABase} | R Documentation |
getBroadSets parses one or more XML files for gene sets. The
file can reside locally or at a URL. The format followed is that defined
by the Broad (below).
toBroadXML creates Broad XML from BroadCollection gene
sets.
getBroadSets(uri, ...)
toBroadXML(geneSet, con, ...)
asBroadUri(name,
base="http://www.broad.mit.edu/gsea/msigdb/cards")
uri |
A file name or URL containing gene sets encoded following the Broad specification. Gene sets can be embedded in other elements, such as those for Broad's MSIGDB. |
geneSet |
A GeneSet with
collectionType BroadCollection (to ensure that
required information is available). |
con |
An optional file name or connection to receive output. |
name |
A character vector of Broad gene set names, e.g.,
c('chr16q', 'GNF2_TNFSF10'). |
base |
Base uri for finding Broad gene sets. |
... |
Further arguments passed to the underlying XML parser,
particularly file used to specify an output connection
for toBroadXML. |
getBroadSets returns a GeneSetCollection of gene sets.
toBroadXML returns a character vector of a single
GeneSet or, if file is provided, writes the XML to a
file.
asBroadUri can be used to create URI names (to be used by
getBroadSets of Broad files.
Actual Broad XML files differ from the DTD (e.g., an implied ',' separator between genes in a set); we parse to and from files as they exists the actual files.
Martin Morgan <mtmrogan@fhcrc.org>
http://www.broad.mit.edu/gsea/
## 'fl' could also be a URI
fl <- system.file("extdata", "Broad.xml", package="GSEABase")
gss <- getBroadSets(fl) # GeneSetCollection of 2 sets
names(gss)
gss[[1]]
## Not run:
## Download from the Broad
getBroadSets(asBroadUri(c('chr16q', 'GNF2_ZAP70')))
## End(Not run)
fl <- tempfile()
toBroadXML(gss[[1]], con=fl)
noquote(readLines(fl))
unlink(fl)
## Not run:
toBroadXML(gss[[1]]) # character vector
## End(Not run)