gsea-class {mulea}R Documentation

Gene Set Enrichment Analysis (GSEA)

Description

An S4 class to represent the gsea tests in mulea.

Usage

## S4 method for signature 'gsea'
run_test(model)

Arguments

model

Object of S4 class representing the mulea test.

Value

GSEA object. This object represents the result of the gsea tests.

run_test method for GSEA object. Returns results of the enrichment analysis.

Methods (by generic)

Slots

gmt

A data.frame representing the ontology GMT.

element_names

A vector of elements names (gene or protein names or identifiers) to include in the analysis.

element_scores

A 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_power

A power of weight. Default value is 1.

element_score_type

Defines 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_permutations

The number of permutations used in gsea test. Default value is 1000.

test

character

Examples

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)

[Package mulea version 1.0.1 Index]