convertToGeneAnswers: Convert InterMineR enrichment analysis results to GeneAnswers...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/convertToGeneAnswers.R

Description

convertToGeneAnswers constitutes a wrapper function for converting the results of doEnrichment function to a GeneAnswers-class object. This way the user can utilize the functions of GeneAnswers package to visualize the results of InterMineR enrichment analysis.

Usage

1
2
3
4
5
6
7
8
9
convertToGeneAnswers(
  enrichmentResult,
  geneInput,
  geneInputType,
  geneExprProfile,
  annLib,
  categoryType,
  enrichCategoryChildName
)

Arguments

enrichmentResult

a list containing the results of doEnrichment function.

geneInput

a data.frame containing the gene identifiers used for the InterMineR enrichment analysis, and possible values associated with them.

geneInputType

a character string specifying the InterMineR gene identifier type of the values assigned to geneInput argument. InterMineR identifiers for each Mine can be retrieved with getModel function.

geneExprProfile

a data.frame containing gene expression information (optional)

annLib

name of given annotation library file or user provided annotation list.

categoryType

name of given annotation category or NULL for user provided annotation list.

enrichCategoryChildName

a character string specifying the InterMIneR annotation category identifier. This argument must be assigned manually if:

1) 'enrichIdentifier' column is missing from the widgets of the Mine used by doEnrichment,

2) the value of 'enrichIdentifier' for the enrichment widget used by doEnrichment is NA.

InterMineR identifiers for each Mine can be retrieved with getModel function.

Value

a GeneAnswers-class object.

Author(s)

InterMine Team

References

https://bioconductor.org/packages/release/bioc/html/GeneAnswers.html

See Also

doEnrichment, GeneAnswers-class, getWidgets, getModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# load human genes which are associated with Diabetes (retrieved from HumanMine)
data("PL_DiabetesGenes")

# get Gene.primaryIdentifiers (ENTREZ Gene identifier)
hsa_gene_entrez = as.character(PL_DiabetesGenes$Gene.primaryIdentifier)

# perform enrichment analysis with InterMineR
hsa_enrichResult = doEnrichment(
  im = initInterMine(listMines()["HumanMine"]),
  genelist = "PL_DiabetesGenes",
  widget = "go_enrichment_for_gene",
  correction = "Benjamini Hochberg"
)

# convert InterMineR enrichment analysis results to a GeneAnswers object
# Do not run unless you have installed and loaded GeneAnswers package!

# load GeneAnswers
library(GeneAnswers)
  
hsa_geneanswers = convertToGeneAnswers(
  enrichmentResult = hsa_enrichResult,
  geneInput = data.frame(GeneID = as.character(hsa_gene_entrez), 
                         stringsAsFactors = FALSE),
  geneInputType = "Gene.primaryIdentifier",
  annLib = 'org.Hs.eg.db',
  categoryType = "GO"
  # enrichCategoryChildName = "Gene.goAnnotation.ontologyTerm.parents.identifier"
)

InterMineR documentation built on Dec. 7, 2018, 6 p.m.