readGmt {paxtoolsr} | R Documentation

## Read in gene sets from GMT files

### Description

This function will read in gene sets in the GMT format into a named list.

### Usage

    readGmt(inputFile, removePrefix = FALSE, returnInfo = FALSE)

### Arguments

`inputFile` | an inputFile
`removePrefix` | Pathway Commons genesets are prefixed with a NCBI organism taxonomy number (e.g. 9606 for humans); this is a boolean whether to remove the prefix (default: FALSE)
`returnInfo` | a boolean whether to return information on genesets; these results are returned a list of two items: 1) basic GMT results and 2) datasource, organism, and id type information for each gene set (default: FALSE)

### Value

a named list where each entry corresponds to a gene set or a list described in the returnInfo parameter

### Examples

    f1 <- system.file("extdata", "test_PathwayCommons12.kegg.hgnc.gmt",
      package="paxtoolsr")
    f2 <- system.file("extdata", "test_PathwayCommons12.netpath.hgnc.gmt",
      package="paxtoolsr")

    results <- readGmt(f1)
    results <- readGmt(f2)
    results <- readGmt(f1, removePrefix=TRUE)
    results <- readGmt(f2, returnInfo=TRUE)

[Package paxtoolsr version 1.26.0 Index]