README.md

omePath

omePath is a generic tool for omics pathway enrichment analysis

This page provides a quick tutorial (workshop oriented) information to start and use omePath.

Contents

Description

omePath provide enrichment analysis techniques with following properties:

Requirements

omePath is an R package that can be run on the command line or as an R function. It requires the following R packages included in Bioconductor and CRAN (Comprehensive R Archive Network). Please install these packages before running omePath.

Installation

omePath can be installed as an R package and run as an R function. You will need to install the omePath dependencies.

From R

Install omePath in RStudio

  1. Install devtools :
    • > install.packages('devtools')
    • >library(devtools)
  2. Install the Bioconductor dependencies:
    • > install.packages('BiocManager'); library('BiocManager');
    • > BiocManager::install('limma')
  3. Install the CRAN dependencies:
    • > install.packages(c('future', 'downloader', 'reader', 'backports', 'gsEasy','pscl','pbapply','car','nlme','dplyr','vegan','chemometrics','ggplot2','pheatmap','cplm','hash','logging','data.table'), repos='http://cran.r-project.org')
  4. Install omePath (and also all dependencies from CRAN):
    • > devtools::install_github('omicsEye/omePath', force = TRUE)

Download the mapping database

Users can bring their own mapping files (pathways-omics) with the following format:

We provide mapping files (pathways-feature) for four main omics:

Input files format

Tweedieverse output as input for approaches of run omePath

Providing the score file and mapping file:

In this approach, a tab-delimited text file or a R data frame with row names being the features need to be provided. The file should have a column which will be used as the score for enrichment analysis.

omePath demo

| | coef | statistic | P.Value ----------------|----------------|-------------|------------- HMDB00696 | -0.066838102 | 60 | 0.513722581 HMDB00191 | -0.167002899 | 68 | 0.84283599 HMDB00148 | -0.106438214 | 60 | 0.513722581 HMDB00168 | -0.029952907 | 69 | 0.887385935 HMDB00641 | -0.040854959 | 64 | 0.670659533 HMDB00177 | -0.050286514 | 55 | 0.347357919 HMDB00517 | -0.0184334 | 70 | 0.932300503 HMDB00182 | -0.001386226 | 70 | 0.932300503 HMDB00883 | 0.04519753 | 74 | 0.932300503 HMDB00687 | 0.049785325 | 73 | 0.977402191 HMDB00172 | 0.04173989 | 74 | 0.932300503 HMDB00159 | -0.034784137 | 72 | 1 HMDB00158 | 0.034486909 | 76 | 0.84283599 HMDB00929 | 0.071698012 | 80 | 0.670659533 HMDB00162 | -0.030734138 | 67 | 0.798745339 HMDB00725 | 0.070803166 | 92 | 0.265669584

NOTE: If running omePath as a function, the data inputs can be of type data.frame instead of a path to a file.

Tweedieverse output as input for omePath

Run

# load the library
library(omePath)


# call the function
omePath_results <- omePath(input_data,
                    output,
                    mapper_file, 
                    pathway_col = "Pathway",
                    feature_col = "Feature",
                    input_metadata = NA,
                    meta = NA,
                    case_label = NA,
                    control_label = NA,
                    score_col = 'coef',
                    pval_threshold = 0.05,
                    fdr_threshold = NA,
                    Pathway.Subject = NA,
                    method = 'ks',
                    min_member = 2,
                    do_plot = TRUE)


Required option for both running approaches:

In running approach 1 (providing score file and mapping file), following data files need to be specified:

In running approach 2 following data files need to be specified::

Output Files

omePath generates two types of output files: data and visualization.

  1. Data output file
    • enrichment_stats.tsv : This file contains all of the enrichment analysis results ordered by increasing q-value.

pathway | pval | fdr | n | set_enrichment_score ---------------------------------|---------------|---------------|------|---------------------- Arginine and Proline Metabolism | 0.333333333 | 0.333333333 | 10 | 0.425686617 Histidine Metabolism | 0.179104478 | 0.268656716 | 10 | 0.502342185 Purine Metabolism | 0.001369986 | 0.004109959 | 10 | 0.701651617

* ``omePath.log`` : This file contains all of the debug information for the run. It includes all settings, warnings, errors, and steps run.
  1. Visualization output files
    • enrichment_plots.pdf : This file contains a heatmap of the significant associations.

Run a Demo

Example input files can be found in the tests folder of the omePath source.

Options

Run omePath help to print a list of the options and the default settings.

Visualization

omePath generates two enrichment plot per pathways (rank based and score based) in omePath that visualize the outputs and provide ggplot2 plots that can be used to generate manuscript/report quality figures. the m2 path returns a result variable which contains three variables 1) stats table 2) a list or ranked based enrichment plots, and 3) a list of score based enrichment plots. * omePath: this function generates an enrichment plot of all pathways reported by omePath and have the following parameters:

output_path: the path to the omePath output.

do_plot: a parameter to default is TRUE to generate the plots

pval_threshold: a threshold used to visualize only pathways with enrichment p-value less or equal to it, and the default is 0.05.

fdr_threshold: a threshold used to visualize only pathways with enrichment q-value (FDR) less or equal to it, and the default is NA. If the value is not NA then overwrites the pval_threshold condition.

Enrichment Plot

Example of Real world applications

Dyanmic of omics in pregenancy

Application 1: longitudinal study of the vaginal, gut, and oral microbiomes in 292 samples from 10 subjects sampled every three weeks throughout pregnancy.

Data ref: Goltsman, D.S.A., Sun, C.L. and Proctor, D.M., Metagenomic analysis with strain-level resolution reveals fine-scale variation in the human pregnancy microbiome. bioRxiv. 2018

Troubleshooting

  1. Question: When I try to install the R package I see errors about dependencies not being installed. Why is this?

    • Answer: Installing the R package will not automatically install the packages omePath requires. Please install the dependencies and then install the omePath R package.
  2. Question: When I run as a function I see the error Error in library(omePath): there is no package called 'omePath'. How do I fix this?

    • Answer: Install the R package and then try loading the library again.


omicsEye/deepath documentation built on Nov. 6, 2023, 6:04 a.m.