Learn R Programming

SetRank (version 1.1.0)

exportSingleResult: Export a SetRank network and accompanying tables.

Description

Given a single SetRank analysis result, writes out the following files:
  1. SetRank network in GML format called.gmlwhereis the specified network name.
  2. A Cytoscape VizMap visualisation file, calledsetrank.xml.
  3. A TAB-delimited file listing the signficant pathways in the network, called_pathways.txtwithagain the network name.
  4. A TAB-delimited file listing which significant genes belong to which pathway, called_membership.txtwithagain the network name.

Usage

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
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")