readGMT: readGMT.R

Description Usage Arguments Details Value Author(s)

View source: R/aveytoolkit_readGMT.R

Description

Read in a GMT (Gene Matrix Transposed) file.

Usage

1
readGMT(filename, trimMissing = TRUE, quiet = FALSE)

Arguments

filename

the GTM file to read in (must end in .gmt)

trimMissing

logical indicating whether to trim missing gene identifiers that are read as empty strings (default is TRUE)

quiet

logical indicating whether to show how many records read or stay quiet. Default is to pass quiet = FALSE to 'scan()'

Details

Read in a vector of set names, descriptions, and gene identifiers and store them in a list. For more details on the GTM format, see http://www.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29. This code is heavily adapted from 'qusage::read.gmt()' and 'GSA::GSA.read.gmt()' to take the best of both worlds.

Value

a list with the following elements

genesets

a list with one element per gene set containing a character vector of genes

names

a list with one element per gene set containing the set names

descriptions

a list with one element per gene set containing the set descriptions

Author(s)

Stefan Avey.


stefanavey/aveytoolkit documentation built on March 5, 2020, 12:49 a.m.