Environmental Pathways Affecting Gene Expression
This is a data analysis package allowing the user with a list of genes of interest to find enriched environmental pathways using a curated database.
To install this package, run:
# install.packages("remotes")
remotes::install_github("AhmedMehdiLab/E.PAGE")
To use the package, run:
library(E.PAGE)
# extract gene list from text input
genes <- "ftl ApoE CTSZ"
input <- process_input_text(genes, capitalize = TRUE)
# alternatively, extract gene list from Seurat object (see documentation for function parameters)
seurat_path <- system.file("extdata", "ex_seurat.rds", package = "E.PAGE")
seurat_obj <- readRDS(seurat_path)
input <- process_input_seurat(seurat_obj, 0)
# compute enriched annotations
results <- compute(input)
Statistically enriched annotations are stored in a tidyverse
tibble
, and can be viewed with:
results$stats
Individual categories can be analysed as well:
# result will be a list with CSGE (cigarette smoking), IGE (infection), DGE (diet) and TGE (toxin) headings
results <- compute_sets(input)
Roxygen documentation is available for all functions.
Analysis can also be performed on Gene Ontology terms if a database is provided:
library(org.Hs.eg.db)
genes <- "ftl ApoE CTSZ"
input <- process_input_text(genes, capitalize = TRUE)
results <- compute(input, org_db=org.Hs.eg.db)
This package also supports importing database and annotation files:
# example annotation and database file locations
anno_path <- system.file("extdata/ex_anno.csv", package="E.PAGE")
data_path <- system.file("extdata/ex_data.csv", package="E.PAGE")
# import .csv files (see documentation for function parameters)
anno <- import_annotations(anno_path, ",", TRUE, c(2, 4), 5)
data <- import_database(data_path, ",", FALSE, c(2, 4), 0)
# input genes and compute enrichment
genes <- "GENE1 GENE2 GENE3"
input <- process_input_text(genes)
results <- compute(input, anno, data)
Gene Ontology terms can be automatically generated from database files:
# import and process database file
data_path <- system.file("extdata/ex_data.csv", package="E.PAGE")
data <- import_database(data_path, ",", FALSE, c(2, 4), 0)
# generate annotations and save to file (see documentation for function parameters)
# performs enrichment for all gene sets, thus may take a long time with large databases
auto_anno(data, "GO", limit_universe = FALSE, save = "anno.csv")
auto_anno(data, "KEGG", limit_universe = FALSE, save = "anno.csv")
auto_anno(data, "MeSH", limit_universe = FALSE, save = "anno.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.