readGMT: readGMT

Description Usage Arguments Value Examples

View source: R/lib_enrichment.R

Description

Created for simplification of reading .gmt files into RITAN.

Usage

1
readGMT(f = NA)

Arguments

f

GMT file name. Please provide a full path if the file is not in the current working directory.

Value

A list() where the name of each entry is the term (first column of GMT file) and the value is a chr array of genes associated with the term.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Make an example list() to show the GMT format
set <- list( term1=c('gene_name1','gene_name2'),
             term2=c('gene_name3','gene_name4','gene_name5') )
## Not run: 
# Write a GMT file for "set"
writeGMT( set, 'my_file.gmt' )

# Reading GMT files
geneset <- readGMT( 'my_file.gmt' )

# GMT files are available from multiple sources including http://software.broadinstitute.org/gsea/msigdb/

## End(Not run)

RITAN documentation built on Nov. 8, 2020, 8:16 p.m.