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

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

# 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 )
#> Pathway file: Human_Reactome_November_17_2020_symbol.gmt #> => n total pathways: 2418 #> => n pathways (10-500): 1437
# 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" )
#> Pathway file: SAFE_terms.xlsx #> => n total pathways: 317 #> => n pathways (1-Inf): 317