gs2edge: Create Gene set matrices

Description Usage Arguments Value Author(s) See Also Examples

View source: R/gs2edge.R

Description

Given a vector of genes and a gene set library, create input objects for enrichment functions

Usage

1
gs2edge(idlist, idtype = c("SYMBOL", "ENTREZID", "REFSEQ", "ENSEMBL", "ACCNUM", "UNIPROT", "PMID"), lib, library.loc = NULL, n.upp = 50, n.low = 5, sets = c("GO", "KEGG"))

Arguments

idlist

character vector of gene ids for which to test enrichment of gene set categories

idtype

character, type of gene ids: SYMBOL, ENTREZID, REFSEQ, ENSEMBL, ACCNUM, UNIPROT, PMID. Default is SYMBOL

lib

character, organism library, e.g. "org.Hs.eg"

library.loc

character, location of library if local

n.upp

numeric, upper bound for number of genes in gene sets

n.low

numeric, lower bound for number of genes in gene sets

sets

character, GO or KEGG categories

Value

a list:

I

Indicator matrix of genes (rows) and gene sets (columns), for gene sets of size n, where n.low <= n <= n.upp

y

Indicator vector of genes in gene sets that are in 'idlist'

edge

data.frame of edges between genes and gene sets

Author(s)

Aimee Teo Broman

See Also

sequentialRM ILP bpList

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(org.Hs.eg.db)
## idlist <- sample(mappedRkeys(org.Hs.egSYMBOL),1000)

## out <- gs2edge(idlist,n.upp=30,idtype="SYMBOL",lib="org.Hs.eg")

## For input to sequentialRM:
## I=out$I
## y=out$y

## For input to bp:
## whole=colnames(out$I)
## part=out$y
## edge=out$edge

wiscstatman/Rolemodel documentation built on May 4, 2019, 6:32 a.m.