gmt2geneSet: gmt2geneSet

Description Usage Arguments Value Author(s) See Also Examples

Description

gmt2geneSet transforms a gmt format file into geneSets.

Usage

1
2
gmt2geneSet(gmt, termCol = 1, nonGeneCol = termCol,
  singleValue = NULL)

Arguments

gmt

a vector of character values. Each item is a list of words comprising a term and its corresponding gene set, which are separated by tab.

termCol

an integer value indicating in each item of gmt, which word is the term , by default, 1.

nonGeneCol

an integer value indicating in each item of gmt, which words are not the gene set, by default, termCol.

singleValue

a numeric value, which assigns the same value to all genes in a given gene set. This is useful when combining together the up-regulated gene sets (regularly, singleValue=1) and the down-regulated gene sets (regularly, singleValue=-1)

Value

a data frame, comprising three vectors: term (like pathway names), geneset (a gene symbol list separate by comma), and value (either discrete or continuous separated by comma)

Author(s)

Shijia Zhu, shijia.zhu@mssm.edu

See Also

geneSet2Net; geneSet2sparseMatrix;

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# download the gmt file
gmt <- readLines( paste0('http://amp.pharm.mssm.edu/CREEDS/download/',
'single_drug_perturbations-v1.0.gmt') ) 

# obtain the index of up-regulated and down-regulated gene sets
index_up <- grep('-up',gmt)
index_down <- grep('-dn',gmt)

# transform the gmt file into gene sets. The gene set is a data frame, 
# comprising three vectors: 
# term (here is drug), geneset (a gene symbol list separate by comma), 
# and value (1 and -1 separate by comma)
gff_up <- gmt2geneSet( gmt[index_up], termCol=c(1,2), singleValue = 1 )
gff_down <- gmt2geneSet( gmt[index_down], termCol=c(1,2), singleValue = -1 )

zhushijia/GIGSEA documentation built on May 3, 2019, 10:45 p.m.