GMT: Read and Write GMT files

Description Usage Arguments Format Details Value Examples

Description

Functions to read and write Gene Matrix Transposed (GMT) files and to test if an object inherits from GMT.

Usage

1
2
3
4
5
read.GMT(filename)

write.GMT(gmt, filename)

is.GMT(x)

Arguments

filename

Location of the gmt file.

gmt

A GMT object.

x

The object to test.

Format

A GMT object is a named list of terms, where each term is a list with the items:

id

The term ID.

name

The full name or description of the term.

genes

A character vector of genes annotated to this term.

Details

A GMT file describes gene sets, such as biological terms and pathways. GMT files are tab delimited text files. Each row of a GMT file contains a single term with its database ID and a term name, followed all genes annotated to the term.

Value

read.GMT returns a GMT object.
write.GMT returns NULL.
is.GMT returns TRUE if x is a GMT object, else FALSE.

Examples

1
2
3
4
5
6
7
8
  fname_GMT <- system.file("extdata", "hsapiens_REAC_subset.gmt", package = "ActivePathways")
  gmt <- read.GMT(fname_GMT)
  gmt[1:10]
  gmt[[1]]
  gmt[[1]]$id
  gmt[[1]]$genes
  gmt[[1]]$name
  gmt$`REAC:1630316`

HenryWotton/weighted_merge documentation built on Feb. 25, 2021, 10:29 p.m.