Export a SetRank network and accompanying tables.

Share:

Description

Given a single SetRank analysis result, writes out the following files:

  1. SetRank network in GML format called <n>.gml where <n> is the specified network name.

  2. A Cytoscape VizMap visualisation file, called setrank.xml.

  3. A TAB-delimited file listing the signficant pathways in the network, called <n>_pathways.txt with <n> again the network name.

  4. A TAB-delimited file listing which significant genes belong to which pathway, called <n>_membership.txt with <n> again the network name.

Usage

1
2
exportSingleResult(network, selectedGenes, collection, networkName,
  IDConverter = NULL, outputPath = "./")

Arguments

network

A SetRank network.

selectedGenes

A vector with the set of significant genes as Entrez Gene IDs. This should be the same set passed to the setRankAnalysis function.

collection

The set collection used for the SetRank analysis.

networkName

A name used to name the different output files.

IDConverter

Optional. By default, Entrez Gene IDs will be displayed in the output tables. This argument can be used to convert these into more human-friendly gene symbols. When supplied, should be a function that takes a vector of Entrez Gene IDs as single argument and returns the values of the corresponding gene symbols or whatever identifier you wish to have displayed in the output tables.

outputPath

The name of the directory where the results should be written. If the last element of the path doesn't exist, a directory will be created.

Value

None. Files are written out as a side effect. genes = sprintf("gene_ geneSets = lapply(1:9, function(i) sample(genes[((i-1)*10):((i+1)*10)], 10)) annotationTable = data.frame(termID=sprintf("set_ geneID=unlist(geneSets), termName = sprintf("dummy gene set dbName = "dummyyDB", description = "A dummy gene set DB for testing purposes") collection = buildSetCollection(annotationTable, referenceSet=genes) network = setRankAnalysis(genes, collection, TRUE) exportSingleResult(network, genes, collection, "example", function(x) x, "example_dir")

Author(s)

Cedric Simillion