readPathways: Returns a list of pathways from various file formats.

Description Usage Arguments Value Examples

View source: R/pathways.R

Description

This function supports custom pathway annotations to use for fedup pathway enrichment analysis. Current file formats supported are gmt, txt, and xlsx.

Usage

1
2
3
4
5
6
7
8
readPathways(
    pathwayFile,
    header = FALSE,
    pathCol = NULL,
    geneCol = NULL,
    minGene = 1L,
    maxGene = Inf
)

Arguments

pathwayFile

(char) path to file with pathway annotations

header

(logical) whether pathwayFile has a header (default FALSE)

pathCol

(char or int) column name or number with pathway identifiers (for use with non-GMT input files (eg "Pathway.ID" or 2; default NULL))

geneCol

(char or int) column name or number with gene identifiers (for use with non-GMT input files (eg "Gene.ID" or 5; default NULL))

minGene

(integer) minimum number of genes to be considered in a pathway (default 1)

maxGene

(integer) maximum number of genes to be considered in a pathway (default Inf)

Value

A list of vectors with pathway annotations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Generate pathway list from GMT annotation file
pathways <- readPathways(
    system.file("extdata", "Human_Reactome_November_17_2020_symbol.gmt",
        package = "fedup"
    ),
    minGene = 10, maxGene = 500
)
# Generate pathway list from XLSX annotation file
pathways <- readPathways(
    system.file("extdata", "SAFE_terms.xlsx", package = "fedup"),
    header = TRUE, pathCol = "Enriched.GO.names", geneCol = "Gene.ID"
)

rosscm/fedup documentation built on July 19, 2021, 2:21 a.m.