| run_test | R Documentation |
This is a generic function that chooses an enrichment analysis procedure based on the model class and runs the analysis.
run_test(model)
## S4 method for signature 'ora'
run_test(model)
model |
Object of S4 class representing the mulea test. |
The function requires the definition of a model. Models currently implemented in mulea include Gene Set Enrichment Analysis (GSEA) and Over-Representation Analysis (ORA). These models must be defined through their specific functions which are provided in this package.
Results in form of data.frame. Structure of data.frame depends on
object processed by this generic method.
In the case of run_test was used with the model generated
by the ora function the returned
data.frame contains the following columns:
'ontology_id': Identifiers of the ontology elements.
'ontology_name': Names of the ontology elements.
'nr_common_with_tested_elements': Number of common elements between the
ontology element and the vector defined by the element_names parameter
of the ora function.
'nr_common_with_background_elements': Number of common elements between
the ontology element and the vector defined by the
background_element_names parameter of the ora function.
'p_value': The raw p-value of the overrepresentation analysis.
The adjusted p-value.
The column named based on the
p_value_adjustment_method parameter of the
ora function, e.g. 'eFDR'
In the case of run_test was used with the model
generated by the gsea function the returned
data.frame contains the following columns:
'ontology_id': Identifiers of the ontology elements.
'ontology_name': Names of the ontology elements.
'nr_common_with_tested_elements': Number of common elements between the
ontology element and the vector defined by the element_names parameter
of the gsea function.
'p_value': The raw p-value of the gene set enrichment analysis.
'adjusted_p_value': The adjusted p-value.
run_test method for ora object. Returns the results of the overrepresentation analysis.
run_test(ora): ora test.
gsea, ora
library(mulea)
# loading and filtering the example ontology from a GMT file
tf_gmt <- read_gmt(file = system.file( package="mulea", "extdata",
"Transcription_factor_RegulonDB_Escherichia_coli_GeneSymbol.gmt"))
tf_gmt_filtered <- filter_ontology(gmt = tf_gmt, min_nr_of_elements = 3,
max_nr_of_elements = 400)
# loading the example data
sign_genes <- readLines(system.file(package = "mulea", "extdata",
"target_set.txt"))
background_genes <- readLines(system.file(package="mulea", "extdata", "
background_set.txt"))
# creating the ORA model
ora_model <- ora(gmt = tf_gmt_filtered,
# the test set variable
element_names = sign_genes,
# the background set variable
background_element_names = background_genes,
# the p-value adjustment method
p_value_adjustment_method = "eFDR",
# the number of permutations
number_of_permutations = 10000,
# the number of processor threads to use
nthreads = 2)
# running the ORA
ora_results <- run_test(ora_model)
library(mulea)
# loading and filtering the example ontology from a GMT file
tf_gmt <- read_gmt(file = system.file(
package="mulea", "extdata",
"Transcription_factor_RegulonDB_Escherichia_coli_GeneSymbol.gmt"))
tf_gmt_filtered <- filter_ontology(gmt = tf_gmt, min_nr_of_elements = 3,
max_nr_of_elements = 400)
# loading the example data
sign_genes <- readLines(system.file(package = "mulea", "extdata",
"target_set.txt"))
background_genes <- readLines(system.file(package="mulea", "extdata",
"background_set.txt"))
# creating the ORA model
ora_model <- ora(gmt = tf_gmt_filtered,
# the test set variable
element_names = sign_genes,
# the background set variable
background_element_names = background_genes,
# the p-value adjustment method
p_value_adjustment_method = "eFDR",
# the number of permutations
number_of_permutations = 10000,
# the number of processor threads to use
nthreads = 2)
# running the ORA
ora_results <- run_test(ora_model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.