getGeneSets: Generate genesets from an annotated network.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/netWeight.R

Description

This function generates genesets based on a given netowrk, by grouping vertices sharing common attributes (in the same pathway or compartment). Genes associated with each vertex can be specified through gene.attr argument.

Usage

1
getGeneSets(graph, use.attr = "pathway", gene.attr = "genes", gmt.file)

Arguments

graph

An annotated igraph object..

use.attr

The attribute by which vertices are grouped (tepically pathway, or GO)

gene.attr

The attribute listing genes annotated with each vertex (ex: miriam.ncbigene, miriam.uniprot, ...)

gmt.file

Optinal. If provided, Results are exported to a GMT file. GMT files are readily used by most gene set analysis packages.

Value

A list of genesets or written to gmt file if provided.

Author(s)

Ahmed Mohamed

See Also

getGeneSetNetworks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 data(ex_kgml_sig)	# Ras and chemokine signaling pathways in human
 genesets <- getGeneSets(ex_kgml_sig, use.attr="pathway", gene.attr="miriam.ncbigene")


	# Write the genesets in a GMT file, and read it using GSEABase package.
 getGeneSets(ex_kgml_sig, use.attr="pathway", gene.attr="miriam.ncbigene", gmt.file="kgml.gmt")
 ## Not run: 
	if(requireNamespace("GSEABase"))
		toGmt("kgml.gmt")
	
## End(Not run)

	# Create genesets using compartment information
	data(ex_sbml) # bipartite metabolic network of Carbohydrate metabolism.
	genesets <- getGeneSets(ex_sbml, use.attr="compartment.name", gene.attr="miriam.uniprot")

NetPathMiner documentation built on Nov. 8, 2020, 8:20 p.m.