write_gmt: Write GMT file

View source: R/Utils.R

write_gmtR Documentation

Write GMT file

Description

Writes gene set or ontology data.frame with specific formatting (columns representing ontology identifiers, descriptions, and associated lists of values) and writes it to a file in a standardized Gene Matrix Transposed (GMT) file format.

Usage

write_gmt(gmt, file)

Arguments

gmt

A data.frame containing the data to be written, imported from a GMT file with the read_gmt function.

file

Character, a path to a file.

Value

Returns the input as a GMT file at a specific location.

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"))

# writing the filtered ontology to a GMT file

write_gmt(
    gmt = tf_gmt, 
    file = "Transcription_factor_RegulonDB_Escherichia_coli_GeneSymbol.gmt")


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