Skip to content

u-brite/ImageNomeR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageNomeR

Image/Genome/Transcriptome Explorer

The purpose of ImageNomeR is to facilitate efficient exploration of fMRI/omics data.

Table of Contents

Background

Analyzing data often requires many repetitive change-run-plot cycles. Any feature identification leads to code edits to move on to the next step. We created a simple web interface to really speed up analysis work.

Features

  • Navigation is 100% by mouse.
  • ImageNomeR is geared toward analysis of fMRI and omics data.
  • It is not a new algorithm for prediction or feature detection, but an aid in analysis.
  • We currently produce three types of interactive, interconnected charts along with annotations.
  • The eventual goal is to have many types of plots and to link features with subjects.

Here are two examples of ImageNomeR being used to find features in an fMRI (top) and gene expression (bottom) dataset:



Requirements

You should have the following software installed to use ImageNomeR: python, pip, numpy, scikit-learn, requests, flask, jupyter notebook, and pytorch (optional).

Installation

Currently the only way to install is via git. Run this command:

git clone https://github.com/u-brite/ImageNomeR.git

We are working on a distributable pip package. You can run

pip install -e .

in the ImageNomeR directory to install the library component, but this will not install the server or web interface.

Data

We used the following two datasets:

For fMRI, we generated functional connectivity (FC) based on the Power atlas.

You can see an example of the Power regions of interest (ROIs) being used to extract signal at a given timepoint.


Loading Data

To load the data needed to run experiments, you must run the getdata.py script located in the data/ directory.

cd data
python getdata.py

Usage

Once you have loaded the data, navigate back to the top ImageNomeR directory, and start the server:

sudo python src/flask_backend/flask_backend.py

Navigate to http://localhost/ (note, no "s"). If the server is running but there are no analyses, you will see a screen like the following:


Our experiments are located in Jupyter notebooks. There are 4 experiments you can try:

  • notebooks/fmri/fmri4LibWorkout.ipynb
  • notebooks/fmri/fmri6WeighFeatCorrExperiments.ipynb
  • notebooks/fmri/fmri7MLPExperiments.ipynb (requires pytorch, preferably with GPU acceleration)
  • notebooks/omics/genecount2WandWFMultImageNomeR.ipynb

You must run jupyter notebook from the top ImageNomeR directory:

If the server is running, and you executed one or more experiments successfully, the page at http://localhost/ should now contain analyses:


Components

Library

The library formats user data into JSON and sends it to the server. The following line imports components from the ImageNomeR library:

from imagenomer import Analysis, JsonData, JsonSubjects, JsonFCMetadata

Please take a look at the code for details on how to generate acceptable JSON.

Server

This is a basic Flask server that coordinates communication between the web browser and the user's python code (which presumably generated results they want to examine). It contains the following endpoints:

  • / - Main page, in templates/index.html
  • /analyze - Analysis page, in templates/analyze.html
  • /post - URL to push data from user code
  • /data - URL for browser to send async requests to server
  • /clear - Not implemented yet, to be used for reducing memory load by removing old analyses

The static/ directory contains js and css files for the frontend.

Frontend

A simple web UI, using only the fetch and canvas APIs. Interoperability with the library and server requires paying attention to the JSON format. The front end is not able to make requests of the user code via the server (maybe in the future).

Results

fMRI-based diagnosis of Fibromyalgia

We attemped classification of normal controls versus female fibromyalgia sufferers with resting state and task (epr) functional connectivity from fMRI data, using Logistic Regression (LR) and MLP models. The results are as follows (averaged over 40 train/test splits):

Accuracy
LR 0.64±0.09
MLP 0.51±0.10
Sparse MLP 0.56±0.11

The LR model was superior to both MLP models at the p < 1e-4 and p < 6e-4 significance levels.

We identified several consistently prominent connections:

  • 'Temporal_Inf_L (aal)' to 'Fusiform_L (aal)' (UNK-UNK)
  • 'Cerebelum_Crus1_R (aal)' to 'Cerebelum_Crus2_R (aal)' (DMN-UNK)
  • 'Insula_R (aal)' to 'Cerebelum_Crus1_R (aal)' (UNK-UNK)

Additionally, the Default Mode Network (DMN) and Uncertain (UNK) network regions were greatly over-represented in the top few connections (20 total regions in the figure below).


Vastus lateralis biopsy-based diagnosis of type 2 diabetes

We also attempted classification of normal glucose tolerant versus type 2 diabetic men, again with Logistic Regression. Most subjects had 3 timepoints: basal, post, and recovery. The results are as follows (averaged over 80 random train/test splits):

basal post recovery
LR 0.52±0.16 0.60±0.16 0.57±0.16

We found a significant difference (p < 5e-4) between basal and post, but not a significant difference (p < 0.1) between post and recovery.

The following gene products appeared prominently in top features:

  • NEB
  • TTN
  • MT-CO1

Two of these are muscle proteins, and a third is heavily involved in metabolism (also implicated in many diseases).

Team Members

Anton Orlichenko | [email protected] | Team Leader
Jack Freeman | [email protected] | Team Co-leader
Grant Daly | [email protected]
Justin Li
Jie Yuan

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •