readGmt: Read in gene sets from GMT files

Description Usage Arguments Value Examples

View source: R/readGmt.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
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)

paxtoolsr documentation built on Nov. 8, 2020, 8:29 p.m.