Giter Site home page Giter Site logo

deepgrp's Introduction

DeepGRP - Deep learning for Genomic Repetitive element Prediction

PyPI version fury.io

DeepGRP is a python package used to predict genomic repetitive elements with a deep learning model consisting of bidirectional gated recurrent units with attention. The idea of DeepGRP was initially based on dna-nn, but was re-implemented and extended using TensorFlow 2.1. DeepGRP was tested for the prediction of HSAT2,3, alphoid, Alu and LINE-1 elements.

Getting Started

Installation

For installation you can use the PyPI version with:

pip install deepgrp

or install from this repository with:

git clone https://github.com/fhausmann/deepgrp
cd deepgrp
pip install .

Additionally you can install the developmental version with poetry:

git clone https://github.com/fhausmann/deepgrp
cd deepgrp
poetry install

Data preprocessing

For training and hyperparameter optimization the data have to be preprocessed. For inference / prediction the FASTA sequences can directly be used and you can skip this process. The provided script parse_rm can be used to extract repeat annotations from RepeatMasker annotations to a TAB seperated format by:

parse_rm GENOME.fa.out > GENOME.bed

The FASTA sequences have to be converted to a one-hot-encoded representation, which can be done with:

preprocess_sequence FASTAFILE.fa.gz

preprocess_sequence creates a one-hot-encoded representation in numpy compressed format in the same directory.

Hyperparameter optimization

For Hyperparameter optimization the github repository provides a jupyter notebook which can be used.

Hyperparameter optimization is based on the hyperopt package.

Training

Training of a model can be performed with:

deepgrp train <parameter.toml> <TRAIN>.fa.gz.npz <VALIDATION>.fa.gz.npz <annotations.bed>

The prefix of <TRAIN> and <VALIDATION> should be as row identifier in the first column of <annotations.bed>.

For more fine-grained control of the training process you can also use the provided jupyter notebook.

Prediction

The prediction can be done with the deepgrp main function like:

deepgrp <modelfile> <fastafile> [<fastafile>, ...]

where <modelfile> contains the trained model in HDF5 format and <fastafile> is a (multi-)FASTA file containing DNA sequences. Several FASTA files can be given at once.

Requirements

Requirements are listed in pyproject.toml.

Additionally for compiling C/Cython code, a C compiler should be installed.

Contribution:

First of all any contributing are very welcome. If you want to contribute, please make a Pull request with your changes. Your code should be formatted using yapf using the default settings, they and they should pass all tests without issues. For testing currently mypy and pylint static tests are used, while pytest is used for functional tests.

If you're adding new functionalities please provide corresponding tests in the tests directory.

Feel free to ask in case of any questions.

Further information

DeepGRP is published here . If you use DeepGRP please cite:

@Article{Hausmann2021,
author={Hausmann, Fabian and Kurtz, Stefan}, title={DeepGRP: engineering a software tool for predicting genomic repetitive elements using Recurrent Neural Networks with attention}, journal={Algorithms for Molecular Biology}, year={2021}, month={Aug}, day={23}, volume={16}, number={1}, pages={20}, issn={1748-7188}, doi={10.1186/s13015-021-00199-0}, url={https://doi.org/10.1186/s13015-021-00199-0}

}

You can find material to reproduce the results from the paper in the repository deepgrp_reproducibility.

deepgrp's People

Contributors

fhausmann avatar jklemm235 avatar

Stargazers

Ranjit Kumar Sahoo avatar Dong-Ha Oh avatar Helang avatar wook2014 avatar  avatar

Watchers

Dong-Ha Oh avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.