Skip to content
ArnovanHilten edited this page Aug 7, 2020 · 24 revisions

GenNet

Framework for Interpretable Neural Networks for genetics

  1. What is GenNet?
  2. Getting started
  3. GenNet from command line.
  4. GenNet.py convert
  5. GenNet.py train
  6. GenNet.py plot

What is GenNet?

GenNet is a command line tool that can be used to create neural networks for (mainly) genetics. GenNet gives the opportunity to let you decide what should be connected to what. Any information that groups knowledge can therefore be used to define connections in the network. For example, gene annotations can be used to group genetic variants into genes, as seen in the first layer of the image. This creates meaningful and interpretable connections. When the network is trained the network learns which connections are important for the predicted phenotype and assigns these connections a higher weight. For more information about the framework and the interpretation read the

paper

The Gennet framework is based on tensorflow, click here for the custom layer.

2. Getting started.

Prerequisites:

  • GenNet uses CUDA. Please make sure you have the correct version of CUDA installed. GenNet has been tested for:

    • CUDA 9.1 & Tensorflow 1.12.0
    • CUDA 10.0 & Tensorflow 1.13.1
    • CUDA 10.0 & Tensorflow 2.0.0-beta1
    • CUDA 10.1 & Tensorflow 2.2.0

Clone the repository

Open terminal. Navigate to the a place where you want to store the project. Clone the repository:

git clone https://github.com/arnovanhilten/GenNet

Install the virtual envionment

Navigate to the home folder and create a virtual environment

cd ~
python3 -m venv env_GenNet

This automatically instals the latest Tensorflow version for which GenNet has been tested. If you have an older version of CUDA install the appriopriate tensorflow-gpu by pip install tensorflow-gpu==1.13.1 (change 1.13.1 to your version).

Activate the environment

source env_GenNet/bin/activate

Install the packages

pip3 install --upgrade pip
pip3 install -r requirements_GenNet.txt

Gennet is ready to use!

3. How to use the GenNet from command line.

The command l

Open the command line and navigate to the GenNet folder

start the command line program by:

python GenNet.py

type --help for help

4. GenNet.py convert

convert bed and vcf to .h5

5. GenNet.py train

Training the network

6. GenNet.py plot

Generate plots