gongtiansu / KnotFold

Accurate Prediction of RNA Secondary Structure Including Pseudoknots through Solving Minimum-cost Flow with Learned Potential
MIT License
4 stars 2 forks source link

KnotFold

About The Project

The implementation of the paper "Accurate prediction of RNA secondary structure including pseudoknots through solving minimum-cost flow with learned potentials".

Getting Started

Prerequisites

Install PyTorch 1.6+, python 3.7+

Installation

  1. Clone the repo

    git clone https://github.com/gongtiansu/KnotFold.git
  2. Install python packages

    cd KnotFold
    pip install -r requirements.txt

Usage

  1. KnotFold.py: predicting RNA secondary structure (bpseq format) from RNA sequence (fasta format).
    python KnotFold.py -i <RNA_fasta> -o <output_dictionary> (--cuda)
  2. KnotFold_mincostflow: constructing RNA secondary structure from base pairing probability using the minimum-cost flow algorithm.
    KnotFold_mincostflow <prior_probability> <reference_probability> 
  3. KnotFold_mincostflow.cc: the source C++ code of the minimum-cost flow algorithm.
    g++ KnotFold_mincostflow.cc -o KnotFold_mincostflow -std=c++0x -O2 

    Example

    cd example
    ./run_example.sh

    Training

    We provide training code for KnotFold.

License

Distributed under the MIT License. See LICENSE for more information.