Learn R Programming

mulea (version 1.1.0)

write_gmt: 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)

Value

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

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.

Examples

Run this code
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
# \donttest{
write_gmt(
    gmt = tf_gmt, 
    file = "Transcription_factor_RegulonDB_Escherichia_coli_GeneSymbol.gmt")
# }

Run the code above in your browser using DataLab