Learn R Programming

cnvGSA (version 1.10.0)

readGMT: Read gene-sets from a .gmt file

Description

Reads gene-sets from a .gmt file.

Usage

readGMT(filename)

Arguments

filename
The name of a file in the Gene Matrix Transposed format.

Value

A list having the following two elements:gs2gene - A list of character vectors where each vector contains the genes for a particular gene-set; the gene-set names ("GO:0030850" etc.) are stored as the names of the list elements. Since gene-sets can hold different numbers of genes, the vectors will typically have different lengths.gs2name - A single character vector mapping each gene-set name to its description. The descriptions are stored as the vector elements and the gene-set names are stored as the names of the vector elements.This list structure should be assigned to the gsData slot of a CnvGSAInput object.

References

GSEA wiki: Data formats http://www.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29

Examples

Run this code
library("cnvGSAdata")
gsDataFile <- system.file("extdata", "gsData.gmt", package="cnvGSAdata")
gsData <- readGMT(gsDataFile)

Run the code above in your browser using DataLab