GMT {ActivePathways} | R Documentation |
Read and Write GMT files
Description
Functions to read and write Gene Matrix Transposed (GMT) files and to test if an object inherits from GMT.
Usage
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 by all the 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
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`
[Package ActivePathways version 2.0.5 Index]