knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

MetabolitesGraphs contains the codes to integrate gene expression data into a metabolic model and extract metabolites-based graphs. It provides test expression data and kidney model.

The metabolites are connected by reactions and by the relative catalyzing enzymes. Two metabolites are connected if one is a substrate and the other one is a product in one or multiple reactions.

The gene-protein-reaction associations are needed. The relative file, containing the reaction and the gene ids associated. By default, the one from the human generic GEM is used.

If the parameter catalyzed is TRUE, only reactions with associated enzymes are kept.

Each edge represented by the enzymes catalyzing the reactions is weighted by their expression values.

Multiple edges, corresponding to the multiple enzymes connecting the two metabolites, are simplified to single edges: for each edge expression values of enzymes acting in the same reaction are averaged, and these averages are then summed up for enzymes acting in different reactions

This document provides a general pipeline. To report bugs and arising issues, please visit https://github.com/cds-group/MetabolitesGraphs

Installation Instructions

System Prerequisites

MetabolitesGraphs needs the package sybilSBML, which in turn depends on libSBML to import and read SBML files. Running functions could fail if these prerequisite library is not available. Please read through the instructions provided at https://github.com/cran/sybilSBML/blob/master/inst/INSTALL.

R Package dependencies

devtools package is needed to install MetabolitesGraphs directly from github.

devtools

Package devtools is available at CRAN. For Windows, this seems to depend on having Rtools for Windows installed. You can download and install this from: http://cran.r-project.org/bin/windows/Rtools/

To install R package devtools call:

    install.packages("devtools")

MetabolitesGraphs Installation

From GitHub using devtools:

In R console, type:

    library(devtools)
    install_github("cds-group/MetabolitesGraphs")

Getting Started

First, load the library.

library(MetabolitesGraphs)

Import and read a metabolic model in SBML to get the stoichiometric matrix. In the example below the metabolic model of kidney tissue downloaded from https://metabolicatlas.org/ is imported.

stoich_mat <- load_mod(system.file("extdata", "kidney.xml", package = "MetabolitesGraphs"))

Edges list is then extracted from the stoichiometric matrix.

edges_list <- edges_list(stoich_mat)

Enzymes catalyzing each reaction from the Generic genome-scale metabolic model of Homo sapiens are added to the edges.

data(rxn_gene)
edges_list_w_enzymes <- add_enzymes(edges_list, rxn_gene)

Most common recurring metabolites are removed to avoid unrealistic connections

data(recurring_mets)
edges_list_no_rec_mets <- remove_mets(edges_list_w_enzymes, curr_met)

Expression values are associated to enzymes catalyzing each reaction for each sample

expr_dir <- system.file("extdata/expression/", package = "MetabolitesGraphs")
output_dir <- "./"
integrate_expression(edges_list_no_rec_mets,expr_dir, "txt", "edges-", output_dir)

Transform the edges list of each sample in graphml format graphs

input_dir <- system.file("extdata/edges_list/", package = "MetabolitesGraphs")
output_dir <- "./"
getMetGraph(input_dir,output_dir)


cds-group/MetabolitesGraphs documentation built on Dec. 19, 2021, 2:52 p.m.