Learn R Programming

evanverse (version 0.4.0)

gmt2df: gmt2df: Convert GMT File to Long-format Data Frame

Description

Reads a .gmt gene set file and returns a long-format data frame with one row per gene, including the gene set name and optional description.

Usage

gmt2df(file, verbose = TRUE)

Value

A tibble with columns: term, description, and gene.

Arguments

file

Character. Path to a .gmt file (supports .gmt or .gmt.gz).

verbose

Logical. Whether to show progress message. Default is TRUE.

Examples

Run this code
if (FALSE) {
# Requires a GMT file to run:
gmt_file <- "path/to/geneset.gmt"
result <- gmt2df(gmt_file)
head(result, 10)
}

Run the code above in your browser using DataLab