format_msigdb: Format Input Signatures from MSigDB

View source: R/format_msigdb.R

format_msigdbR Documentation

Format Input Signatures from MSigDB

Description

Reads a GMT file from MSigDB and converts it into a named list of gene sets suitable for IOBR functions.

Usage

format_msigdb(gmt, ont = "term", gene = "gene")

Arguments

gmt

Character string. Path to a GMT file.

ont

Character string. Name of the signature/set column in the parsed GMT table. Default is '"term"'.

gene

Character string. Name of the gene column in the parsed GMT table. Default is '"gene"'.

Value

Named list of character vectors, where each element contains the genes belonging to one signature.

Examples

tf <- tempfile(fileext = ".gmt")
writeLines(
  c(
    "HALLMARK_TNFA_SIGNALING_VIA_NFKB\tNA\tTNF\tNFKB1\tNFKB2",
    "HALLMARK_P53_PATHWAY\tNA\tTP53\tMDM2\tCDKN1A"
  ),
  con = tf
)

sig_list <- format_msigdb(tf, ont = "term", gene = "gene")
names(sig_list)
sig_list[[1]]

IOBR documentation built on May 30, 2026, 5:07 p.m.