Giter VIP home page Giter VIP logo

derna's Introduction

DERNA

install with bioconda

DERNA is a tool that enables the design of RNA sequences based on protein sequences. DERNA accepts a protein sequence as input and provides a collection of Pareto optimal solutions consisting of RNA sequences that optimize both minimum free energy and codon adaptation index (CAI). Additionally, DERNA can function as a tool for predicting RNA structures and calculating CAI for given RNA sequences.

Contents

  1. Installation
  2. Usage instructions

Installation

Using conda

  1. Create a new conda environment named "derna" and install dependencies:

    conda create -n derna
  2. Then activate the created environment: conda activate derna.

  3. Install the package into current environment "derna":

    conda install -c bioconda derna

Build from source

Dependencies

  • Recent C++ compiler (C++11)

Compilation

mkdir build
cd build
cmake ..
make

Usage instructions

-i - <input file path>
-o - <output file path>
-m - model <0,1,-1> , 0 for nussinov, 1 for zuker, -1 for eval
-s - mode <1,2,3>, 1 for mfe, 2 for mfe+cai, 3 for sweep
-l - lambda <[0,1]>
-a - sweep increment <(0,1]>
-r - <input rna file path>
-O - <sweep output csv file name>
-g - <[0,inf)>
-t - threshold tau <(0,1)>
-p - threshold tau2 <(0,1)>
-c - <codon usage table file path>
-d - <energy parameters (model) directory>
./derna -i <input> -o <output> -m <model> -s <mode> ...
input: input file path 
output: output file path 
model: integer 0 for Nussinov based model, 1 for Zuker based model, -1 for eval model 
mode: integer 1 for only MFE mode, integer 2 for MFE + CAI mode, integer 3 for lambda swipe mode 
lambda: lambda value for MFE + CAI mode or lambda swipe mode 
incr: increment interval for lambda swipe mode 
swipe: swipe output csv file name 
g: minimal gap allowed in Nussinov based model 
rna: input rna file path for eval model

Examples

Fix $\lambda$

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_fixed_lambda.txt -m 1 -s 2 -l 0.5

cat P15421_fixed_lambda.txt

protein sequence: MYGKIIFVLLLSGIVSISASSTTGVAMHTSTSSSVTKSYISSQTNGITLINWWAMARVIFEVMLVVVGMIILISYCIR

lambda: 0.5
Zuker CAI
Energy: -74.2202
Time taken by DP is : 32sec
lambda: 0.5,O: -7422.02,mfe: -14870,cai: -25.9662,combined: -7422.02
zuker cai bp: (((((((((.....((((((((((.((((((((.(((((((((...))))))))).)))))))).)))))))))))))))))))((((((....((((((((.(((.((((((((((.(((((((((.(((((.((((((((((((((.((((((((((((....)))))).)))))))))))))))))))).))))))))))))))))))))))))))))))))))))))))),size: 234
zuker rna: AUGUAUGGCXXXXXCAUCUUCGUCUUGCUGCUCUCCGGGAUCGUXUCGAUCUCGGCGAGCAGCACGACGGGGGUGGCCAUGCAUACGAGUXXXXGCAGUAGCXUGAXUAAGAGUUAUXUAUCCUCACXGACCAACGGCAUCACCUUGAXAAAUUGGUGGGCGXXGGCCCGCXUAAUUUUCGAGGUGAUGCUGGUGGUCGUGGGGAUGAUAAUUCUUAUCAGCUACUGCAUUCGU.size: 234
zuker cai rna: AUGUAUGGCAAGAUCAUCUUCGUCUUGCUGCUCUCCGGGAUCGUGUCGAUCUCGGCGAGCAGCACGACGGGGGUGGCCAUGCAUACGAGUACCAGCAGUAGCGUGACUAAGAGUUAUAUAUCCUCACAGACCAACGGCAUCACCUUGAUAAAUUGGUGGGCGAUGGCCCGCGUAAUUUUCGAGGUGAUGCUGGUGGUCGUGGGGAUGAUAAUUCUUAUCAGCUACUGCAUUCGU.size: 234
Codon Adaptation Index: 0.716842
Minimum Free Energy: -148.7

Sweep (default thresholds)

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_sweep.txt -O P15421_sweep -m 1 -s 3

Estimated time: 10min

Evaluate an RNA sequence

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_evaluation.txt -r ./data/RNA/P15421_rna.txt -m -1

cat P15421_evaluation.txt

protein sequence: MYGKIIFVLLLSGIVSISASSTTGVAMHTSTSSSVTKSYISSQTNGITLINWWAMARVIFEVMLVVVGMIILISYCIR
eval MFE: -148.7
eval CAI: -28.3932
eval standard CAI: 0.694881

Only consider MFE

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_MFE_only.txt -m 1 -s 1

cat P15421_MFE_only.txt

protein sequence: MYGKIIFVLLLSGIVSISASSTTGVAMHTSTSSSVTKSYISSQTNGITLINWWAMARVIFEVMLVVVGMIILISYCIR

Zuker
Energy: -148.7
Time taken by DP is : 3sec
Time taken : 3sec
zuker bp:(((((((((.....((((((((((.((((((((.(((((((((...))))))))).)))))))).)))))))))))))))))))((((((....((((((((.(((.((((((((((.(((((((((.(((((.((((((((((((((.((((((((((((....)))))).)))))))))))))))))))).))))))))))))))))))))))))))))))))))))))))), size: 234
zuker rna:AUGUAUGGCXXXXXCAUCUUCGUCCUGCUGCUCUCCGGGAUCGUXUCGAUCUCGGCGAGCAGCACGACGGGGGUGGCCAUGCAUACGAGUXXXXGCAGUAGCXUGAXUAAGAGUUAUXUAUCCUCACXGACCAACGGCAUCACCUUGAXAAAUUGGUGGGCGXXGGCCCGCXUAAUUUUCGAGGUGAUGCUGGUGGUCGUGGGGAUGAUAAUUCUUAUCAGCUACUGCAUUCGU, size: 234
zuker rna:AUGUAUGGCAAAAUCAUCUUCGUCCUGCUGCUCUCCGGGAUCGUUUCGAUCUCGGCGAGCAGCACGACGGGGGUGGCCAUGCAUACGAGUACUAGCAGUAGCGUGACUAAGAGUUAUAUAUCCUCACAGACCAACGGCAUCACCUUGAUAAAUUGGUGGGCGAUGGCCCGCGUAAUUUUCGAGGUGAUGCUGGUGGUCGUGGGGAUGAUAAUUCUUAUCAGCUACUGCAUUCGU, size: 234
zuker cai: 0.694881

Nussinov based model (Fixed $\lambda$)

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_nussinov.txt -m 0 -s 2 -l 0.5 -g 1

Specify Codon Usage Table

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_fixed_lambda.txt -m 1 -s 2 -l 0.5 -c ./data/InputFiles/sample_codon_usage.csv

Specify Energy Parameters

./derna -i ../data/uniprotSeq/P15421.fasta -o P15421_fixed_lambda.txt -m 1 -s 2 -l 0.5 -d ./data/InputFiles/

derna's People

Contributors

xinyu-g avatar melkebir avatar

Stargazers

Liu Yang avatar Duen-Shian(Ben) Wang avatar Bryce Kille avatar  avatar kmanjor avatar

Watchers

kehan liu avatar

derna's Issues

DERNA consistently crashes on certain amino acid sequences

Thanks for an excellent package.

My issue is as above. Certain amino acid sequences simply crash with an error of type
[1] 132848 segmentation fault (core dumped) ./derna -i ~/test.fasta -o out.txt -m 1 -s 1

A partial output is written, e.g.

protein sequence: <my-sequence>

I have noticed that other amino acid sequences also crash, but only occasionally.

I have tried building from source, as well as using DERNA through bioconda.

bug: cannot pass codon tables

Hi! I'm trying to pass a codon table, but am getting issues like below:

╰─± ./build/derna -i data/input.fasta -o data/output.txt -c /home/hahl/derna/data/InputFiles/sample_codon_usage.csv -m 1 -s 2 -l 0.5
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stod
[1]    88748 IOT instruction (core dumped)  ./build/derna -i data/input.fasta -o data/output.txt -c  -m 1 -s 2 -l 0.5

As you can see, this happens for the sample table provided, which is meant to be the default values used as far as I'm aware. I'm attaching the input files below:
inputs.zip

build: bioconda version is obsolete

The bioconda version (1.0.2) is obsolete, as has issues in it preventing it from optimising CAI as intended. E.g. maximal CAI optimisation does not lead to a CAI of 1.

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.