Skip to content

SchulzLab/RJAMI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title author date output vignette
RJAMI - Fast computation of Conditional Mutual Information for ceRNA network analysis
Markus List, Andrea Hornakova, Jilles Vreeken, Marcel H. Schulz
`r Sys.Date()`
rmarkdown::html_vignette
%\VignetteIndexEntry{Vignette Title} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}

News

09.01.2019 - RJAMI now uses JAMI v. 1.1 which implements a few minor improvements and fixes a bug in the multiple testing correction.

Purpose

JAMI is a java 8 software tool that enables its users to compute conditional mutual information for inferring competing endogenous RNA networks from matched gene and miRNA expression data. A detailled description of JAMI can be found on its website. The purpose of RJAMI is to make the functionality of JAMI conveniently available to R users to simplify usage and downstream analyses.

Quickstart

If

  • you are already familiar with JAMI
  • RJAMI is already set up correctly
  • you have prepared the necessary input files or R objects

There are only two things you need to know. First, you can manipulate the JAMI command line arguments via jami_settings(), e.g.

jami_settings(numberOfPermutations = 1e6)

Current settings are listed when no arguments are provided.

Second, you can call JAMI via

jami(gene_miRNA_interactions = your_interactions,
                   gene_expr = your_gene_expr,
                   mir_expr = your_mir_expr,
                   output_file = your_desired_result_file)

This function accepts common R data objects or file paths where the target file needs to be formatted in a tab delimited text format JAMI can understand. In the remainder of this documentation we will explain how to use RJAMI in detail.

Installing RJAMI

RJAMI is currently only available on github. It can be conveniently installed through the devtools R package

library(devtools)
install_github("SchulzLab/RJAMI")

If installation was successful the package can be loaded via

library(RJAMI)

Before we begin: testing if rJava is available

RJAMI is a wrapper package that conveniently makes the functionality of JAMI available to R users. This is realized with the help of the rJava package that allows Java objects to be manipulated from R. Before you can use RJAMI you therefore need to make sure that Java (version >= 1.8) and the rJava R package are installed and properly configured to work together. To allow users to test if everything is set up correctly, we provide a test function:

test_jvm()

If there is a problem you will receive an error message here and you need to fix the installation. Typical problems are

  • Java is not installed. Browse the web for instructions specific for your operating system to install Java.
  • rJava is not installed. Fix by install.packages("rJava")
  • Java is not properly configured. Under linux this can often be fixed by sudo update-alternatives --config java. Another option is to set the environment variable JAVA_HOME correctly.
  • rJava is not properly configured. This can often be fixed by sudo R CMD javareconf

If Java and rJava still don't work correctly, we recommend looking for help on StackOverflow.

Manipulate Settings

JAMI comes with a set of command line arguments that allow users to set important parameters of the software with respect to input data, computation strategy, p-value handling etc. The meaning of the individual settings is explained in JAMI's user manual. In RJAMI, we store these settings for convenience in a settings manager. Its current configuration can be listed like this:

jami_settings()

To change one of these settings you can provide new values via the same function, e.g.

jami_settings(pvalueCutOff = 0.05)

Input

First, let's load some toy data:

load(system.file("extdata",
                 "test_data.RData",
                 package = "RJAMI"))

JAMI expects three types of input:

  • gene expression
  • matched miRNA expression
  • gene-miRNA or gene-miRNA-gene interactions to be considered.

For the latter, two input formats are accepted. In the triple format, each gene-miRNA-gene interaction is listed separately like this:

head(gene_mir_interactions_triplets)

In the set format, we list for each gene possible miRNA interaction partners. gene-miRNA-gene triplets are then inferred by JAMI on the fly based on shared miRNAs. This can be represented as a list in R:

head(gene_mir_interactions_set)

NOTE: If you want to use the set format you need to update the settings accordingly:

jami_settings(tripleFormat = FALSE)

For gene and miRNA expression data you can choose between Bioconductor ExpressionSet, data frames or matrices. An example for gene expression:

head(gene_expr[,1:3])

And an example for miRNA expression data:

head(mir_expr[,1:3])

For all three input options you can also provide a file path. In this case, we expect that the target files follow the file formats that JAMI understands. These are detailled in the user manual.

Execution

Once all input data are prepared you can call the jami() function. With above toy data sets this would look like this:

result <- jami(gene_miRNA_interactions = gene_mir_interactions_triplets,
                   gene_expr = gene_expr,
                   mir_expr = mir_expr)

Here, we use a temporary file for storing the results. Alternatively, you can provide a file path of your choice to save the results for later use. These results can then be imported using standard R code, e.g. read.table.

The result of JAMI has two parts. The first part lists the results of all tested gene-miRNA-gene triplets:

head(result$result)

In the second part, results have been aggregated for all gene-gene pairs. To obtain an aggregate p-value we use the Fisher method.

head(result$aggregated)

Plotting the network graph

The significant ceRNA interactions reported by JAMI give rise to a ceRNA interaction network that can be drawn using any of the graph visualization libraries in R. Here we illustrate how the igraph R package can be used:

library(igraph)
edges <- graph_from_data_frame(result$aggregated, directed = TRUE)
plot(edges)

Downstream analysis

In R and in particular in the Bioconductor ecosystem dozens of packages have been developed for gene set analysis. We refer to bioconductor for an overview.

Final words

RJAMI has been developed to make JAMI more accessible. Should you encounter any issues with it please consider creating an issue on our github repository. Finally, if you find JAMI and RJAMI useful consider citing our paper.

Citation

Andrea Hornakova, Markus List, Jilles Vreeken, Marcel H Schulz; JAMI: fast computation of conditional mutual information for ceRNA network analysis, Bioinformatics, Volume 34, Issue 17, 1 September 2018, Pages 3050–3051, https://doi.org/10.1093/bioinformatics/bty221

About

R-wrapper for JAMI: Computation of conditional mutual information from large datasets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages