list_to_gmt: Convert a list to ontology (GMT) 'data.frame'.

View source: R/Utils.R

list_to_gmtR Documentation

Convert a list to ontology (GMT) data.frame.

Description

Converts a list of ontology elements (gene sets) to an ontology (GMT) data.frame object.

Usage

list_to_gmt(gmt_list)

Arguments

gmt_list

A list with named character vectors. The name will become the 'ontology_id', and the elements in the vector will become the 'list_of_values' in the ontology (GMT) data.frame.

Value

Returns ontology (GMT) data.frame where the 'ontology_name' contains random unique strings.

Examples

library(mulea)

# creating a list of gene sets
ontology_list <- list(gene_set1 = c("gene1", "gene2", "gene3"),
        gene_set2 = c("gene4", "gene5", "gene6"))

# converting the list to a ontology (GMT) object
new_ontology_object <- list_to_gmt(ontology_list)

mulea documentation built on Sept. 30, 2024, 9:44 a.m.