GmtList: Convert a list to a GmtList object

Description Usage Arguments See Also Examples

View source: R/AllClasses.R

Description

Convert a list to a GmtList object

Usage

1

Arguments

list

A list of genesets; each geneset is a list of at least three fields: 'name', 'desc', and 'genes'. 'name' and 'desc' contains one character string ('desc' can be NULL while 'name' cannot), and 'genes' can be either NULL or a character vector. In addition, 'namespace' is accepted to represent the namespace.

For convenience, the function also accepts a list of character vectors, each containing a geneset. In this case, the function works as a wrapper of as.GmtList

See Also

If a list of gene symbols need to be converted into a GmtList, use 'as.GmtList' instead

Examples

1
2
3
4
5
6
7
8
testList <- list(list(name="GS_A", desc=NULL, genes=LETTERS[1:3]),
                 list(name="GS_B", desc="gene set B", genes=LETTERS[1:5]),
                 list(name="GS_C", desc="gene set C", genes=NULL))
testGmt <- GmtList(testList)

# as wrapper of as.GmtList
testGeneList <- list(GS_A=LETTERS[1:3], GS_B=LETTERS[1:5], GS_C=NULL)
testGeneGmt <- GmtList(testGeneList)

BioQC documentation built on Nov. 8, 2020, 7:16 p.m.