| gsea-class | R Documentation |
An S4 class to represent the gsea tests in mulea.
## S4 method for signature 'gsea'
run_test(model)
model |
Object of S4 class representing the mulea test. |
GSEA object. This object represents the result of the
gsea tests.
run_test method for GSEA object. Returns results of the enrichment analysis.
run_test(gsea): runs test calculations.
gmtA data.frame representing the ontology GMT.
element_namesA vector of elements names (gene or protein names or identifiers) to include in the analysis.
element_scoresA vector of numeric values representing a score (e.g. p-value, z-score, log fold change) for each 'element_name', in the same number and order as element_name.
gsea_powerA power of weight. Default value is 1.
element_score_typeDefines the GSEA score type.
'pos': Only positive element_scores
'neg': Only negative element_scores
'std': standard, containing both positive and negative scores Default value is 'std'.
number_of_permutationsThe number of permutations used in
gsea test. Default value is 1000.
testcharacter
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.frame`
scored_gene_tab <- read.delim(file = system.file(package = "mulea", "extdata",
"ordered_set.tsv"))
# creating the GSEA model
gsea_model <- gsea(gmt = tf_gmt_filtered,
# the names of elements to test
element_names = scored_gene_tab$Gene.symbol,
# the logFC-s of elements to test
element_scores = scored_gene_tab$logFC,
# consider elements having positive logFC values only
element_score_type = "pos",
# the number of permutations
number_of_permutations = 10000)
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.frame`
scored_gene_tab <- read.delim(file = system.file(package = "mulea", "extdata",
"ordered_set.tsv"))
# creating the GSEA model
gsea_model <- gsea(gmt = tf_gmt_filtered,
# the names of elements to test
element_names = scored_gene_tab$Gene.symbol,
# the logFC-s of elements to test
element_scores = scored_gene_tab$logFC,
# consider elements having positive logFC values only
element_score_type = "pos",
# the number of permutations
number_of_permutations = 10000)
# running the test
gsea_results <- run_test(gsea_model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.