Louis BECQUEY

Monoobjective resolution

# Prerequisites
*.d
# LaTeX temporary files
doc/*.toc
doc/*.bbl
doc/*.gz
# Compiled Object files
*.slo
*.lo
......
# Please set the following variables to the correct paths for JAR3D:
jar3dexec="/home/persalteas/Software/jar3dbin/jar3d_2014-12-11.jar"
ILmotifDir="/home/persalteas/Data/RNA/motifs/Matlab_results/IL/3.2/lib"
HLmotifDir="/home/persalteas/Data/RNA/motifs/Matlab_results/HL/3.2/lib"
\ No newline at end of file
# ------------------------------------------------
# Generic Makefile
# ------------------------------------------------
ICONCERT=/opt/ibm/ILOG/CPLEX_Studio_Community128/concert/include
ICPLEX=/opt/ibm/ILOG/CPLEX_Studio_Community128/cplex/include
LCONCERT=/opt/ibm/ILOG/CPLEX_Studio_Community128/concert/lib/x86-64_linux/static_pic/
LCPLEX=/opt/ibm/ILOG/CPLEX_Studio_Community128/cplex/lib/x86-64_linux/static_pic/
# project name (generate executable with this name)
TARGET = motifscan
TARGET = biominserter
CC = g++
# compiling flags here
CFLAGS = -I. -O3
CXXFLAGS = -std=c++17 -Wall -Wpedantic -Wextra
CFLAGS = -Icppsrc/ -I$(ICONCERT) -I$(ICPLEX) -O3
CXXFLAGS = -std=c++17 -Wall -Wpedantic -Wextra -Wno-ignored-attributes
LINKER = g++
# linking flags here
LDFLAGS = -lboost_system -lboost_filesystem -lboost_program_options
LDFLAGS = -lconcert -lilocplex -lcplex -lm -lpthread -ldl -lboost_system -lboost_filesystem -lboost_program_options -L$(LCONCERT) -L$(LCPLEX)
# change these to proper directories where each file should be
SRCDIR = src
SRCDIR = cppsrc
OBJDIR = obj
BINDIR = bin
......
# RNA_Motifs_Inserter
A C++ software interface to RNA motif databases, and algorithms to include known motifs in raw sequences.
This is a bi-objective integer programming algorithm.
It predicts the secondary structure of a RNA sequence with pieces of 3D information (non-canonical contacts) at some places,
by identifying zones that can fold like known motifs.
1/ How it works
===================================
INPUT:
- An RNA sequence (tested with sequences ~100 bases)
THEN
- Identifies possible 2D folds with RNAsubopt.
- Knowing possible 2D folds, locate every possibly unpaired loop (hairpin loop, internal loop, multiple junction...)
- align each unpaired loop to the catalogue of models of known RNA motifs (The 3D Motif Atlas of the BGSU RNA group)
- retrieve a list of potential motif-insertion-sites in the RNA sequence. Use them to define the constraints for the IP problem.
- Solve a bi-objective IP problem:
* Maximize the expected accuracy of the secondary structure,
* Maximize the number and size of motifs inserted in the structure.
OUTPUT:
- A set of secondary structures from the pareto front,
- The list of known motif inserted in the corresponding structures (and the non-canonical contacts)
- (Optionally, lower score structures from k-Pareto sets.)
2/ Installation
==================================
- Download and install RNAsubopt from the ViennaRNA package (https://www.tbi.univie.ac.at/RNA/)
- Download and install IBM ILOG Cplex optimization studio (https://www.ibm.com/analytics/cplex-optimizer), free academic account required
- Download and install Java runtime (Tested with Java 10)
- Download and install the latest JAR3D executable "jar3d_releasedate.jar" and motif models in this folder (http://rna.bgsu.edu/data/jar3d/models/)
Note that for HL and ILs, only the latest version is required (not all the versions provided in the folders).
- Download and install a C++ compiler and building dependencies and utilities (g++ or clang, automake, libboost)
......
#include "MOIP.h"
#include "SecondaryStructure.h"
#include "rna.h"
#include <algorithm>
#include <boost/format.hpp>
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <stdexcept>
#include <utility>
#include <vector>
using std::cerr, std::cout, std::endl;
using std::make_pair;
using std::vector;
uint MOIP::ncores = 0;
MOIP::MOIP(const RNA& rna, const vector<Motif>& insertionSites)
: rna_(rna), insertion_sites_(insertionSites), beta_(1.0), theta_{1.0 / (2.0 + 1.0)}
{
basepair_dv_ = IloNumVarArray(env_);
insertion_dv_ = IloNumVarArray(env_);
// Add the y^u_v decision variables
uint u, v, c = 0;
index_of_yuv_ = vector<vector<size_t>>(rna_.get_RNA_length() - 6, vector<size_t>(0));
for (u = 0; u < rna_.get_RNA_length() - 6; u++) {
for (v = u + 4; v < rna_.get_RNA_length(); v++) // A basepair is possible iff v > u+3
{
index_of_yuv_[u].push_back(c);
c++;
char name[15];
sprintf(name, "y%d,%d", u, v);
basepair_dv_.add(IloNumVar(env_, 0, 1, IloNumVar::Bool, name)); // A boolean whether u and v are paired
}
}
// Add the Cx,i,p decision variables
index_of_first_components.reserve(insertionSites.size());
index_of_Cxip_ = vector<vector<size_t>>(0);
index_of_Cxip_.reserve(insertionSites.size());
size_t i = 0;
for (const Motif m : insertionSites) {
index_of_first_components.push_back(i);
index_of_Cxip_.push_back(vector<size_t>(0));
for (const Component c : m.comp) {
index_of_Cxip_.back().push_back(i);
if (c.k > 0) i++;
char name[20];
sprintf(
name,
"C%d,%d-%d",
static_cast<int>(index_of_Cxip_.size() - 1),
static_cast<int>(index_of_Cxip_.back().size() - 1),
c.pos.first);
insertion_dv_.add(IloNumVar(env_, 0, 1, IloNumVar::Bool, name)); // A boolean whether component i of motif x is inserted at position p
}
}
cout << i + c << " decision variables are used !" << endl;
}
MOIP::~MOIP() { env_.end(); }
bool MOIP::is_undominated_yet(const SecondaryStructure& s)
{
for (uint i = 0; i < pareto_.size(); i++) {
if (pareto_[i] > s) return false;
}
return true;
}
void MOIP::solve_objective(int o, double min, double max)
{
IloModel model_ = IloModel(env_);
cout << "Solving objective function " << o << "..." << endl;
add_problem_constraints(model_);
switch (o) {
case 1: {
// Add the motif objective function
IloExpr obj1 = IloExpr(env_);
for (uint i = 0; i < insertion_sites_.size(); i++) {
IloNum n_compo_squared = IloNum(insertion_sites_[i].comp.size() * insertion_sites_[i].comp.size());
obj1 += n_compo_squared * insertion_dv_[index_of_first_components[i]];
}
model_.add(IloMinimize(env_, obj1));
} break;
case 2: {
// Add the likelihood objective function
}
}
IloCplex cplex_ = IloCplex(model_);
if (!cplex_.solve()) {
env_.error() << "\t>Failed to optimize LP." << endl;
throw(-1);
}
IloNumArray basepair_values(env_);
IloNumArray insertion_values(env_);
env_.out() << endl << "Solution status = " << cplex_.getStatus() << endl;
env_.out() << endl << "Objective value = " << cplex_.getObjValue() << endl;
cplex_.getValues(basepair_values, basepair_dv_);
env_.out() << endl << "Basepair Values = " << basepair_values << endl;
cplex_.getValues(insertion_values, basepair_dv_);
env_.out() << endl << "Insertion Values = " << insertion_values << endl;
// TODO : retrieve the secondary structure !!
}
void MOIP::add_problem_constraints(const IloModel& model_)
{
// ensure there only is 0 or 1 pairing by nucleotide:
cout << "\t>ensuring there are 0 or 1 pairing by nucleotide..." << endl;
uint u, v;
uint n = rna_.get_RNA_length();
for (u = 0; u < n - 6; u++) {
IloExpr c1(env_);
for (v = 0; v < u; v++)
if (allowed_basepair(v, u)) c1 += y(v, u);
for (v = u + 4; v < n; v++)
if (allowed_basepair(u, v)) c1 += y(u, v);
model_.add(c1 <= 1);
// cout << "\t>It worked for base " << u << " : " << (c1 <= 1) << endl;
}
// forbid lonely basepairs
cout << "\t>forbidding lonely basepairs..." << endl;
for (u = 0; u < n - 6; u++) {
IloExpr c2(env_); // for the case where s[u] is paired to s[v], v>u
c2 += 1;
for (v = u; v < n; v++)
if (allowed_basepair(u - 1, v)) c2 += y(u - 1, v);
for (v = u + 1; v < n; v++)
if (allowed_basepair(u, v)) c2 -= y(u, v);
for (v = u + 2; v < n; v++)
if (allowed_basepair(u + 1, v)) c2 += y(u + 1, v);
model_.add(c2 >= 1);
// cout << "\t>It worked for base " << u << " : " << (c2 >= 1) << endl;
}
for (v = 5; v < n; v++) {
IloExpr c2p(env_); // for the case where s[u] is paired to s[v], v<u
c2p += 1;
for (u = 1; u <= v - 2; u++)
if (allowed_basepair(u, v - 1)) c2p += y(u, v - 1);
for (u = 1; u <= v - 1; u++)
if (allowed_basepair(u, v)) c2p -= y(u, v);
for (u = 1; u <= v; u++)
if (allowed_basepair(u, v + 1)) c2p += y(u, v + 1);
model_.add(c2p >= 1);
// cout << "\t>It worked for base " << u << " : " << (c2p >= 1) << endl;
}
// Forbid pairings inside every motif component if included
cout << "\t>forbidding basepairs inside included motif's components..." << endl;
for (size_t i = 0; i < insertion_sites_.size(); i++) {
Motif& x = insertion_sites_[i];
for (size_t j = 0; j < x.comp.size(); j++) {
Component& c = x.comp[j];
IloExpr c3(env_);
IloNum kxi = IloNum(c.k);
c3 += kxi * C(i, j);
for (u = c.pos.first; u < c.pos.second; u++) {
for (v = 0; v < n; v++)
if (allowed_basepair(u, v)) c3 += y(u, v);
}
model_.add(c3 <= kxi);
}
}
// To be continued ...
}
void MOIP::extend_pareto(double lambdaMin, double lambdaMax)
{
if (lambdaMin >= lambdaMax) {
cerr << "lambdaMax < lambdaMin, something's wrong !" << endl;
exit(EXIT_FAILURE);
}
// for any SecondaryStructure in pareto_ such that the value of the second
// objective is between lambdaMin and lambdaMax
// a DIFF() constraint and a mirror constraint is added
for (uint i = 0; i < pareto_.size(); i++) {
// DIFF()
if (
(abs(pareto_[i].get_objective_score(2) - lambdaMin) < PRECISION or pareto_[i].get_objective_score(2) > lambdaMin) and
(abs(pareto_[i].get_objective_score(2) - lambdaMax) < PRECISION or pareto_[i].get_objective_score(2) < lambdaMax)) {
// ip.add_bj_ct(pareto_[i]);
}
// mirror
// if (
// (abs(pareto_[i].get_obj2M_() - lambdaMin) < PRECISION or pareto_[i].get_obj2M_() > lambdaMin) and
// (abs(pareto_[i].get_obj2M_() - lambdaMax) < PRECISION or pareto_[i].get_obj2M_() < lambdaMax)) {
// ip.add_bj_ct_M(pareto_[i]);
// }
}
// SecondaryStructure s = solve_objective(1, lambdaMin, lambdaMax);
// if (is_undominated_yet(s)) {
// // adding the SecondaryStructure s to the set pareto_
// add_solution(s);
// // run localPareto above the SecondaryStructure s
// extend_pareto(s.get_objective_score(2), lambdaMax);
// }
}
size_t MOIP::get_yuv_index(size_t u, size_t v) const
{
size_t a, b;
a = (u < v) ? u : v;
b = (u > v) ? u : v;
return index_of_yuv_[a][b - 4 - a];
}
size_t MOIP::get_Cpxi_index(size_t x_i, size_t i_on_j) const { return index_of_Cxip_[x_i][i_on_j]; }
bool MOIP::allowed_basepair(size_t u, size_t v) const
{
size_t a, b;
a = (v > u) ? u : v;
b = (v > u) ? v : u;
if (b - a < 4) return false;
if (a >= rna_.get_RNA_length() - 6) return false;
if (b >= rna_.get_RNA_length()) return false;
return true;
}
\ No newline at end of file
#ifndef MOIP_H_
#define MOIP_H_
#define IL_STD
#include "SecondaryStructure.h"
#include "rna.h"
#include <ilcplex/ilocplex.h>
using std::vector;
const double PRECISION = 0.0001;
class MOIP
{
public:
static uint ncores;
typedef enum { MIN, MAX } DirType;
typedef enum { FR, LO, UP, DB, FX } BoundType;
MOIP(const RNA& rna, const vector<Motif>& motifSites);
~MOIP(void);
void solve_objective(int o, double min, double max);
uint get_n_solutions(void) const;
const SecondaryStructure& solution(uint i) const;
void extend_pareto(double lambdaMin, double lambdaMax);
bool allowed_basepair(size_t u, size_t v) const;
void add_solution(const SecondaryStructure& s);
private:
bool is_undominated_yet(const SecondaryStructure& s);
void add_problem_constraints(const IloModel& model_);
size_t get_yuv_index(size_t u, size_t v) const;
size_t get_Cpxi_index(size_t x_i, size_t i_on_j) const;
IloNumExprArg& y(size_t u, size_t v); // Direct reference to y^u_v in basepair_dv_
IloNumExprArg& C(size_t x, size_t i); // Direct reference to C_p^xi in insertion_dv_
RNA rna_; // RNA object
vector<Motif> insertion_sites_; // Potential Motif insertion sites
const float beta_; // beta parameter of the probability function
double lambdaMin_; // minimum threshold value for the probability value
double lambdaMax_; // maximum threshold value for the probability value
int vp_; // vp_ variable for penalization of the probability score
float theta_; // theta parameter for the probability function
IloEnv env_; // environment CPLEX object
IloNumVarArray basepair_dv_; // Decision variables
IloNumVarArray insertion_dv_; // Decision variables
vector<SecondaryStructure> pareto_; // Vector of results
vector<vector<size_t>> index_of_Cxip_; // Stores the indexes of the Cxip in insertion_dv_
vector<vector<size_t>> index_of_yuv_; // Stores the indexes of the y^u_v in basepair_dv_ in a complex way. Use get_yuv_index(u,v) to retrieve.
vector<size_t> index_of_first_components; // Stores the indexes of Cx1p in insertion_dv_
};
inline void MOIP::add_solution(const SecondaryStructure& s) { pareto_.push_back(s); }
inline uint MOIP::get_n_solutions(void) const { return pareto_.size(); }
inline const SecondaryStructure& MOIP::solution(uint i) const { return pareto_[i]; }
inline IloNumExprArg& MOIP::y(size_t u, size_t v) { return basepair_dv_[get_yuv_index(u, v)]; }
inline IloNumExprArg& MOIP::C(size_t x, size_t i) { return insertion_dv_[get_Cpxi_index(x, i)]; }
#endif // MOIP_H_
\ No newline at end of file
#include "SecondaryStructure.h"
#include <boost/format.hpp>
static const double PRECISION(0.0001);
SecondaryStructure::SecondaryStructure(const vector<double>& scores, const vector<bool>& decision_variables, VII coord, int RNAlength)
: objective_scores_(scores), dv_(decision_variables), coord_(coord), n_(RNAlength)
{
}
string SecondaryStructure::to_DBN(void) const
{
string res(n_, '.');
for (size_t i = 0; i < n_; i++) {
if (dv_[i]) {
res[coord_[i].first] = '(';
res[coord_[i].second] = ')';
}
}
return res;
}
string SecondaryStructure::to_string(void) const
{
return to_DBN() + "\t" + boost::str(boost::format("%.6f") % objective_scores_[0]) + "\t" +
boost::str(boost::format("%.6f") % objective_scores_[1]);
}
bool operator>(const SecondaryStructure& s1, const SecondaryStructure& s2)
{
double s11 = s1.get_objective_score(0);
double s12 = s1.get_objective_score(1);
double s21 = s2.get_objective_score(0);
double s22 = s2.get_objective_score(1);
bool obj1 = false, obj2 = false, strict1 = false, strict2 = false;
if (s11 > s21) {
strict1 = true;
obj1 = true;
} else if (abs(s11 - s21) < PRECISION) {
obj1 = true;
}
if (s12 > s22) {
strict2 = true;
obj2 = true;
} else if (abs(s12 - s22) < PRECISION) {
obj2 = true;
}
if (obj1 && obj2 && (strict1 || strict2)) {
return true;
}
return false;
}
bool operator<(const SecondaryStructure& s1, const SecondaryStructure& s2)
{
double s11 = s1.get_objective_score(0);
double s12 = s1.get_objective_score(1);
double s21 = s2.get_objective_score(0);
double s22 = s2.get_objective_score(1);
bool obj1 = false, obj2 = false, strict1 = false, strict2 = false;
if (s11 < s21) {
strict1 = true;
obj1 = true;
} else if (abs(s11 - s21) < PRECISION) {
obj1 = true;
}
if (s12 < s22) {
strict2 = true;
obj2 = true;
} else if (abs(s12 - s22) < PRECISION) {
obj2 = true;
}
if (obj1 && obj2 && (strict1 || strict2)) {
return true;
}
return false;
}
#ifndef __INC_IP_SOL__
#define __INC_IP_SOL__
#include "rna.h"
#include <string>
#include <vector>
using std::string;
using std::vector;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<std::pair<int, int>> VII;
class SecondaryStructure
{
public:
SecondaryStructure(void);
SecondaryStructure(const vector<double>& scores, const vector<bool>& decision_variables, VII coord, int RNAlength);
double get_objective_score(int i) const;
const vector<bool>& get_decision_variables() const;
bool get_decision_value(int i) const;
VII get_coord() const;
int get_RNA_length() const;
void set_objective_score(int i, double s);
string to_DBN() const;
string to_string() const;
private:
vector<double> objective_scores_; // values of the different objective functions for that SecondaryStructure
vector<bool> dv_; // values of the decision variable of the integer program
vector<Motif> motif_info_; // information about known motives in this secondary structure and their positions
VII coord_; // coordinates of the dv_. dv_[i] == true <==> coord_[i][0] paired to coord_[i][1];
size_t n_; // length of the RNA
};
// return if this SecondaryStructure s1 dominates s2
bool operator>(const SecondaryStructure& s1, const SecondaryStructure& s2);
// return if this SecondaryStructure s2 dominates s1
bool operator<(const SecondaryStructure& s1, const SecondaryStructure& s2);
inline double SecondaryStructure::get_objective_score(int i) const { return objective_scores_[i]; }
inline const vector<bool>& SecondaryStructure::get_decision_variables() const { return dv_; }
inline void SecondaryStructure::set_objective_score(int i, double s) { objective_scores_[i - 1] = s; }
inline VII SecondaryStructure::get_coord() const { return coord_; }
inline int SecondaryStructure::get_RNA_length() const { return n_; }
inline bool SecondaryStructure::get_decision_value(int i) const { return dv_[i]; }
#endif
/***
Biominserter
Louis Becquey, starting from Audrey Legendre's code
nov 2018
***/
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <string>
#include <thread>
#include <vector>
#include "MOIP.h"
#include "fa.h"
#include "nupack.h"
using namespace std;
Motif parse_csv_line(string line)
{
vector<string> tokens;
boost::split(tokens, line, boost::is_any_of(","));
Motif m;
m.atlas_id = tokens[0];
m.comp.push_back(Component(make_pair<int, int>(stoi(tokens[3]), stoi(tokens[4])), stoi(tokens[2])));
if (tokens[5] != "-")
m.comp.push_back(Component(make_pair<int, int>(stoi(tokens[5]), stoi(tokens[6])), stoi(tokens[2])));
m.reversed = (tokens[1] == "True");
return m;
}
int main(int argc, char* argv[])
{
// float time;
// clock_t t1, t2;
// t1 = clock();
MOIP::ncores = thread::hardware_concurrency() - 1;
if (argc != 3) {
cerr << argc << " arguments specified !" << endl;
cerr << "Please specify the following input files:" << endl;
cerr << "biominserter sequence.fasta insertion.sites.csv" << endl;
return EXIT_FAILURE;
}
const char* inputName = argv[1];
const char* csvname = argv[2];
cout << "Reading input files..." << endl;
if (access(inputName, F_OK) == -1) {
cerr << inputName << " not found" << endl;
return EXIT_FAILURE;
}
if (access(csvname, F_OK) == -1) {
cerr << csvname << " not found" << endl;
return EXIT_FAILURE;
}
// load fasta file
list<Fasta> f;
Fasta::load(f, inputName);
list<Fasta>::iterator fa = f.begin();
cout << "loading " << fa->name() << "..." << endl;
RNA myRNA = RNA(fa->name(), fa->seq());
cout << "\t>" << inputName << " successfuly loaded" << endl;
// load CSV file
string line;
ifstream motifs = ifstream(csvname);
getline(motifs, line); // skip header
vector<Motif> posInsertionSites;
while (getline(motifs, line)) {
posInsertionSites.push_back(parse_csv_line(line));
}
cout << "\t>" << csvname << " successfuly loaded" << endl;
// creating the Multi-Objective problem:
MOIP myMOIP = MOIP(myRNA, posInsertionSites); // using the constructor with arguments automatically defines the decision variables.
// finding the best SecondaryStructures for each objective
double max = myRNA.get_RNA_length();
try {
myMOIP.solve_objective(1, -max, max);
} catch (IloCplex::Exception& e) {
cerr << e << endl;
}
// SecondaryStructure bestSSO1 = myMOIP.solve_objective(1, -max, max);
// SecondaryStructure bestSSO2 = myMOIP.solve_objective(2, -max, max);
// double bestObj2 = bestSSO2.get_objective_score(2);
// extend to the whole pareto set
// myMOIP.add_solution(bestSSO1);
// myMOIP.extend_pareto(bestObj2, max);
// print the pareto set
// cout << "Structure \t Free energy score \t Expected accuracy score" << endl;
// for (uint i = 0; i < myMOIP.get_n_solutions(); i++) {
// cout << myMOIP.solution(i).to_string() << endl;
// }
// cout << endl;
return EXIT_SUCCESS;
}
/*
* $Id$
*
* Copyright (C) 2010 Kengo Sato
*
* doublehis file comes from IPknot.
*
*/
#ifndef __INC_DP_TABLE_H__
#define __INC_DP_TABLE_H__
class DPtable2
{
public:
DPtable2() : V_(), N_(0) {}
void resize(int n)
{
N_ = n;
V_.resize(N_ * (N_ + 1) / 2 + (N_ + 1));
}
void fill(const double& v) { std::fill(V_.begin(), V_.end(), v); }
double& operator()(int i, int j) { return V_[index(i, j)]; }
const double& operator()(int i, int j) const { return V_[index(i, j)]; }
private:
int index(int i, int j) const
{
assert(j <= N_);
return j == i - 1 ? N_ * (N_ + 1) / 2 + i : i * N_ + j - i * (1 + i) / 2;
}
std::vector<double> V_;
int N_;
};
class DPtable4
{
public:
DPtable4() : V_(), N_(0) {}
void resize(int n)
{
N_ = n;
V_.resize(N_ * (N_ - 1) * (N_ - 2) * (N_ - 3) / 2 / 3 / 4);
}
void fill(const double& v) { std::fill(V_.begin(), V_.end(), v); }
double& operator()(int i, int d, int e, int j) { return V_[index(i, d, e, j)]; }
const double& operator()(int i, int d, int e, int j) const { return V_[index(i, d, e, j)]; }
private:
int index(int h, int r, int m, int s) const
{
int n = N_;
int h2 = h * h;
int h3 = h2 * h;
int h4 = h3 * h;
int m2 = m * m;
int n2 = n * n;
int n3 = n2 * n;
int r2 = r * r;
int r3 = r2 * r;
assert(h <= r);
assert(r <= m);
assert(m <= s);
assert(s <= N_);
return (h == r && m == s) ? V_.size() - 1 :
(
-24 - 50 * h - 35 * h2 - 10 * h3 - h4 - 36 * m - 12 * m2 + 12 * n + 70 * h * n +
30 * h2 * n + 4 * h3 * n + 24 * m * n - 12 * n2 - 30 * h * n2 - 6 * h2 * n2 + 4 * h * n3 +
44 * r - 48 * n * r + 12 * n2 * r + 24 * r2 - 12 * n * r2 + 4 * r3 + 24 * s) /
24;
}
std::vector<double> V_;
int N_;
};
class DPtableX
{
public:
DPtableX() : V_(), N_(0), D_(0) {}
void resize(int d, int n)
{
N_ = n;
D_ = d;
int max_sz = 0;
for (int i = d; i < d + 3; ++i) max_sz = std::max(max_sz, (N_ - i) * (i - 5) * (i - 1) * (i - 2) / 2);
V_.resize(max_sz);
}
void fill(const double& v) { std::fill(V_.begin(), V_.end(), v); }
double& operator()(int i, int d, int e, int s) { return V_[index(i, d, e, s)]; }
const double& operator()(int i, int d, int e, int s) const { return V_[index(i, d, e, s)]; }
void swap(DPtableX& x)
{
std::swap(V_, x.V_);
std::swap(N_, x.N_);
std::swap(D_, x.D_);
}
private:
int index(int i, int h1, int m1, int s) const
{
int d = D_;
int d1d2 = (d - 1) * (d - 2);
int d5 = d - 5;
int h1_i_1 = h1 - i - 1;
assert(i + d < N_);
assert(d - 6 >= s);
assert(i < h1);
return i * d5 * d1d2 / 2 + s * d1d2 / 2 + h1_i_1 * (d - 1) - h1_i_1 * (h1 - i) / 2 + m1 - h1 - 1;
}
std::vector<double> V_;
int N_;
int D_;
};
#endif
/*
* $Id$
*
* Copyright (C) 2008-2010 Kengo Sato
*
* This file comes from Ipknot.
*/
#include "fa.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cctype>
#include <cstring>
#include <cassert>
typedef unsigned int uint;
//static
unsigned int Fasta::load(std::list<Fasta>& data, const char* file){
std::string line, name, seq, str;
std::ifstream ifs(file);
while (std::getline(ifs, line)) {
if (line[0]=='>') { // header
if (!name.empty()) {
assert(str.size()==0 || seq.size()==str.size());
data.push_back(Fasta(name, seq, str));
}
name=line.substr(1);
seq.clear();
str.clear();
continue;
}
if (std::strchr("()[].?xle ", line[0])==NULL) { // seq
uint i;
for (i=0; i!=line.size(); ++i)
if (!isalpha(line[i])) break;
seq+=line.substr(0, i);
} else {
uint i;
for (i=0; i!=line.size(); ++i)
if (std::strchr("()[].?xle ", line[i])==NULL) break;
str+=line.substr(0, i);
}
}
if (!name.empty())
data.push_back(Fasta(name, seq, str));
return data.size();
}
/*
* $Id$
*
* Copyright (C) 2008-2010 Kengo Sato
*
* This file comes from Ipknot.
*/
#include <list>
#include <string>
using std::list;
using std::string;
class Fasta
{
public:
Fasta() : name_(), seq_(), str_() {}
Fasta(const string& name, const string& seq, const string& str = "") : name_(name), seq_(seq), str_(str) {}
Fasta(const Fasta& fa) : name_(fa.name_), seq_(fa.seq_), str_(fa.str_) {}
Fasta& operator=(const Fasta& fa)
{
if (this != &fa) {
name_ = fa.name_;
seq_ = fa.seq_;
str_ = fa.str_;
}
return *this;
}
const string& name() const { return name_; }
const string& seq() const { return seq_; }
string& seq() { return seq_; }
const string& str() const { return str_; }
unsigned int size() const { return seq_.size(); }
static unsigned int load(list<Fasta>& data, const char* file);
private:
string name_;
string seq_;
string str_;
};
#include "nupack.h"
#include "rna1995.h"
#include <cassert>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <sstream>
enum { PAIR_AU = 0, PAIR_CG, PAIR_GC, PAIR_UA, PAIR_GU, PAIR_UG };
enum { BASE_N = 0, BASE_A, BASE_C, BASE_G, BASE_U };
enum { A = BASE_A - 1, C = BASE_C - 1, G = BASE_G - 1, U = BASE_U - 1 };
enum { AU = PAIR_AU, CG = PAIR_CG, GC = PAIR_GC, UA = PAIR_UA, GU = PAIR_GU, UG = PAIR_UG };
#define EXP expl
#define LOG logl
Nupack::Nupack()
: base_map('z' - 'a' + 1), pair_map(boost::extents[5][5]), RT(kB * (ZERO_C_IN_KELVIN + 37)), salt_correction(0),
loop_greater30(1.079 /*=1.75*RT*/), hairpin_GGG(0.0)
{
std::fill(base_map.begin(), base_map.end(), (int)BASE_N);
base_map['a' - 'a'] = BASE_A;
base_map['c' - 'a'] = BASE_C;
base_map['g' - 'a'] = BASE_G;
base_map['u' - 'a'] = BASE_U;
base_map['t' - 'a'] = BASE_U;
std::fill(pair_map.data(), pair_map.data() + pair_map.num_elements(), -1);
pair_map[BASE_A][BASE_U] = PAIR_AU;
pair_map[BASE_U][BASE_A] = PAIR_UA;
pair_map[BASE_C][BASE_G] = PAIR_CG;
pair_map[BASE_G][BASE_C] = PAIR_GC;
pair_map[BASE_G][BASE_U] = PAIR_GU;
pair_map[BASE_U][BASE_G] = PAIR_UG;
}
int Nupack::base(char x) const
{
if (x >= 'a' && x <= 'z')
return base_map[x - 'a'];
else if (x >= 'A' && x <= 'Z')
return base_map[x - 'A'];
else
return BASE_N;
}
int Nupack::pair_type(int i, int j) const { return pair_map[seq[i]][seq[j]]; }
int Nupack::pair_type(int i) const
{
// assume Watson-Crick pairs
switch (seq[i]) {
case BASE_A: return PAIR_AU; break;
case BASE_C: return PAIR_CG; break;
case BASE_G: return PAIR_GC; break;
case BASE_U: return PAIR_UA; break;
}
return -1;
}
bool Nupack::wc_pair(int i, int j) const { return pair_type(i, j) != PAIR_GU && pair_type(i, j) != PAIR_UG; }
bool Nupack::allow_paired(int i, int j) const { return j - i - 1 >= 3 && pair_type(i, j) >= 0; }
void Nupack::load_sequence(const string& s)
{
N = s.size();
seq.resize(N);
for (int i = 0; i != N; ++i) seq[i] = base(s[i]);
}
int check_stability_and_size(int k, int l, int o, int p)
// helper function, to detect which delta we need for the int22 parameters
{
// having at least one AC mismatch is the simplest, test first
if ((k == A && l == C) || (k == C && l == A) || (o == A && p == C) || (o == C && p == A)) return 4;
// combination of all mismatches of equal size (purine-purine, purine-pyrimidine, and pyrimidine-pyrimidine are
// different sizes) purine = A, G pyrimidine = C, U if all purine-purines
if ((k == A || k == G) && (l == A || l == G) && (o == A || o == G) && (p == A || p == G)) return 1;
// if all pyrimidine-pyrimidine
if ((k == C || k == U) && (l == C || l == U) && (o == C || o == U) && (p == C || p == U)) return 1;
// if both purine-pyrimidine
// assume the A-C pairs have been found above
if (
(((k == A || k == G) && (l == C || l == U)) || ((k == C || k == U) && (l == A || l == G))) &&
(((o == A || o == G) && (p == C || p == U)) || ((o == C || o == U) && (p == A || p == G))))
return 1;
// or any combination of 2 unstable mismatches except AC: AA, CC, CU, GG
if (
((k == A && l == A) || (k == C && l == C) || (k == C && l == U) || (k == U && l == C) || (k == G && l == G)) &&
((o == A && p == A) || (o == C && p == C) || (o == C && p == U) || (o == U && p == C) || (o == G && p == G)))
return 1;
// two stabilizing mismatches (GU, GA, UU) of different sizes (purine-purine, purine-pyrimidine, and pyrimidine-pyrimidine are different sizes)
if (
(((k == G && l == U) || (k == U && l == G)) && ((o == G && p == A) || (o == A && p == G) || (o == U && p == U))) ||
(((k == G && l == A) || (k == A && l == G)) && ((o == G && p == U) || (o == U && p == G) || (o == U && p == U))) ||
((k == U && l == U) && ((o == G && p == A) || (o == A && p == G) || (o == G && p == U) || (o == U && p == G))))
return 2;
// one stable (GU, GA, UU) and one unstable mismatch (excluding AC) (AA, CC, CU, GG) of different sizes
// GU
if (((k == G && l == U) || (k == U && l == G)) && ((o == A && p == A) || (o == C && p == C) || (o == C && p == U) || (o == U && p == C) || (o == G && p == G)))
return 3;
if (((o == G && p == U) || (o == U && p == G)) && ((k == A && l == A) || (k == C && l == C) || (k == C && l == U) || (k == U && l == C) || (k == G && l == G)))
return 3;
// GA
if (((k == G && l == A) || (k == A && l == G)) && ((o == C && p == C) || (o == C && p == U) || (o == U && p == C)))
return 3;
if (((o == G && p == A) || (o == A && p == G)) && ((k == C && l == C) || (k == C && l == U) || (k == U && l == C)))
return 3;
// UU
if ((k == U && l == U) && ((o == A && p == A) || (o == G && p == G))) return 3;
if ((o == U && p == U) && ((k == A && l == A) || (k == G && l == G))) return 3;
return -1;
}
bool Nupack::load_parameters(const char* file)
{
int p[] = {PAIR_AU, PAIR_CG, PAIR_GC, PAIR_UA, PAIR_GU, PAIR_UG};
int b[] = {BASE_A - 1, BASE_C - 1, BASE_G - 1, BASE_U - 1};
std::ifstream is(file);
if (!is) return false;
string line;
// stack
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
std::istringstream ss(line);
for (int j = 0; j != 6; ++j) {
int v;
ss >> v;
stack37[p[i]][p[j]] = v / 100.0;
}
std::getline(is, line);
}
// hairpin
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
{
int i, j, v;
std::istringstream ss(line);
for (i = 0; i < 30 && ss; ++i) {
ss >> v;
hairpin37[i] = v / 100.0;
}
for (j = i; j < 30; ++j) hairpin37[j] = hairpin37[i - 1] + loop_greater30 * LOG((j + 1) / (1.0 * i));
}
// bulge
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
{
int i, j, v;
std::istringstream ss(line);
for (i = 0; i < 30 && ss; ++i) {
ss >> v;
bulge37[i] = v / 100.0;
}
for (j = i; j < 30; ++j) bulge37[j] = bulge37[i - 1] + loop_greater30 * LOG((j + 1) / (1.0 * i));
}
// interior
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
{
int i, j, v;
std::istringstream ss(line);
for (i = 0; i < 30 && ss; ++i) {
ss >> v;
interior37[i] = v / 100.0;
}
for (j = i; j < 30; ++j) interior37[j] = interior37[i - 1] + loop_greater30 * LOG((j + 1) / (1.0 * i));
}
// asymmetry panelties
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
for (int i = 0; i < 4; ++i) {
ss >> v;
asymmetry_penalty[i] = v / 100.0;
}
ss >> v;
max_asymmetry = v / 100.0;
}
// triloops
// std::fill(triloop37.data(), triloop37.data()+triloop37.num_elements(), 0.0);
std::fill(&triloop37[0][0][0][0][0], &triloop37[0][0][0][0][0] + 4 * 4 * 4 * 4 * 4, 0.0);
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
while (line[0] != '>') {
int v;
char loop[256];
sscanf(line.c_str(), "%s %d", loop, &v);
vector<int> idx(5);
for (int i = 0; i != 5; ++i) idx[i] = base(loop[i]) - 1;
// triloop37(idx) = v/100.0;
triloop37[idx[0]][idx[1]][idx[2]][idx[3]][idx[4]] = v / 100.0;
std::getline(is, line);
}
// tloops
// std::fill(tloop37.data(), tloop37.data()+tloop37.num_elements(), 0.0);
std::fill(&tloop37[0][0][0][0][0][0], &tloop37[0][0][0][0][0][0] + 4 * 4 * 4 * 4 * 4 * 4, 0.0);
std::getline(is, line);
while (line[0] == '>') std::getline(is, line);
while (line[0] != '>') {
int v;
char loop[256];
sscanf(line.c_str(), "%s %d", loop, &v);
vector<int> idx(6);
for (int i = 0; i != 6; ++i) idx[i] = base(loop[i]) - 1;
// tloop37(idx) = v/100.0;
tloop37[idx[0]][idx[1]][idx[2]][idx[3]][idx[4]][idx[5]] = v / 100.0;
std::getline(is, line);
}
// mismatch hairpin
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 4; ++i) {
for (int j = 0; j != 4; ++j) {
std::istringstream ss(line);
for (int k = 0; k != 6; ++k) {
int v;
ss >> v;
mismatch_hairpin37[b[i]][b[j]][p[k]] = v / 100.0;
}
std::getline(is, line);
}
}
// mismatch interior
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 4; ++i) {
for (int j = 0; j != 4; ++j) {
std::istringstream ss(line);
for (int k = 0; k != 6; ++k) {
int v;
ss >> v;
mismatch_interior37[b[i]][b[j]][p[k]] = v / 100.0;
}
std::getline(is, line);
}
}
// dangle5
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
std::istringstream ss(line);
for (int j = 0; j != 4; ++j) {
int v;
ss >> v;
dangle5_37[p[i]][b[j]] = v / 100.0;
}
std::getline(is, line);
}
// dangle3
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
std::istringstream ss(line);
for (int j = 0; j != 4; ++j) {
int v;
ss >> v;
dangle3_37[p[i]][b[j]] = v / 100.0;
}
std::getline(is, line);
}
// multiloop penalties
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
ss >> v;
multiloop_penalty = v / 100.0;
ss >> v;
multiloop_paired_penalty = v / 100.0;
ss >> v;
multiloop_unpaired_penalty = v / 100.0;
std::getline(is, line);
}
// AT terminate penalties
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
ss >> v;
at_penalty = v / 100.0;
std::getline(is, line);
}
// interior loops 1x1
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
for (int j = 0; j != 6; ++j) {
std::getline(is, line); // header
for (int k = 0; k != 4; ++k) {
std::istringstream ss(line);
for (int l = 0; l != 4; ++l) {
int v;
ss >> v;
int11_37[p[i]][p[j]][b[k]][b[l]] = v / 100.0;
}
std::getline(is, line);
}
}
}
// interior loops 2x2
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
for (int j = 0; j != 6; ++j) {
for (int m = 0; m != 4; ++m) {
for (int n = 0; n != 4; ++n) {
std::getline(is, line); // header
for (int k = 0; k != 4; ++k) {
std::istringstream ss(line);
for (int l = 0; l != 4; ++l) {
int v;
ss >> v;
int22_37[p[i]][p[j]][b[m]][b[l]][b[n]][b[k]] = v / 100.0;
}
std::getline(is, line);
}
}
}
}
}
// interior loops 1x2
while (line[0] == '>') std::getline(is, line);
for (int i = 0; i != 6; ++i) {
for (int j = 0; j != 6; ++j) {
for (int m = 0; m != 4; ++m) {
std::getline(is, line); // header
for (int k = 0; k != 4; ++k) {
std::istringstream ss(line);
for (int l = 0; l != 4; ++l) {
int v;
ss >> v;
int21_37[p[i]][b[k]][b[m]][p[j]][b[l]] = v / 100.0;
}
std::getline(is, line);
}
}
}
}
// polyC hairpin parameters
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
ss >> v;
polyC_penalty = v / 100.0;
ss >> v;
polyC_slope = v / 100.0;
ss >> v;
polyC_int = v / 100.0;
std::getline(is, line);
}
// pseudoknot energy parameters
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
ss >> v;
pk_penalty = v / 100.0;
ss >> v;
pk_paired_penalty = v / 100.0;
ss >> v;
pk_unpaired_penalty = v / 100.0;
ss >> v;
pk_multiloop_penalty = v / 100.0;
ss >> v;
pk_pk_penalty = v / 100.0;
std::getline(is, line);
}
pk_band_penalty = 0.0;
pk_stack_span = 1.0;
pk_interior_span = 1.0;
multiloop_penalty_pk = multiloop_penalty;
multiloop_paired_penalty_pk = multiloop_paired_penalty;
multiloop_unpaired_penalty_pk = multiloop_unpaired_penalty;
// BIMOLECULAR TERM
while (line[0] == '>') std::getline(is, line);
{
int v;
std::istringstream ss(line);
ss >> v;
intermolecular_initiation = v / 100.0;
std::getline(is, line);
}
return true;
}
void Nupack::load_default_parameters()
{
int p[] = {PAIR_AU, PAIR_CG, PAIR_GC, PAIR_UA, PAIR_GU, PAIR_UG};
int b[] = {BASE_A - 1, BASE_C - 1, BASE_G - 1, BASE_U - 1};
const int* v = &thermo_params[0];
// stack
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j) stack37[p[i]][p[j]] = *(v++) / 100.0;
// hairpin
for (int i = 0; i < 30; ++i) hairpin37[i] = *(v++) / 100.0;
// bulge
for (int i = 0; i < 30; ++i) bulge37[i] = *(v++) / 100.0;
// interior
for (int i = 0; i < 30; ++i) interior37[i] = *(v++) / 100.0;
// asymmetry panelties
for (int i = 0; i < 4; ++i) asymmetry_penalty[i] = *(v++) / 100.0;
// mismatch hairpin
for (int i = 0; i != 4; ++i)
for (int j = 0; j != 4; ++j)
for (int k = 0; k != 6; ++k) mismatch_hairpin37[b[i]][b[j]][p[k]] = *(v++) / 100.0;
// mismatch interior
for (int i = 0; i != 4; ++i)
for (int j = 0; j != 4; ++j)
for (int k = 0; k != 6; ++k) mismatch_interior37[b[i]][b[j]][p[k]] = *(v++) / 100.0;
// dangle5
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 4; ++j) dangle5_37[p[i]][b[j]] = *(v++) / 100.0;
// dangle3
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 4; ++j) dangle3_37[p[i]][b[j]] = *(v++) / 100.0;
// multiloop penalties
multiloop_penalty = *(v++) / 100.0;
multiloop_paired_penalty = *(v++) / 100.0;
multiloop_unpaired_penalty = *(v++) / 100.0;
// AT terminate penalties
at_penalty = *(v++) / 100.0;
// interior loops 1x1
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l) int11_37[p[i]][p[j]][b[k]][b[l]] = *(v++) / 100.0;
// interior loops 2x2
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int m = 0; m != 4; ++m)
for (int n = 0; n != 4; ++n)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l) int22_37[p[i]][p[j]][b[m]][b[l]][b[n]][b[k]] = *(v++) / 100.0;
// interior loops 1x2
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int m = 0; m != 4; ++m)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l) int21_37[p[i]][b[k]][b[m]][p[j]][b[l]] = *(v++) / 100.0;
// polyC hairpin parameters
polyC_penalty = *(v++) / 100.0;
polyC_slope = *(v++) / 100.0;
polyC_int = *(v++) / 100.0;
// pseudoknot energy parameters
pk_penalty = *(v++) / 100.0;
pk_paired_penalty = *(v++) / 100.0;
pk_unpaired_penalty = *(v++) / 100.0;
pk_multiloop_penalty = *(v++) / 100.0;
pk_pk_penalty = *(v++) / 100.0;
pk_band_penalty = 0.0;
pk_stack_span = 1.0;
pk_interior_span = 1.0;
multiloop_penalty_pk = multiloop_penalty;
multiloop_paired_penalty_pk = multiloop_paired_penalty;
multiloop_unpaired_penalty_pk = multiloop_unpaired_penalty;
// BIMOLECULAR TERM
intermolecular_initiation = *(v++) / 100.0;
// triloops
// std::fill(triloop37.data(), triloop37.data()+triloop37.num_elements(), 0.0);
std::fill(&triloop37[0][0][0][0][0], &triloop37[0][0][0][0][0] + 4 * 4 * 4 * 4 * 4, 0.0);
for (int i = 0; triloops[i].s != NULL; ++i) {
int v = triloops[i].e;
const char* loop = triloops[i].s;
vector<int> idx(5);
for (int i = 0; i != 5; ++i) idx[i] = base(loop[i]) - 1;
// triloop37(idx) = v/100.0;
triloop37[idx[0]][idx[1]][idx[2]][idx[3]][idx[4]] = v / 100.0;
}
// tloops
// std::fill(tloop37.data(), tloop37.data()+tloop37.num_elements(), 0.0);
std::fill(&tloop37[0][0][0][0][0][0], &tloop37[0][0][0][0][0][0] + 4 * 4 * 4 * 4 * 4 * 4, 0.0);
for (int i = 0; tetraloops[i].s != NULL; ++i) {
int v = tetraloops[i].e;
const char* loop = tetraloops[i].s;
vector<int> idx(6);
for (int i = 0; i != 6; ++i) idx[i] = base(loop[i]) - 1;
// tloop37(idx) = v/100.0;
tloop37[idx[0]][idx[1]][idx[2]][idx[3]][idx[4]][idx[5]] = v / 100.0;
}
}
void Nupack::dump_parameters(std::ostream& os) const
{
// stack
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j) os << "stack37[" << i << "][" << j << "]=" << stack37[i][j] << std::endl;
// hairpin
for (int i = 0; i != 30; ++i) os << "hairpin37[" << i << "]=" << hairpin37[i] << std::endl;
// bulge
for (int i = 0; i != 30; ++i) os << "bulge37[" << i << "]=" << bulge37[i] << std::endl;
// interior
for (int i = 0; i != 30; ++i) os << "interior37[" << i << "]=" << interior37[i] << std::endl;
// asymmetry
for (int i = 0; i != 4; ++i) os << "asymmetry_penalty[" << i << "]=" << asymmetry_penalty[i] << std::endl;
os << "max_asymmetry=" << max_asymmetry << std::endl;
// triloops
for (int i0 = 0; i0 != 4; ++i0)
for (int i1 = 0; i1 != 4; ++i1)
for (int i2 = 0; i2 != 4; ++i2)
for (int i3 = 0; i3 != 4; ++i3)
for (int i4 = 0; i4 != 4; ++i4)
if (triloop37[i0][i1][i2][i3][i4] != 0.0)
os << "triloop37[" << i0 << "][" << i1 << "][" << i2 << "][" << i3 << "][" << i4
<< "]=" << triloop37[i0][i1][i2][i3][i4] << std::endl;
// tloops
for (int i0 = 0; i0 != 4; ++i0)
for (int i1 = 0; i1 != 4; ++i1)
for (int i2 = 0; i2 != 4; ++i2)
for (int i3 = 0; i3 != 4; ++i3)
for (int i4 = 0; i4 != 4; ++i4)
for (int i5 = 0; i5 != 4; ++i5)
if (tloop37[i0][i1][i2][i3][i4][i5] != 0.0)
os << "tloop37[" << i0 << "][" << i1 << "][" << i2 << "][" << i3 << "][" << i4 << "]["
<< i5 << "]=" << tloop37[i0][i1][i2][i3][i4][i5] << std::endl;
// mismatch hairpin
for (int i = 0; i != 4; ++i)
for (int j = 0; j != 4; ++j)
for (int k = 0; k != 6; ++k)
os << "mismatch_hairpin37[" << i << "][" << j << "][" << k << "]=" << mismatch_hairpin37[i][j][k] << std::endl;
// mismatch interior37
for (int i = 0; i != 4; ++i)
for (int j = 0; j != 4; ++j)
for (int k = 0; k != 6; ++k)
os << "mismatch_interior37[" << i << "][" << j << "][" << k << "]=" << mismatch_interior37[i][j][k] << std::endl;
// dangle5
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 4; ++j) os << "dangle5_37[" << i << "][" << j << "]=" << dangle5_37[i][j] << std::endl;
// dangle3
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 4; ++j) os << "dangle3_37[" << i << "][" << j << "]=" << dangle3_37[i][j] << std::endl;
// multiloop penalties
os << "multiloop_penalty=" << multiloop_penalty << std::endl
<< "multiloop_paired_penalty=" << multiloop_paired_penalty << std::endl
<< "multiloop_unpaired_penalty=" << multiloop_unpaired_penalty << std::endl;
// AT terminate penalties
os << "at_penalty=" << at_penalty << std::endl;
// interior loops 1x1
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l)
os << "int11_37[" << i << "][" << j << "][" << k << "][" << l << "]=" << int11_37[i][j][k][l] << std::endl;
// interior loops 2x2
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int m = 0; m != 4; ++m)
for (int n = 0; n != 4; ++n)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l)
os << "int22_37[" << i << "][" << j << "][" << m << "][" << l << "][" << n << "][" << k
<< "]=" << int22_37[i][j][m][l][n][k] << std::endl;
// interior loops 1x2
for (int i = 0; i != 6; ++i)
for (int j = 0; j != 6; ++j)
for (int m = 0; m != 4; ++m)
for (int k = 0; k != 4; ++k)
for (int l = 0; l != 4; ++l)
os << "int21_37[" << i << "][" << k << "][" << m << "][" << j << "][" << l
<< "]=" << int21_37[i][k][m][j][l] << std::endl;
// polyC hairpin parameters
os << "polyC_penalty=" << polyC_penalty << std::endl
<< "polyC_slope=" << polyC_slope << std::endl
<< "polyC_int=" << polyC_int << std::endl;
// pseudoknot energy parameters
os << "pk_penalty=" << pk_penalty << std::endl
<< "pk_paired_penalty=" << pk_paired_penalty << std::endl
<< "pk_unpaired_penalty=" << pk_unpaired_penalty << std::endl
<< "pk_multiloop_penalty=" << pk_multiloop_penalty << std::endl
<< "pk_pk_penalty=" << pk_pk_penalty << std::endl
<< "pk_band_penalty=" << pk_band_penalty << std::endl
<< "pk_stack_span=" << pk_stack_span << std::endl
<< "pk_interior_span=" << pk_interior_span << std::endl
<< "multiloop_penalty_pk=" << multiloop_penalty_pk << std::endl
<< "multiloop_paired_penalty_pk=" << multiloop_paired_penalty_pk << std::endl
<< "multiloop_unpaired_penalty_pk" << multiloop_unpaired_penalty_pk << std::endl;
// BIMOLECULAR TERM
os << "intermolecular_initiation=" << intermolecular_initiation << std::endl;
// misc
os << "loop_greater30=" << loop_greater30 << std::endl << "hairpin_GGG=" << hairpin_GGG << std::endl;
}
float Nupack::calculate_partition_function()
{
Q.resize(N);
Q.fill(0.0);
Qb.resize(N);
Qb.fill(0.0);
Qm.resize(N);
Qm.fill(0.0);
Qp.resize(N);
Qp.fill(0.0);
Qz.resize(N);
Qz.fill(0.0);
std::cout << "ça passe 5!" << std::endl;
Qg.resize(N);
std::cout << "ah tiens." << std::endl;
Qg.fill(0.0);
std::cout << "ça passe 6!" << std::endl;
Qgl.resize(N);
Qgl.fill(0.0);
Qgr.resize(N);
Qgr.fill(0.0);
Qgls.resize(N);
Qgls.fill(0.0);
Qgrs.resize(N);
Qgrs.fill(0.0);
for (int i = 0; i != N; ++i) Q(i, i - 1) = Qz(i, i - 1) = 1.0;
DPtableX Qx, Qx1, Qx2;
for (int l = 1; l <= N; ++l) {
Qx.swap(Qx1);
Qx1.swap(Qx2);
Qx2.resize(l + 1, N);
Qx2.fill(0.0);
for (int i = 0; i + l <= N; ++i) {
int j = i + l - 1;
// Qb recursion
if (allow_paired(i, j)) {
Qb(i, j) = EXP(-score_hairpin(i, j) / RT);
for (int d = i + 1; d <= j - 5; ++d) // all possible rightmost pairs d-e
{
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
Qb(i, j) += Qb(d, e) * EXP(-score_interior(i, d, e, j, false) / RT);
if (d >= i + 6 && wc_pair(d, e) && wc_pair(i, j)) {
Qb(i, j) += Qm(i + 1, d - 1) * Qb(d, e) *
EXP(
-(
score_multiloop(false) + score_multiloop_paired(2, false) +
score_multiloop_unpaired(j - e - 1, false) + score_at_penalty(i, j) +
score_at_penalty(d, e) + score_dangle(e + 1, j - 1)) /
RT);
}
}
}
}
if (wc_pair(i, j)) {
for (int d = i + 1; d <= j - 6; ++d) // all possible rightmost pseudoknots filling [d,e]
{
for (int e = d + 5; e <= j - 1; ++e) {
Qb(i, j) +=
Qp(d, e) * EXP(
-(
score_multiloop(false) + score_pk_multiloop() + score_multiloop_paired(3, false) +
score_multiloop_unpaired(j - e - 1 + d - i - 1, false) + score_at_penalty(i, j) +
score_dangle(e + 1, j - 1) + score_dangle(i + 1, d - 1)) /
RT);
Qb(i, j) +=
Qm(i + 1, d - 1) * Qp(d, e) *
EXP(
-(
score_multiloop(false) + score_pk_multiloop() + score_multiloop_paired(3, false) +
score_multiloop_unpaired(j - e - 1, false) + score_at_penalty(i, j) + score_dangle(e + 1, j - 1)) /
RT);
}
}
}
}
// Qg recursion
if (allow_paired(i, j)) {
// case 0: only 1 pair
Qg(i, i, j, j) = 1;
// case 1: terminal inner pair
for (int d = i + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) Qg(i, d, e, j) += EXP(-score_interior(i, d, e, j, true) / RT);
}
}
}
fastiloops(i, j, Qg, Qx, Qx2);
if (allow_paired(i, j) && wc_pair(i, j)) {
// case 2: multiloop left
for (int d = i + 6; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e) && wc_pair(d, e)) {
Qg(i, d, e, j) +=
Qm(i + 1, d - 1) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(2, true) + score_multiloop_unpaired(j - e - 1, true) +
score_at_penalty(i, j) + score_at_penalty(d, e) + score_dangle(e + 1, j - 1)) /
RT);
}
}
}
// case 3: multiloop right
for (int d = i + 1; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e) && wc_pair(d, e)) {
Qg(i, d, e, j) +=
Qm(e + 1, j - 1) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(2, true) + score_multiloop_unpaired(d - i - 1, true) +
score_at_penalty(i, j) + score_at_penalty(d, e) + score_dangle(i + 1, d - 1)) /
RT);
}
}
}
// case 4: multiloop both sides
for (int d = i + 6; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e) && wc_pair(d, e)) {
Qg(i, d, e, j) +=
Qm(i + 1, d - 1) * Qm(e + 1, j - 1) *
EXP(-(score_multiloop(true) + score_multiloop_paired(2, true) + score_at_penalty(i, j) + score_at_penalty(d, e)) / RT);
}
}
}
// case 5: interior loop + multi left
for (int d = i + 7; d <= j - 6; ++d) {
for (int e = d + 4; e <= j - 2; ++e) {
if (allow_paired(d, e)) {
for (int f = e + 1; f <= j - 1; ++f) {
Qg(i, d, e, j) +=
Qgls(i + 1, d, e, f) * EXP(
-(
score_multiloop(true) + score_multiloop_paired(1, true) +
score_multiloop_unpaired(j - f - 1, true) +
score_at_penalty(i, j) + score_dangle(f + 1, j - 1)) /
RT);
}
}
}
}
// case 6: interior loop + multi right
for (int d = i + 2; d <= j - 11; ++d) {
for (int e = d + 4; e <= j - 7; ++e) {
if (allow_paired(d, e)) {
for (int c = i + 1; c <= d - 1; ++c) {
Qg(i, d, e, j) +=
Qgrs(c, d, e, j - 1) * EXP(
-(
score_multiloop(true) + score_multiloop_paired(1, true) +
score_multiloop_unpaired(c - i - 1, true) +
score_at_penalty(i, j) + score_dangle(i + 1, c - 1)) /
RT);
}
}
}
}
// case 7: interior loop + multi both sides
for (int d = i + 7; d <= j - 11; ++d) {
for (int e = d + 4; e <= j - 7; ++e) {
if (allow_paired(d, e)) {
for (int c = i + 6; c <= d - 1; ++c) {
Qg(i, d, e, j) +=
Qm(i + 1, c - 1) * Qgrs(c, d, e, j - 1) *
EXP(-(score_multiloop(true) + score_multiloop_paired(1, true) + score_at_penalty(i, j)) / RT);
}
}
}
}
}
// Qgls recursion
for (int c = i + 5; c <= j - 6; ++c) {
if (allow_paired(c, j) && wc_pair(c, j)) {
for (int d = c + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
Qgls(i, d, e, j) += Qm(i, c - 1) * Qg(c, d, e, j) *
EXP(-(score_multiloop_paired(1, true) + score_at_penalty(c, j)) / RT);
}
}
}
}
}
// Qgrs recursion
for (int d = i + 1; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e)) {
for (int f = e + 1; f <= j - 5; ++f) {
if (allow_paired(i, f) && wc_pair(i, f)) {
Qgrs(i, d, e, j) += Qg(i, d, e, f) * Qm(f + 1, j) *
EXP(-(score_multiloop_paired(1, true) + score_at_penalty(i, f)) / RT);
}
}
}
}
}
// Qgl recursions
for (int d = i + 1; d <= j - 5; ++d) {
for (int f = d + 4; f <= j - 1; ++f) {
if (allow_paired(d, f) && wc_pair(d, f)) {
for (int e = d; e <= f - 2; ++e) // f-3???
{
Qgl(i, e, f, j) +=
Qg(i, d, f, j) * Qz(d + 1, e) * EXP(-(score_pk_paired(1) + score_at_penalty(d, f)) / RT);
}
}
}
}
// Qgr recursion
for (int d = i + 1; d <= j - 3; ++d) {
for (int e = d + 2; e <= j - 1; ++e) {
for (int f = e; f <= j - 1; ++f) {
Qgr(i, d, e, j) += Qgl(i, d, f, j) * Qz(e, f - 1);
}
}
}
// Qp recursion
// case 1: both Qg are exactly 1 pair
// first case is exactly 1 pair per Og
if (j - i > 4) {
int a = i;
int f = j;
for (int b = a + 1; b <= j - 4; ++b) {
if (allow_paired(b, j) && wc_pair(b, j)) {
int c = b;
for (int d = std::max(c + 1, a + 4); d <= j - 1; ++d) {
if (allow_paired(a, d) && wc_pair(a, d)) {
int e = d;
Qp(i, j) += Qg(i, a, d, e) * Qg(b, c, f, j) * Qz(e + 1, f - 1) * Qz(c + 1, d - 1) *
Qz(a + 1, b - 1) *
EXP(
-(
score_pk_paired(2) + score_pk_band(2) + score_at_penalty(a, d) +
score_at_penalty(c, f) + score_at_penalty(i, e) + score_at_penalty(b, j)) /
RT);
}
}
}
}
}
if (j - i > 6) {
// case 2 left Og is exactly 1 pair, right is 2+
for (int d = i + 1; d <= j - 6; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 2, i + 4); e <= j - 2; ++e) {
int f = e;
if (allow_paired(i, f) && wc_pair(i, f)) {
Qp(i, j) +=
Qg(i, i, e, f) * Qz(i + 1, d - 1) * Qgr(d, e - 1, f + 1, j) *
EXP(-(score_pk_paired(1) + score_pk_band(2) + score_at_penalty(d, j) + score_at_penalty(i, f) * 2) / RT);
}
}
}
}
// case 2 left Qg is 2+ pairs, right is 1
for (int d = i + 2; d <= j - 4; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 1, i + 4); e <= j - 2; ++e) {
for (int f = e + 1; f <= j - 1; ++f) {
if (allow_paired(i, f) && wc_pair(i, f)) {
Qp(i, j) +=
Qgl(i, d - 1, e, f) * Qg(d, d, j, j) * Qz(d + 1, e - 1) * Qz(f + 1, j - 1) *
EXP(-(score_pk_paired(1) + score_pk_band(2) + score_at_penalty(d, j) * 2 + score_at_penalty(i, f)) / RT);
}
}
}
}
}
}
// otherwise
if (j - i > 7) {
for (int d = i + 2; d <= j - 4; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 2, i + 5); e <= j - 3; ++e) {
for (int f = e + 1; f <= j - 2; ++f) {
if (allow_paired(i, f) && wc_pair(i, f)) {
Qp(i, j) += Qgl(i, d - 1, e, f) * Qgr(d, e - 1, f + 1, j) *
EXP(-(score_pk_band(2) + score_at_penalty(d, j) + score_at_penalty(i, j)) / RT);
}
}
}
}
}
}
// Q, Qm, Qz recursions
Q(i, j) = EXP(-score_dangle(i, j) / RT); // empty recursion
if (i != 0 && j != N - 1) {
Qz(i, j) = EXP(-(score_dangle(i, j) + score_pk_unpaired(j - i + 1)) / RT);
}
for (int d = i; d <= j - 4; ++d) {
for (int e = d + 4; e <= j; ++e) {
if (allow_paired(d, e) && wc_pair(d, e)) {
Q(i, j) += Q(i, d - 1) * Qb(d, e) * EXP(-(score_at_penalty(d, e) + score_dangle(e + 1, j)) / RT);
if (i != 0 && j != N - 1) {
Qm(i, j) +=
Qb(d, e) * EXP(
-(
score_multiloop_paired(1, false) + score_multiloop_unpaired(d - i + j - e, false) +
score_at_penalty(d, e) + score_dangle(e + 1, j) + score_dangle(i, d - 1)) /
RT);
if (d >= i + 5) {
Qm(i, j) += Qm(i, d - 1) * Qb(d, e) *
EXP(
-(
score_multiloop_paired(1, false) + score_multiloop_unpaired(j - e, false) +
score_at_penalty(d, e) + score_dangle(e + 1, j)) /
RT);
}
Qz(i, j) +=
Qz(i, d - 1) * Qb(d, e) *
EXP(-(score_pk_paired(1) + score_pk_unpaired(j - e) + score_at_penalty(d, e) + score_dangle(e + 1, j)) / RT);
}
}
}
}
for (int d = i; d <= j - 5; ++d) {
for (int e = d + 5; e <= j; ++e) {
Q(i, j) += Q(i, d - 1) * Qp(d, e) * EXP(-(score_pk() + score_dangle(e + 1, j)) / RT);
if (i != 0 && j != N - 1) {
Qm(i, j) += Qp(d, e) * EXP(
-(
score_pk_multiloop() + score_multiloop_paired(2, false) +
score_multiloop_unpaired(d - i + j - e, false) + score_dangle(e + 1, j) +
score_dangle(i, d - 1)) /
RT);
if (d >= i + 5) {
Qm(i, j) += Qm(i, d - 1) * Qp(d, e) *
EXP(
-(
score_pk_multiloop() + score_multiloop_paired(2, false) +
score_multiloop_unpaired(j - e, false) + score_dangle(e + 1, j)) /
RT);
}
Qz(i, j) +=
Qz(i, d - 1) * Qp(d, e) *
EXP(-(score_pk_pk() + score_pk_paired(2) + score_pk_unpaired(j - e) + score_dangle(e + 1, j)) / RT);
}
}
}
// printf("%d,%d: %Lf\n", i, j, Q(i,j));
}
}
return Q(0, N - 1);
}
void Nupack::fastiloops(int i, int j, DPtable4& Qg, DPtableX& Qx, DPtableX& Qx2)
{
int l = j - i + 1;
if (l >= 17) // smallest subsequence not added to Qg as special case
{
for (int d = i + 6; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e)) {
int l1 = 4; // explicitly add in terms for l1=4, l2>=4
int c = i + l1 + 1;
for (int l2 = 4; l2 <= j - e - 2; ++l2) {
int s = l1 + l2;
int f = j - l2 - 1;
if (allow_paired(c, f)) {
Qx(i, d, e, s) +=
Qg(c, d, e, f) *
EXP(-(score_interior_asymmetry(l1, l2) + score_interior_mismatch(f, c, f + 1, c - 1)) / RT);
}
}
if (d >= i + 7) {
int l2 = 4; // explicitly add in terms of l1>=5, l2=4
int f = j - l2 - 1;
for (int l1 = 5; l1 <= d - i - 2; ++l1) {
int s = l1 + l2;
int c = i + l1 + 1;
if (allow_paired(c, f)) {
Qx(i, d, e, s) +=
Qg(c, d, e, f) *
EXP(-(score_interior_asymmetry(l1, l2) + score_interior_mismatch(f, c, f + 1, c - 1)) / RT);
}
}
}
}
}
}
}
for (int d = i + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
// convert Qx into interior loop energies
if (l >= 17 && allow_paired(i, j)) {
for (int s = 8; s <= l - 9; ++s) {
Qg(i, d, e, j) += Qx(i, d, e, s) * EXP(-score_interior_mismatch(i, j, i + 1, j - 1) / RT);
}
}
// extend loops for future use
if (i != 0 && j != N - 1) {
for (int s = 8; s <= l - 9; ++s) {
Qx2(i - 1, d, e, s + 2) = Qx(i, d, e, s) * EXP(-(score_loop(s + 2) - score_loop(s)) / RT);
}
}
if (allow_paired(i, j)) {
// Add small inextensible interior loops to Qg as special cases
for (int l1 = 0; l1 <= std::min(3, d - i - 2); ++l1) {
int c = i + l1 + 1;
for (int l2 = 0; l2 <= std::min(3, j - e - 2); ++l2) {
int f = j - l2 - 1;
if (allow_paired(c, f)) {
Qg(i, d, e, j) += Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT);
}
}
}
// Add bulge loops and large asymmetric loops as special cases
for (int l1 = 0; l1 <= std::min(3, d - i - 2); ++l1) // cases l1=0,1,2,3, l2>=4
{
int c = i + l1 + 1;
for (int l2 = 4; l2 <= j - e - 2; ++l2) {
int f = j - l2 - 1;
if (allow_paired(c, f)) {
Qg(i, d, e, j) += Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT);
}
}
}
for (int l2 = 0; l2 <= std::min(3, j - e - 2); ++l2) {
int f = j - l2 - 1;
for (int l1 = 4; l1 <= d - i - 2; ++l1) {
int c = i + l1 + 1;
if (allow_paired(c, f)) {
Qg(i, d, e, j) += Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT);
}
}
}
}
}
}
}
}
void Nupack::calculate_posterior()
{
// std::cout << "calculate_posterior_nupack\n";
P.resize(N);
P.fill(0.0);
Pb.resize(N);
Pb.fill(0.0);
Pm.resize(N);
Pm.fill(0.0);
Pp.resize(N);
Pp.fill(0.0);
Pz.resize(N);
Pz.fill(0.0);
Pbg.resize(N);
Pbg.fill(0.0);
Pg.resize(N);
Pg.fill(0.0);
Pgl.resize(N);
Pgl.fill(0.0);
Pgr.resize(N);
Pgr.fill(0.0);
Pgls.resize(N);
Pgls.fill(0.0);
Pgrs.resize(N);
Pgrs.fill(0.0);
P(0, N - 1) = 1.0;
DPtableX Qx, Qx1, Qx2;
Qx.resize(N, N);
Qx1.resize(N - 1, N);
Qx2.resize(N - 2, N);
DPtableX Px, Px1, Px2;
Px.resize(N, N);
Px1.resize(N - 1, N);
Px2.resize(N - 2, N);
for (int l = N; l >= 1; --l) {
Qx.swap(Qx1);
Qx1.swap(Qx2);
Qx2.resize(l - 3, N);
Qx2.fill(0.0);
Px.swap(Px1);
Px1.swap(Px2);
Px2.resize(l - 3, N);
Px2.fill(0.0);
for (int i = 0; i + l <= N; ++i) {
int j = i + l - 1;
// P, Pm, Pz recursions
for (int d = i; d <= j - 4; ++d) {
for (int e = d + 4; e <= j; ++e) {
if (allow_paired(d, e) && wc_pair(d, e)) {
if (P(i, j) > 0.0) {
float p = Q(i, d - 1) * Qb(d, e) *
EXP(-(score_at_penalty(d, e) + score_dangle(e + 1, j)) / RT) / Q(i, j) * P(i, j);
P(i, d - 1) += p;
Pb(d, e) += p;
assert(!std::isnan(p));
}
if (i != 0 && j != N - 1) {
if (Pm(i, j) > 0.0) {
float p = Qb(d, e) *
EXP(
-(
score_multiloop_paired(1, false) + score_multiloop_unpaired(d - i + j - e, false) +
score_at_penalty(d, e) + score_dangle(e + 1, j) + score_dangle(i, d - 1)) /
RT) /
Qm(i, j) * Pm(i, j);
Pb(d, e) += p;
if (d >= i + 5) {
p = Qm(i, d - 1) * Qb(d, e) *
EXP(
-(
score_multiloop_paired(1, false) + score_multiloop_unpaired(j - e, false) +
score_at_penalty(d, e) + score_dangle(e + 1, j)) /
RT) /
Qm(i, j) * Pm(i, j);
Pm(i, d - 1) += p;
Pb(d, e) += p;
assert(!std::isnan(p));
}
}
if (Pz(i, j) > 0.0) {
float p =
Qz(i, d - 1) * Qb(d, e) *
EXP(-(score_pk_paired(1) + score_pk_unpaired(j - e) + score_at_penalty(d, e) + score_dangle(e + 1, j)) / RT) /
Qz(i, j) * Pz(i, j);
Pz(i, d - 1) += p;
Pb(d, e) += p;
assert(!std::isnan(p));
}
}
}
}
}
for (int d = i; d <= j - 5; ++d) {
for (int e = d + 5; e <= j; ++e) {
if (P(i, j) > 0.0) {
float p =
Q(i, d - 1) * Qp(d, e) * EXP(-(score_pk() + score_dangle(e + 1, j)) / RT) / Q(i, j) * P(i, j);
P(i, d - 1) += p;
Pp(d, e) += p;
assert(!std::isnan(p));
}
if (i != 0 && j != N - 1) {
if (Pm(i, j) > 0.0) {
float p =
Qp(d, e) *
EXP(
-(
score_pk_multiloop() + score_multiloop_paired(2, false) +
score_multiloop_unpaired(d - i + j - e, false) + score_dangle(e + 1, j) + score_dangle(i, d - 1)) /
RT) /
Qm(i, j) * Pm(i, j);
Pp(d, e) += p;
assert(!std::isnan(p));
if (d >= i + 5) {
p = Qm(i, d - 1) * Qp(d, e) *
EXP(
-(
score_pk_multiloop() + score_multiloop_paired(2, false) +
score_multiloop_unpaired(j - e, false) + score_dangle(e + 1, j)) /
RT) /
Qm(i, j) * Pm(i, j);
Pm(i, d - 1) += p;
Pp(d, e) += p;
assert(!std::isnan(p));
}
}
if (Pz(i, j) > 0.0) {
float p =
Qz(i, d - 1) * Qp(d, e) *
EXP(-(score_pk_pk() + score_pk_paired(2) + score_pk_unpaired(j - e) + score_dangle(e + 1, j)) / RT) /
Qz(i, j) * Pz(i, j);
Pz(i, d - 1) += p;
Pp(d, e) += p;
assert(!std::isnan(p));
}
}
}
}
// Pp recursion
// case 1: both Qg are exactly 1 pair
// first case is exactly 1 pair per Og
if (j - i > 4) {
int a = i;
int f = j;
for (int b = a + 1; b <= j - 4; ++b) {
if (allow_paired(b, j) && wc_pair(b, j)) {
int c = b;
for (int d = std::max(c + 1, a + 4); d <= j - 1; ++d) {
if (allow_paired(a, d) && wc_pair(a, d) && Pp(i, j) > 0.0) {
int e = d;
float p = Qg(i, a, d, e) * Qg(b, c, f, j) * Qz(e + 1, f - 1) * Qz(c + 1, d - 1) *
Qz(a + 1, b - 1) *
EXP(
-(
score_pk_paired(2) + score_at_penalty(a, d) + score_at_penalty(c, f) +
score_at_penalty(i, e) + score_at_penalty(b, j)) /
RT) /
Qp(i, j) * Pp(i, j);
Pg(i, a, d, e) += p;
Pg(b, c, f, j) += p;
Pz(e + 1, f - 1) += p;
Pz(c + 1, d - 1) += p;
Pz(a + 1, b - 1) += p;
assert(!std::isnan(p));
}
}
}
}
}
if (j - i > 6) {
// case 2 left Og is exactly 1 pair, right is 2+
for (int d = i + 1; d <= j - 6; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 2, i + 4); e <= j - 2; ++e) {
int f = e;
if (allow_paired(i, f) && wc_pair(i, f) && Pp(i, j) > 0.0) {
float p = Qg(i, i, e, f) * Qz(i + 1, d - 1) * Qgr(d, e - 1, f + 1, j) *
EXP(-(score_pk_paired(1) + score_at_penalty(d, j) + score_at_penalty(i, f) * 2) / RT) /
Qp(i, j) * Pp(i, j);
Pg(i, i, e, f) += p;
Pz(i + 1, d - 1) += p;
Pgr(d, e - 1, f + 1, j) += p;
assert(!std::isnan(p));
}
}
}
}
// case 2 left Qg is 2+ pairs, right is 1
for (int d = i + 2; d <= j - 4; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 1, i + 4); e <= j - 2; ++e) {
for (int f = e + 1; f <= j - 1; ++f) {
if (allow_paired(i, f) && wc_pair(i, f) && Pp(i, j) > 0.0) {
float p =
Qgl(i, d - 1, e, f) * Qg(d, d, j, j) * Qz(d + 1, e - 1) * Qz(f + 1, j - 1) *
EXP(-(score_pk_paired(1) + score_at_penalty(d, j) * 2 + score_at_penalty(i, f)) / RT) /
Qp(i, j) * Pp(i, j);
Pgl(i, d - 1, e, f) += p;
Pg(d, d, j, j) += p;
Pz(d + 1, e - 1) += p;
Pz(f + 1, j - 1) += p;
assert(!std::isnan(p));
}
}
}
}
}
}
// otherwise
if (j - i > 7) {
for (int d = i + 2; d <= j - 4; ++d) {
if (allow_paired(d, j) && wc_pair(d, j)) {
for (int e = std::max(d + 2, i + 5); e <= j - 3; ++e) {
for (int f = e + 1; f <= j - 2; ++f) {
if (allow_paired(i, f) && wc_pair(i, f) && Pp(i, j) > 0.0) {
float p = Qgl(i, d - 1, e, f) * Qgr(d, e - 1, f + 1, j) *
EXP(-(score_at_penalty(d, j) + score_at_penalty(i, j)) / RT) / Qp(i, j) *
Pp(i, j);
Pgl(i, d - 1, e, f) += p;
Pgr(d, e - 1, f + 1, j) += p;
assert(!std::isnan(p));
}
}
}
}
}
}
// Pgr recursion
for (int d = i + 1; d <= j - 3; ++d) {
for (int e = d + 2; e <= j - 1; ++e) {
for (int f = e; f <= j - 1; ++f) {
if (Pgr(i, d, e, j) > 0.0) {
float p = Qgl(i, d, f, j) * Qz(e, f - 1) / Qgr(i, d, e, j) * Pgr(i, d, e, j);
Pgl(i, d, f, j) += p;
Pz(e, f - 1) += p;
assert(!std::isnan(p));
}
}
}
}
// Pgl recursions
for (int d = i + 1; d <= j - 5; ++d) {
for (int f = d + 4; f <= j - 1; ++f) {
if (allow_paired(d, f) && wc_pair(d, f)) {
for (int e = d; e <= f - 2; ++e) // f-3???
{
if (Pgl(i, e, f, j) > 0.0) {
float p = Qg(i, d, f, j) * Qz(d + 1, e) *
EXP(-(score_pk_paired(1) + score_at_penalty(d, f)) / RT) / Qgl(i, e, f, j) *
Pgl(i, e, f, j);
Pg(i, d, f, j) += p;
Pz(d + 1, e) += p;
Pbg(d, f) += p; // Pbg inner gap-spanning base-pairing prob
assert(!std::isnan(p));
}
}
}
}
}
// Pgrs recursion
for (int d = i + 1; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e)) {
for (int f = e + 1; f <= j - 5; ++f) {
if (allow_paired(i, f) && wc_pair(i, f) && Pgrs(i, d, e, j) > 0.0) {
float p = Qg(i, d, e, f) * Qm(f + 1, j) *
EXP(-(score_multiloop_paired(1, true) + score_at_penalty(i, f)) / RT) /
Qgrs(i, d, e, j) * Pgrs(i, d, e, j);
Pg(i, d, e, f) += p;
Pm(f + 1, j) += p;
assert(!std::isnan(p));
}
}
}
}
}
// Pgls recursion
for (int c = i + 5; c <= j - 6; ++c) {
if (allow_paired(c, j) && wc_pair(c, j)) {
for (int d = c + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e) && Pgls(i, d, e, j) > 0.0) {
float p = Qm(i, c - 1) * Qg(c, d, e, j) *
EXP(-(score_multiloop_paired(1, true) + score_at_penalty(c, j)) / RT) /
Qgls(i, d, e, j) * Pgls(i, d, e, j);
Pm(i, c - 1) += p;
Pg(c, d, e, j) += p;
assert(!std::isnan(p));
}
}
}
}
}
// Pg recursion
fastiloops_pr(i, j, Qg, Qx, Qx2, Pg, Px, Px2);
if (allow_paired(i, j) && wc_pair(i, j)) {
// case 2: multiloop left
for (int d = i + 6; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e) && wc_pair(d, e) && Pg(i, d, e, j) > 0.0) {
float p =
Qm(i + 1, d - 1) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(2, true) + score_multiloop_unpaired(j - e - 1, true) +
score_at_penalty(i, j) + score_at_penalty(d, e) + score_dangle(e + 1, j - 1)) /
RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pm(i + 1, d - 1) += p;
assert(!std::isnan(p));
}
}
}
// case 3: multiloop right
for (int d = i + 1; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e) && wc_pair(d, e) && Pg(i, d, e, j) > 0.0) {
float p =
Qm(e + 1, j - 1) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(2, true) + score_multiloop_unpaired(d - i - 1, true) +
score_at_penalty(i, j) + score_at_penalty(d, e) + score_dangle(i + 1, d - 1)) /
RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pm(e + 1, j - 1) += p;
assert(!std::isnan(p));
}
}
}
// case 4: multiloop both sides
for (int d = i + 6; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e) && wc_pair(d, e) && Pg(i, d, e, j) > 0.0) {
float p =
Qm(i + 1, d - 1) * Qm(e + 1, j - 1) *
EXP(-(score_multiloop(true) + score_multiloop_paired(2, true) + score_at_penalty(i, j) + score_at_penalty(d, e)) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pm(i + 1, d - 1) += p;
Pm(e + 1, j - 1) += p;
assert(!std::isnan(p));
}
}
}
// case 5: interior loop + multi left
for (int d = i + 7; d <= j - 6; ++d) {
for (int e = d + 4; e <= j - 2; ++e) {
if (allow_paired(d, e)) {
for (int f = e + 1; f <= j - 1; ++f) {
if (Pg(i, d, e, j) > 0.0) {
float p = Qgls(i + 1, d, e, f) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(1, true) +
score_multiloop_unpaired(j - f - 1, true) + score_at_penalty(i, j) +
score_dangle(f + 1, j - 1)) /
RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pgls(i + 1, d, e, f) += p;
assert(!std::isnan(p));
}
}
}
}
}
// case 6: interior loop + multi right
for (int d = i + 2; d <= j - 11; ++d) {
for (int e = d + 4; e <= j - 7; ++e) {
if (allow_paired(d, e)) {
for (int c = i + 1; c <= d - 1; ++c) {
if (Pg(i, d, e, j) > 0.0) {
float p = Qgrs(c, d, e, j - 1) *
EXP(
-(
score_multiloop(true) + score_multiloop_paired(1, true) +
score_multiloop_unpaired(c - i - 1, true) + score_at_penalty(i, j) +
score_dangle(i + 1, c - 1)) /
RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pgrs(c, d, e, j - 1) += p;
assert(!std::isnan(p));
}
}
}
}
}
// case 7: interior loop + multi both sides
for (int d = i + 7; d <= j - 11; ++d) {
for (int e = d + 4; e <= j - 7; ++e) {
if (allow_paired(d, e)) {
for (int c = i + 6; c <= d - 1; ++c) {
if (Pg(i, d, e, j) > 0.0) {
float p =
Qm(i + 1, c - 1) * Qgrs(c, d, e, j - 1) *
EXP(-(score_multiloop(true) + score_multiloop_paired(1, true) + score_at_penalty(i, j)) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pm(i + 1, c - 1) += p;
Pgrs(c, d, e, j - 1) += p;
assert(!std::isnan(p));
}
}
}
}
}
}
// Pbg outer gap-spanning base-pairing prob
for (int d = i + 1; d <= j - 5; ++d)
for (int e = d + 4; e <= j - 1; ++e) Pbg(i, j) += Pg(i, d, e, j);
// Pb recursion
if (allow_paired(i, j)) {
for (int d = i + 1; d <= j - 5; ++d) // all possible rightmost pairs d-e
{
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
if (Pb(i, j) > 0.0) {
float p = Qb(d, e) * EXP(-score_interior(i, d, e, j, false) / RT) / Qb(i, j) * Pb(i, j);
Pb(d, e) += p;
assert(!std::isnan(p));
if (d >= i + 6 && wc_pair(d, e) && wc_pair(i, j)) {
float p = Qm(i + 1, d - 1) * Qb(d, e) *
EXP(
-(
score_multiloop(false) + score_multiloop_paired(2, false) +
score_multiloop_unpaired(j - e - 1, false) + score_at_penalty(i, j) +
score_at_penalty(d, e) + score_dangle(e + 1, j - 1)) /
RT) /
Qb(i, j) * Pb(i, j);
Pm(i + 1, d - 1) += p;
Pb(d, e) += p;
assert(!std::isnan(p));
}
}
}
}
}
if (wc_pair(i, j)) {
for (int d = i + 1; d <= j - 6; ++d) // all possible rightmost pseudoknots filling [d,e]
{
for (int e = d + 5; e <= j - 1; ++e) {
if (Pb(i, j) > 0.0) {
float p;
p = Qp(d, e) *
EXP(
-(
score_multiloop(false) + score_pk_multiloop() + score_multiloop_paired(3, false) +
score_multiloop_unpaired(j - e - 1 + d - i - 1, false) + score_at_penalty(i, j) +
score_dangle(e + 1, j - 1) + score_dangle(i + 1, d - 1)) /
RT) /
Qb(i, j) * Pb(i, j);
Pp(d, e) += p;
assert(!std::isnan(p));
p = Qm(i + 1, d - 1) * Qp(d, e) *
EXP(
-(
score_multiloop(false) + score_pk_multiloop() + score_multiloop_paired(3, false) +
score_multiloop_unpaired(j - e - 1, false) + score_at_penalty(i, j) +
score_dangle(e + 1, j - 1)) /
RT) /
Qb(i, j) * Pb(i, j);
Pm(i + 1, d - 1) += p;
Pp(d, e) += p;
assert(!std::isnan(p));
}
}
}
}
}
}
}
}
void Nupack::fastiloops_pr(int i, int j, DPtable4& Qg, DPtableX& Qx, DPtableX& Qx2, DPtable4& Pg, DPtableX& Px, DPtableX& Px2)
{
int l = j - i + 1;
if (allow_paired(i, j)) {
for (int d = i + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
// Add small inextensible interior loops to Qg as special cases
for (int l1 = 0; l1 <= std::min(3, d - i - 2); ++l1) {
int c = i + l1 + 1;
for (int l2 = 0; l2 <= std::min(3, j - e - 2); ++l2) {
int f = j - l2 - 1;
if (allow_paired(c, f) && Pg(i, d, e, j) > 0.0) {
float p = Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pg(c, d, e, f) += p;
assert(!std::isnan(p));
}
}
}
// Add bulge loops and large asymmetric loops as special cases
for (int l1 = 0; l1 <= std::min(3, d - i - 2); ++l1) // cases l1=0,1,2,3, l2>=4
{
int c = i + l1 + 1;
for (int l2 = 4; l2 <= j - e - 2; ++l2) {
int f = j - l2 - 1;
if (allow_paired(c, f) && Pg(i, d, e, j) > 0.0) {
float p = Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pg(c, d, e, f) += p;
assert(!std::isnan(p));
}
}
}
for (int l2 = 0; l2 <= std::min(3, j - e - 2); ++l2) {
int f = j - l2 - 1;
for (int l1 = 4; l1 <= d - i - 2; ++l1) {
int c = i + l1 + 1;
if (allow_paired(c, f) && Pg(i, d, e, j) > 0.0) {
float p = Qg(c, d, e, f) * EXP(-score_interior(i, c, f, j, true) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Pg(c, d, e, f) += p;
assert(!std::isnan(p));
}
}
}
}
}
}
}
// Add cases that are at an end with l1>=4, l2>=4
if ((i == 0 || j == N - 1) && l >= 17) {
for (int d = i + 6; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e)) {
for (int c = i + 5; c <= d - 1; ++c) {
for (int f = e + 1; f <= j - 5; ++f) {
if (allow_paired(c, f)) {
int l1 = c - i - 1;
int l2 = j - f - 1;
int s = l1 + l2;
Qx(i, d, e, s) +=
Qg(c, d, e, f) *
EXP(-(score_interior_asymmetry(l1, l2) + score_interior_mismatch(f, c, f + 1, c - 1)) / RT);
}
}
}
}
}
}
}
// Use Qx to finish calculation of Px
if (allow_paired(i, j)) {
for (int d = i + 1; d <= j - 5; ++d) {
for (int e = d + 4; e <= j - 1; ++e) {
if (allow_paired(d, e)) {
for (int s = 8; s <= l - 9; ++s) {
float p = Qx(i, d, e, s) * EXP(-score_interior_mismatch(i, j, i + 1, j - 1) / RT) /
Qg(i, d, e, j) * Pg(i, d, e, j);
Px(i, d, e, s) += p;
assert(!std::isnan(p));
}
}
}
}
}
// Calculate Pg contribution using Qx and Px
if (l >= 17) {
for (int d = i + 6; d <= j - 10; ++d) {
for (int e = d + 4; e <= j - 6; ++e) {
if (allow_paired(d, e)) {
int l1 = 4; // explicitly add in terms for l1=4, l2>=4
int c = i + l1 + 1;
for (int l2 = 4; l2 <= j - e - 2; ++l2) {
int s = l1 + l2;
int f = j - l2 - 1;
if (allow_paired(c, f) && Qx(i, d, e, s) > 0.0) {
float temp =
Qg(c, d, e, f) *
EXP(-(score_interior_asymmetry(l1, l2) + score_interior_mismatch(f, c, f + 1, c - 1)) / RT);
float p = temp / Qx(i, d, e, s) * Px(i, d, e, s);
Pg(c, d, e, f) += p;
Px(i, d, e, s) -= p;
assert(!std::isnan(p));
if (temp > Qx(i, d, e, s)) {
temp = 0.0;
int l1min = 5;
int l2min = 4;
for (int c = i + l1min + 1; c <= d - 1; ++c) {
int f = c - i + j - 3;
if (j - f - 1 > l2min && f >= e + 1 && allow_paired(c, f)) {
temp += Qg(c, d, e, f) * EXP(-score_interior(i, j, c, f, true) / RT);
}
}
Qx(i, d, e, s) = temp;
} else {
Qx(i, d, e, s) -= temp;
}
}
}
if (d >= i + 7) {
int l2 = 4; // explicitly add in terms of l1>=5, l2=4
int f = j - l2 - 1;
for (int l1 = 5; l1 <= d - i - 2; ++l1) {
int s = l1 + l2;
int c = i + l1 + 1;
if (allow_paired(c, f) && Qx(i, d, e, s) > 0.0) {
float temp =
Qg(c, d, e, f) *
EXP(-(score_interior_asymmetry(l1, l2) + score_interior_mismatch(f, c, f + 1, c - 1)) / RT);
float p = temp / Qx(i, d, e, s) * Px(i, d, e, s);
Pg(c, d, e, f) += p;
Px(i, d, e, s) -= p;
assert(!std::isnan(p));
if (temp > Qx(i, d, e, s)) {
temp = 0.0;
int l1min = 5;
int l2min = 5;
for (int c = i + l1min + 1; c <= d - 1; ++c) {
int f = c - i + j - 4;
if (j - f - 1 > l2min && f >= e + 1 && allow_paired(c, f)) {
temp += Qg(c, d, e, f) * EXP(-score_interior(i, j, c, f, true) / RT);
}
}
Qx(i, d, e, s) = temp;
} else {
Qx(i, d, e, s) -= temp;
}
}
}
}
}
// Store partial values for Qx2 and Px2
for (int s = 10; s <= l - 9; ++s) {
Qx2(i + 1, d, e, s - 2) = Qx(i, d, e, s) * EXP(-(score_loop(s + 2) - score_loop(s)) / RT);
Px2(i + 1, d, e, s - 2) = Px(i, d, e, s);
}
}
}
}
}
void Nupack::get_posterior(vector<float>& bp1, vector<float>& bp2, vector<int>& offset) const
{
bp1.resize((N + 1) * (N + 2) / 2);
bp2.resize((N + 1) * (N + 2) / 2);
offset.resize(N + 1);
for (int i = 0; i <= N; ++i) offset[i] = i * ((N + 1) + (N + 1) - i - 1) / 2;
for (int i = 0; i != N - 1; ++i)
for (int j = i + 1; j != N; ++j) {
bp1[offset[i + 1] + (j + 1)] = Pb(i, j);
bp2[offset[i + 1] + (j + 1)] = Pbg(i, j);
}
}
void Nupack::get_posterior(vector<float>& bp, vector<int>& offset) const
{
bp.resize((N + 1) * (N + 2) / 2);
offset.resize(N + 1);
for (int i = 0; i <= N; ++i) offset[i] = i * ((N + 1) + (N + 1) - i - 1) / 2;
for (int i = 0; i != N - 1; ++i)
for (int j = i + 1; j != N; ++j) bp[offset[i + 1] + (j + 1)] = Pb(i, j) + Pbg(i, j);
}
energy_t Nupack::score_hairpin(int i, int j) const
{
energy_t e = 0.0;
bool polyC = true;
for (int k = i + 1; k < j; ++k) {
if (seq[k] != BASE_C) {
polyC = false;
break;
}
}
int size = j - i - 1;
assert(size >= 3);
assert(allow_paired(i, j));
e += size <= 30 ? hairpin37[size - 1] : hairpin37[30 - 1] + loop_greater30 * LOG(size / 30.0);
if (size == 3) {
e += score_at_penalty(i, j);
e += triloop37[seq[i] - 1][seq[i + 1] - 1][seq[i + 2] - 1][seq[j - 1] - 1][seq[j] - 1];
if (polyC) e += polyC_penalty;
if (seq[i + 1] == BASE_G && seq[i + 2] == BASE_G && seq[j - 1] == BASE_G) e += hairpin_GGG;
} else if (size == 4) {
e += tloop37[seq[i] - 1][seq[i + 1] - 1][seq[i + 2] - 1][seq[j - 2] - 1][seq[j - 1] - 1][seq[j] - 1];
e += mismatch_hairpin37[seq[i + 1] - 1][seq[j - 1] - 1][pair_type(i, j)];
if (polyC) e += polyC_slope * size + polyC_int;
} else /*if (size>4)*/
{
e += mismatch_hairpin37[seq[i + 1] - 1][seq[j - 1] - 1][pair_type(i, j)];
if (polyC) e += polyC_slope * size + polyC_int;
}
return e;
}
energy_t Nupack::score_loop(int l) const
{
return l <= 30 ? interior37[l - 1] : interior37[30 - 1] + loop_greater30 * LOG(l / 30.0);
}
energy_t Nupack::score_interior(int i, int h, int m, int j, bool pk) const
{
int l1 = h - i - 1;
int l2 = j - m - 1;
int size = l1 + l2;
energy_t e = 0;
// helix
if (size == 0) {
return stack37[pair_type(i, j)][pair_type(h, m)] * (pk ? pk_stack_span : 1.0);
}
// bulge
else if (l1 == 0 || l2 == 0) {
e += size <= 30 ? bulge37[size - 1] : bulge37[30 - 1] + loop_greater30 * LOG(size / 30.0);
if (l1 + l2 == 1) // single bulge...treat as a stacked region
{
e += stack37[pair_type(i, j)][pair_type(h, m)];
e -= salt_correction;
} else {
e += score_at_penalty(i, j);
e += score_at_penalty(h, m);
}
}
// interior loop
else if (l1 > 0 && l2 > 0) {
int asymmetry = std::abs(l1 - l2);
if (asymmetry > 1 || size > 4) {
e += score_interior_asymmetry(l1, l2);
if (l1 > 1 && l2 > 1) {
e += score_interior_mismatch(m, h, m + 1, h - 1);
e += score_interior_mismatch(i, j, i + 1, j - 1);
} else if (l1 == 1 || l2 == 1) {
e += score_interior_mismatch(m, h);
e += score_interior_mismatch(i, j);
} else {
assert(!"unclassified interior loop");
exit(1);
}
} else if (l1 == 1 && l2 == 1)
e += int11_37[pair_type(i, j)][pair_type(h, m)][seq[i + 1] - 1][seq[j - 1] - 1];
else if (l1 == 2 && l2 == 2)
e += int22_37[pair_type(i, j)][pair_type(h, m)][seq[i + 1] - 1][seq[j - 1] - 1][seq[i + 2] - 1][seq[j - 2] - 1];
else if (l1 == 1 && l2 == 2)
e += int21_37[pair_type(i, j)][seq[j - 2] - 1][seq[i + 1] - 1][pair_type(h, m)][seq[j - 1] - 1];
else if (l1 == 2 && l2 == 1)
e += int21_37[pair_type(m, h)][seq[i + 1] - 1][seq[j - 1] - 1][pair_type(j, i)][seq[i + 2] - 1];
else {
assert(!"error in tabulated interior loop");
exit(1);
}
} else {
assert(!"improperly classifed interior loop");
exit(1);
}
return e * (pk ? pk_interior_span : 1.0);
}
energy_t Nupack::score_interior_mismatch(int i, int j, int k, int l) const
{
return mismatch_interior37[seq[k] - 1][seq[l] - 1][pair_type(i, j)];
}
energy_t Nupack::score_interior_mismatch(int i, int j) const
{
return mismatch_interior37[BASE_N][BASE_N][pair_type(i, j)];
}
energy_t Nupack::score_interior_asymmetry(int l1, int l2) const
{
energy_t e = 0.0;
int size = l1 + l2;
int asymmetry = std::abs(l1 - l2);
e += size <= 30 ? interior37[size - 1] : interior37[30 - 1] + loop_greater30 * LOG(size / 30.0);
// asymmetry penalty
e += std::min(max_asymmetry, asymmetry * asymmetry_penalty[std::min(4, std::min(l1, l2)) - 1]);
return e;
}
energy_t Nupack::score_multiloop(bool pk) const { return pk ? multiloop_penalty_pk : multiloop_penalty; }
energy_t Nupack::score_multiloop_paired(int n, bool pk) const
{
return (pk ? multiloop_paired_penalty_pk : multiloop_paired_penalty) * n;
}
energy_t Nupack::score_multiloop_unpaired(int n, bool pk) const
{
return (pk ? multiloop_unpaired_penalty_pk : multiloop_unpaired_penalty) * n;
}
energy_t Nupack::score_at_penalty(int i, int j) const
{
return pair_type(i, j) == PAIR_AU || pair_type(i, j) == PAIR_UA ? at_penalty : 0;
}
energy_t Nupack::score_dangle(int i, int j) const
{
energy_t d5 = 0.0, d3 = 0.0;
// if( DANGLETYPE != 2) {
if ((j == i - 1) || (j == -1 && i > 0)) {
return 0.0;
}
if ((j == -1 && i > 0) || (j == i - 1 && (i == 0 || j == N - 1))) return 0.0;
if (j != N - 1) d3 = dangle3_37[3 - pair_type(j + 1)][seq[j] - 1];
if (i != 0) d5 = dangle5_37[pair_type(i - 1)][seq[i] - 1];
if (i == j && i != 0 && j != N - 1 /* && DANGLETYPE!=2 */)
return std::min(d3, d5);
else
return d3 + d5;
}
inline energy_t Nupack::score_pk() const { return pk_penalty; }
inline energy_t Nupack::score_pk_multiloop() const { return pk_multiloop_penalty; }
inline energy_t Nupack::score_pk_pk() const { return pk_pk_penalty; }
inline energy_t Nupack::score_pk_paired(int n) const { return pk_paired_penalty * n; }
inline energy_t Nupack::score_pk_unpaired(int n) const { return pk_unpaired_penalty * n; }
inline energy_t Nupack::score_pk_band(int n) const { return pk_band_penalty * n; }
/*
* $Id$
*
* Copyright (C) 2010 Kengo Sato
*
* This file comes from IPknot.
*
*/
#include <boost/multi_array.hpp>
#include <string>
#include <vector>
#include <iostream>
using std::string;
using std::vector;
#define kB 0.00198717 // Boltzmann constant in kcal/mol/K
#define ZERO_C_IN_KELVIN 273.15 // Zero degrees C in Kelvin
#define AVOGADRO 6.022e23 // Avogadro's number
typedef float energy_t;
class DPtable2
{
public:
DPtable2() : V_(), N_(0) {}
void resize(int n)
{
N_ = n;
V_.resize(N_ * (N_ + 1) / 2 + (N_ + 1));
}
void fill(const float& v) { std::fill(V_.begin(), V_.end(), v); }
float& operator()(int i, int j) { return V_[index(i, j)]; }
const float& operator()(int i, int j) const { return V_[index(i, j)]; }
private:
int index(int i, int j) const
{
assert(j <= N_);
return j == i - 1 ? N_ * (N_ + 1) / 2 + i : i * N_ + j - i * (1 + i) / 2;
}
std::vector<float> V_;
int N_;
};
class DPtable4
{
public:
DPtable4() : V_(), N_(0) {}
void resize(int n)
{
N_ = n;
std::cout << V_.max_size() << " - " << N_ << " - " << sizeof(float) * static_cast<unsigned long>(N_) * (N_ - 1) * (N_ - 2) * (N_ - 3) / 2 / 3 / 4 << std::endl;
V_.resize(static_cast<unsigned long>(N_) * (N_ - 1) * (N_ - 2) * (N_ - 3) / 2 / 3 / 4); // This number can be HUGE
std::cout << "c'est toi qui bad_allocque ?" << std::endl;
}
void fill(const float& v) { std::fill(V_.begin(), V_.end(), v); }
float& operator()(int i, int d, int e, int j) { return V_[index(i, d, e, j)]; }
const float& operator()(int i, int d, int e, int j) const { return V_[index(i, d, e, j)]; }
private:
int index(int h, int r, int m, int s) const
{
int n = N_;
int h2 = h * h;
int h3 = h2 * h;
int h4 = h3 * h;
int m2 = m * m;
int n2 = n * n;
int n3 = n2 * n;
int r2 = r * r;
int r3 = r2 * r;
assert(h <= r);
assert(r <= m);
assert(m <= s);
assert(s <= N_);
return (h == r && m == s) ? V_.size() - 1 :
(
-24 - 50 * h - 35 * h2 - 10 * h3 - h4 - 36 * m - 12 * m2 + 12 * n + 70 * h * n +
30 * h2 * n + 4 * h3 * n + 24 * m * n - 12 * n2 - 30 * h * n2 - 6 * h2 * n2 + 4 * h * n3 +
44 * r - 48 * n * r + 12 * n2 * r + 24 * r2 - 12 * n * r2 + 4 * r3 + 24 * s) /
24;
}
std::vector<float> V_;
int N_;
};
class DPtableX
{
public:
DPtableX() : V_(), N_(0), D_(0) {}
void resize(int d, int n)
{
N_ = n;
D_ = d;
int max_sz = 0;
for (int i = d; i < d + 3; ++i) max_sz = std::max(max_sz, (N_ - i) * (i - 5) * (i - 1) * (i - 2) / 2);
V_.resize(max_sz);
}
void fill(const float& v) { std::fill(V_.begin(), V_.end(), v); }
float& operator()(int i, int d, int e, int s) { return V_[index(i, d, e, s)]; }
const float& operator()(int i, int d, int e, int s) const { return V_[index(i, d, e, s)]; }
void swap(DPtableX& x)
{
std::swap(V_, x.V_);
std::swap(N_, x.N_);
std::swap(D_, x.D_);
}
private:
int index(int i, int h1, int m1, int s) const
{
int d = D_;
int d1d2 = (d - 1) * (d - 2);
int d5 = d - 5;
int h1_i_1 = h1 - i - 1;
assert(i + d < N_);
assert(d - 6 >= s);
assert(i < h1);
return i * d5 * d1d2 / 2 + s * d1d2 / 2 + h1_i_1 * (d - 1) - h1_i_1 * (h1 - i) / 2 + m1 - h1 - 1;
}
std::vector<float> V_;
int N_;
int D_;
};
class Nupack
{
public:
Nupack();
void load_sequence(const string& s);
void load_parameters_fm363(const vector<float>& v);
void load_default_parameters(/*int which*/);
bool load_parameters(const char* filename);
void dump_parameters(std::ostream& os) const;
float calculate_partition_function();
void calculate_posterior();
void get_posterior(vector<float>& bp, vector<int>& offset) const;
void get_posterior(vector<float>& bp1, vector<float>& bp2, vector<int>& offset) const;
private:
void fastiloops(int i, int j, DPtable4& Qg, DPtableX& Qx, DPtableX& Qx2);
void fastiloops_pr(int i, int j, DPtable4& Qg, DPtableX& Qx, DPtableX& Qx2, DPtable4& Pg, DPtableX& Px, DPtableX& Px2);
energy_t score_hairpin(int i, int j) const;
energy_t score_loop(int l) const;
energy_t score_interior(int i, int d, int e, int j, bool pk) const;
energy_t score_interior_mismatch(int i, int j) const;
energy_t score_interior_mismatch(int i, int j, int k, int l) const;
energy_t score_interior_asymmetry(int l1, int l2) const;
energy_t score_multiloop(bool pk) const;
energy_t score_multiloop_paired(int n, bool pk) const;
energy_t score_multiloop_unpaired(int n, bool pk) const;
energy_t score_at_penalty(int i, int j) const;
energy_t score_dangle(int i, int j) const;
energy_t score_pk() const;
energy_t score_pk_multiloop() const;
energy_t score_pk_pk() const;
energy_t score_pk_paired(int n) const;
energy_t score_pk_unpaired(int n) const;
energy_t score_pk_band(int n) const;
int base(char x) const;
bool allow_paired(int i, int j) const;
bool wc_pair(int i, int j) const;
int pair_type(int i, int j) const;
int pair_type(int i) const;
vector<int> base_map;
boost::multi_array<int, 2> pair_map;
vector<int> seq;
int N;
float RT;
DPtable2 Q;
DPtable2 Qb;
DPtable2 Qm;
DPtable2 Qp;
DPtable2 Qz;
DPtable4 Qg;
DPtable4 Qgl;
DPtable4 Qgr;
DPtable4 Qgls;
DPtable4 Qgrs;
DPtable2 P;
DPtable2 Pb;
DPtable2 Pm;
DPtable2 Pp;
DPtable2 Pz;
DPtable2 Pbg;
DPtable4 Pg;
DPtable4 Pgl;
DPtable4 Pgr;
DPtable4 Pgls;
DPtable4 Pgrs;
// energy parameters
energy_t hairpin37[30];
energy_t bulge37[30];
energy_t interior37[30];
energy_t stack37[6][6];
energy_t int11_37[6][6][4][4];
energy_t int21_37[6][4][4][6][4];
energy_t int22_37[6][6][4][4][4][4];
energy_t dangle3_37[6][4];
energy_t dangle5_37[6][4];
energy_t triloop37[4][4][4][4][4];
energy_t tloop37[4][4][4][4][4][4];
energy_t mismatch_hairpin37[4][4][6];
energy_t mismatch_interior37[4][4][6];
energy_t asymmetry_penalty[4];
energy_t polyC_penalty, polyC_slope, polyC_int;
energy_t at_penalty;
energy_t multiloop_penalty; // alpha1
energy_t multiloop_paired_penalty; // alpha2
energy_t multiloop_unpaired_penalty; // alpha3
energy_t pk_penalty; // beta1
energy_t pk_multiloop_penalty; // beta1m
energy_t pk_pk_penalty; // beta1p
energy_t pk_paired_penalty; // beta2
energy_t pk_unpaired_penalty; // beta3
energy_t pk_band_penalty;
energy_t pk_stack_span;
energy_t pk_interior_span;
energy_t multiloop_penalty_pk;
energy_t multiloop_paired_penalty_pk;
energy_t multiloop_unpaired_penalty_pk;
energy_t max_asymmetry;
energy_t salt_correction;
energy_t loop_greater30;
energy_t hairpin_GGG;
float intermolecular_initiation;
};
#include "rna.h"
#include "nupack.h"
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using std::cout, std::cerr, std::endl;
RNA::RNA(string name, string seq)
{
if (!check_seq(seq)) {
cerr << "Unknown chars in input sequence. Please restrict to ACGTU." << endl;
exit(EXIT_FAILURE);
}
name_ = name;
seq_ = seq;
format();
n_ = seq_.size();
cout << "\t>formatted sequence" << endl;
/*define type_*/
type_ = vector<vector<int>>(n_, vector<int>(n_));
for (int i = 0; i < n_; i++) {
for (int j = 0; j < n_; j++) {
if (i < j) {
std::stringstream ss;
ss << seq_[i] << seq_[j];
string str = ss.str();
if (str.compare("AU") == 0) {
type_[i][j] = 1;
} else if (str.compare("CG") == 0) {
type_[i][j] = 2;
} else if (str.compare("GC") == 0) {
type_[i][j] = 3;
} else if (str.compare("GU") == 0) {
type_[i][j] = 4;
} else if (str.compare("UG") == 0) {
type_[i][j] = 5;
} else if (str.compare("UA") == 0) {
type_[i][j] = 6;
} else {
type_[i][j] = 0;
}
} else {
type_[i][j] = 0;
}
}
}
nBP_ = type_.size();
/*define coord_*/
for (int i = 0; i < n_; i++) {
for (int j = 0; j < n_; j++) {
if (i < j and type_[i][j] > 0) {
if (i != 0 and i != n_ and j != 0 and j != n_) {
if (type_[i - 1][j + 1] > 0 or type_[i + 1][j - 1] > 0) {
coord_.push_back(std::make_pair(i, j));
}
} else if (i == 0 or j == n_) {
if (type_[i + 1][j - 1] > 0) {
coord_.push_back(std::make_pair(i, j));
}
}
}
}
}
/*define pij_*/
vector<float> bp;
vector<int> offset;
Nupack nu;
// nu.load_parameters("rna1999.dG");
nu.load_default_parameters();
cout << "\t>default parameters loaded (Serra and Turner, 1995)" << endl;
nu.load_sequence(seq_);
cout << "\t>computing pairing probabilities..." << endl;
try {
nu.calculate_partition_function();
} catch (std::exception& e) {
cerr << e.what() << endl;
exit(EXIT_FAILURE);
}
nu.calculate_posterior();
nu.get_posterior(bp, offset);
pij_ = vector<vector<float>>(n_, vector<float>(n_));
for (int i = 1; i <= n_; i++) {
for (int j = 1; j <= n_; j++) {
pij_[i - 1][j - 1] = bp[offset[i] + j];
}
}
cout << "\t>pairing probabilities defined" << endl;
}
int RNA::find_coord(pair<int, int> p)
{
vector<pair<int, int>>::iterator it = find(coord_.begin(), coord_.end(), p);
int r = -1;
if (it != coord_.end()) r = distance(coord_.begin(), it);
return r;
}
bool RNA::check_seq(string seq) // Checks if the sequences only contains ACGUT.
{
bool res = true;
for (unsigned int i = 0; i < seq.size(); i++) {
if (seq[i] != 'A' and seq[i] != 'U' and seq[i] != 'C' and seq[i] != 'G' and seq[i] != 'T') {
res = false;
break;
}
}
return res;
}
void RNA::format()
{
for (unsigned int i = 0; i < seq_.size(); i++) {
seq_[i] = toupper(seq_[i]);
if (seq_[i] == 'T') {
seq_[i] = 'U';
break;
}
}
}
#ifndef DEF_RNA
#define DEF_RNA
#include <map>
#include <string>
#include <vector>
using std::pair, std::string, std::vector, std::map;
typedef struct Comp_ {
pair<uint, uint> pos;
int score;
size_t k;
Comp_(pair<int, int> p, int s) : pos(p), score(s) { k = 1 + pos.second - pos.first; }
} Component;
typedef struct {
string atlas_id;
vector<Component> comp;
bool reversed;
} Motif;
class RNA
{
public:
RNA();
RNA(string name, string seq);
int get_n_();
string get_name_();
string get_seq_();
vector<vector<int>> get_type_();
int get_type(int i, int j);
int get_type(int i);
vector<pair<int, int>> get_coord_();
pair<int, int> get_coord(int i);
int get_coordF(int i);
int get_coordS(int i);
int find_coord(pair<int, int>);
vector<vector<float>> get_pij_();
float get_pij(int i, int j);
float get_pij(int i);
int get_err_();
uint get_RNA_length() const;
bool check_seq(string seq);
void format();
private:
string name_; /*name of the rna*/
string seq_; /*sequence of the rna*/
int n_; /*length of the rna*/
vector<vector<int>> type_; /*vector of base pair types*/
vector<pair<int, int>> coord_; /*vector of base pair coordinates*/
vector<vector<float>> pij_; /*vector of probabilities*/
uint nBP_; /*number of possible base pair*/
};
inline int RNA::get_n_() { return n_; }
inline string RNA::get_name_() { return name_; }
inline string RNA::get_seq_() { return seq_; }
inline vector<vector<int>> RNA::get_type_() { return type_; }
inline int RNA::get_type(int i, int j) { return type_[i][j]; }
inline int RNA::get_type(int i) { return type_[get_coord(i).first][get_coord(i).second]; }
inline vector<pair<int, int>> RNA::get_coord_() { return coord_; }
inline pair<int, int> RNA::get_coord(int i) { return coord_[i]; }
inline int RNA::get_coordF(int i) { return coord_[i].first; }
inline int RNA::get_coordS(int i) { return coord_[i].second; }
inline vector<vector<float>> RNA::get_pij_() { return pij_; }
inline float RNA::get_pij(int i, int j) { return pij_[i][j]; }
inline float RNA::get_pij(int i) { return pij_[get_coord(i).first][get_coord(i).second]; }
inline uint RNA::get_RNA_length() const { return nBP_; }
#endif
// These parameter values are extracted from the larger files rna1995.dG
// Serra and Turner, 1995
// >All values represent delta G in units of decacal/mol (0.01 kcal/mol)
struct sp_loops {
const char* s;
int e;
};
static sp_loops triloops[] = {{"AAAAU", 0}, {nullptr, 0}};
static sp_loops tetraloops[] = {
{"AAUUUU", -200},
{"ACUUGU", -200},
{"AGAAAU", -200},
{"AGAGAU", -200},
{"AGCAAU", -200},
{"AGCGAU", -200},
{"AGGAAU", -200},
{"AGUAAU", -200},
{"AGUGAU", -200},
{"AUACGU", -200},
{"AUCCGU", -200},
{"AUUCGU", -200},
{"AUUUAU", -200},
{"CAUUUG", -200},
{"CCUUGG", -200},
{"CGAAAG", -200},
{"CGAGAG", -200},
{"CGCAAG", -200},
{"CGCGAG", -200},
{"CGGAAG", -200},
{"CGUAAG", -200},
{"CGUGAG", -200},
{"CUACGG", -200},
{"CUCCGG", -200},
{"CUUCGG", -200},
{"CUUUAG", -200},
{"GAUUUC", -200},
{"GAUUUU", -200},
{"GCUUGC", -200},
{"GCUUGU", -200},
{"GGAAAC", -200},
{"GGAAAU", -200},
{"GGAGAC", -200},
{"GGAGAU", -200},
{"GGCAAC", -200},
{"GGCAAU", -200},
{"GGCGAC", -200},
{"GGCGAU", -200},
{"GGGAAC", -200},
{"GGGAAU", -200},
{"GGUAAC", -200},
{"GGUAAU", -200},
{"GGUGAC", -200},
{"GGUGAU", -200},
{"GUACGC", -200},
{"GUACGU", -200},
{"GUCCGC", -200},
{"GUCCGU", -200},
{"GUUCGC", -200},
{"GUUCGU", -200},
{"GUUUAC", -200},
{"GUUUAU", -200},
{"UAUUUA", -200},
{"UAUUUG", -200},
{"UCUUGA", -200},
{"UCUUGG", -200},
{"UGAAAA", -200},
{"UGAAAG", -200},
{"UGAGAA", -200},
{"UGAGAG", -200},
{"UGCAAA", -200},
{"UGCAAG", -200},
{"UGCGAA", -200},
{"UGCGAG", -200},
{"UGGAAA", -200},
{"UGGAAG", -200},
{"UGUAAA", -200},
{"UGUAAG", -200},
{"UGUGAA", -200},
{"UGUGAG", -200},
{"UUACGA", -200},
{"UUACGG", -200},
{"UUCCGA", -200},
{"UUCCGG", -200},
{"UUUCGA", -200},
{"UUUCGG", -200},
{"UUUUAA", -200},
{"UUUUAG", -200},
{nullptr, 0}};
static int thermo_params[] = {
// >Stacking 5' X1 Y1 3'
// > 3' X2 Y2 5'
// >X1X2 = AU CG GC UA GU UG (row headings)
// >Y1Y2 = AU CG GC UA GU UG (column headings)
-90, -210, -170, -90, -50, -100,
-180, -290, -200, -170, -120, -190,
-230, -340, -290, -210, -140, -210,
-110, -230, -180, -90, -80, -110,
-110, -210, -190, -100, -40, 150,
-80, -140, -120, -50, -20, -40,
// >Hairpin Loop Energies: size = 1,2,3,..,30
0, 0, 410, 490, 440, 470, 500, 510, 520, 530, 540, 550, 560, 570, 580, 580, 590, 590, 600, 610, 610, 620, 620, 630, 630, 630, 640, 640, 650, 650,
// >Bulge loop Energies: size = 1,2,3,..,30
390, 310, 350, 420, 480, 500, 520, 530, 540, 550, 570, 570, 580, 590, 600, 610, 610, 620, 620, 630, 630, 640, 640, 650, 650, 650, 660, 670, 670, 670,
// >Interior Loop Energies: size = 1,2,3,..,30
0, 410, 510, 490, 530, 570, 590, 600, 610, 630, 640, 640, 650, 660, 670, 680, 680, 690, 690, 700, 710, 710, 710, 720, 720, 730, 730, 740, 740, 740,
// >NINIO asymmetry Terms: m1, m2, m3, m4, max
// >Energy = MAX[ max, asymmetry*m#] where # = MIN(4,L1,L2)
// >and L1, L2 are lengths of each side of loop,
// >and asymmetry = |L1-L2|
30, 30, 30, 30, 300,
// >Mismatch HP:
// >Columns 5'-AU,CG,GC,UA,GU,UG-3'
// >rows 5'-AA,AC,AG,AU,CA,..,UU-3'
-80, -140, -110, -100, -80, -120,
-100, -200, -130, -80, -100, -140,
-170, -210, -200, -180, -170, -200,
-100, -190, -130, -90, -100, -140,
-70, -100, -110, -70, -70, -90,
-70, -110, -60, -60, -70, -90,
-70, -100, -60, -30, -70, -70,
-70, -80, -50, -50, -70, -70,
-150, -210, -230, -180, -150, -200,
-100, -190, -150, -90, -100, -140,
-100, -140, -140, -120, -100, -130,
-100, -190, -150, -90, -100, -140,
-80, -140, -80, -30, -80, -90,
-80, -150, -80, -60, -80, -110,
-80, -140, -80, -30, -80, -90,
-80, -120, -70, -50, -80, -90,
// >Mismatch Interior:
// >Columns 5'-AU,CG,GC,UA,GU,UG-3'
// >rows 5'-AA,AC,AG,AU,CA,..,UU-3'
-100, -150, -150, -100, -150, -100,
-100, -150, -150, -100, -150, -100,
-220, -270, -270, -220, -270, -220,
-50, -190, -130, -40, -130, -40,
-100, -150, -150, -100, -150, -100,
-100, -150, -150, -100, -150, -100,
-20, -100, -60, 20, -60, 20,
-100, -150, -150, -100, -150, -100,
-220, -270, -270, -220, -270, -220,
-50, -190, -150, -40, -150, -40,
-100, -150, -150, -100, -150, -100,
-50, -190, -150, -40, -150, -40,
-30, -140, -80, 20, -80, 20,
-100, -150, -150, -100, -150, -100,
-30, -140, -80, 20, -80, 20,
-200, -250, -250, -200, -250, -200,
// >Dangle Energies: 5' X1 Y 3'
// > 3' X2 . 5'
// >Columns: Y = A, C, G, U
// >Rows = X1X2 = AU,CG,GC,UA,GU,UG
-80, -50, -80, -60,
-170, -80, -170, -120,
-110, -40, -130, -60,
-70, -10, -70, -10,
-80, -50, -80, -60,
-120, -50, -120, -70,
// >Dangle Energies: 5' X1 . 3'
// > 3' X2 Y 5'
// >Columns: Y = A, C, G, U
// >Rows = X1X2 = AU,CG,GC,UA,GU,UG
-30, -10, -20, -20,
-20, -30, 0, 0,
-50, -30, -20, -10,
-30, -30, -40, -20,
-20, -20, -20, -20,
-20, -20, -20, -20,
// >Multiloop terms: ALPHA_1, ALPHA_2, ALPHA_3
// >ML penalty = ALPHA_1 + s * ALPHA_2 + u *ALPHA_3
// >s = # stems adjacent to ML, u = unpaired bases in ML
460, 10, 40,
// >AT_PENALTY:
// >Penalty for non GC pairs that terminate a helix
0,
// >Interior Loops 1x1
// >CG..AU = 5'- C X A 3'
// > 3'- G Y U 5'
// >Rows: X = A C G U (X constant for a row)
// >Columns: Y = A C G U (Y constant in column)
// AU..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// AU..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// AU..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// AU..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// AU..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// AU..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// CG..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GC..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UA..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// GU..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..AU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..CG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..GC
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..UA
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..GU
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// UG..UG
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
// >Interior Loops 2x2
// >CG.AG..AU = 5'- C A G A -3'
// > 3'- G Y X U -5'
// >Rows: X = A C G U (X constant for a row)
// >Columns: Y = A C G U (Y constant in column)
// AU.AA..AU
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 410, 410, 290, 460,
// AU.AC..AU
290, 290, 170, 340, 290, 290, 170, 340, 350, 350, 230, 400, 290, 290, 170, 340,
// AU.AG..AU
170, 170, 50, 220, 410, 410, 290, 460, 290, 290, 170, 340, 410, 410, 290, 460,
// AU.AU..AU
350, 350, 230, 400, 290, 290, 170, 340, 350, 350, 230, 400, 190, 190, 70, 240,
// AU.CA..AU
290, 290, 370, 290, 290, 290, 370, 290, 170, 170, 250, 170, 410, 410, 490, 410,
// AU.CC..AU
290, 290, 370, 290, 290, 290, 370, 290, 350, 350, 430, 350, 290, 290, 370, 290,
// AU.CG..AU
170, 170, 250, 170, 410, 410, 490, 410, 290, 290, 370, 290, 410, 410, 490, 410,
// AU.CU..AU
350, 350, 430, 350, 290, 290, 370, 290, 350, 350, 430, 350, 190, 190, 270, 190,
// AU.GA..AU
170, 340, 290, 340, 170, 340, 290, 340, 50, 220, 170, 220, 290, 460, 410, 460,
// AU.GC..AU
170, 340, 290, 340, 170, 340, 290, 340, 230, 400, 350, 400, 170, 340, 290, 340,
// AU.GG..AU
50, 220, 170, 220, 290, 460, 410, 460, 170, 340, 290, 340, 290, 460, 410, 460,
// AU.GU..AU
230, 400, 350, 400, 170, 340, 290, 340, 230, 400, 350, 400, 70, 240, 190, 240,
// AU.UA..AU
360, 290, 360, 190, 360, 290, 360, 190, 240, 170, 240, 70, 480, 410, 480, 310,
// AU.UC..AU
360, 290, 360, 190, 360, 290, 360, 190, 420, 350, 420, 250, 360, 290, 360, 190,
// AU.UG..AU
240, 170, 240, 70, 480, 410, 480, 310, 360, 290, 360, 190, 480, 410, 480, 310,
// AU.UU..AU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// AU.AA..CG
240, 240, 120, 290, 240, 240, 120, 290, 120, 120, 0, 170, 310, 310, 190, 360,
// AU.AC..CG
240, 240, 120, 290, 240, 240, 120, 290, 240, 240, 120, 290, 240, 240, 120, 290,
// AU.AG..CG
120, 120, 0, 170, 330, 330, 210, 380, 240, 240, 120, 290, 310, 310, 190, 360,
// AU.AU..CG
260, 260, 140, 310, 240, 240, 120, 290, 240, 240, 120, 290, 140, 140, 20, 190,
// AU.CA..CG
240, 240, 320, 240, 240, 240, 320, 240, 120, 120, 200, 120, 310, 310, 390, 310,
// AU.CC..CG
240, 240, 320, 240, 240, 240, 320, 240, 240, 240, 320, 240, 240, 240, 320, 240,
// AU.CG..CG
120, 120, 200, 120, 330, 330, 410, 330, 240, 240, 320, 240, 310, 310, 390, 310,
// AU.CU..CG
260, 260, 340, 260, 240, 240, 320, 240, 240, 240, 320, 240, 140, 140, 220, 140,
// AU.GA..CG
120, 290, 240, 290, 120, 290, 240, 290, 0, 170, 120, 170, 190, 360, 310, 360,
// AU.GC..CG
120, 290, 240, 290, 120, 290, 240, 290, 120, 290, 240, 290, 120, 290, 240, 290,
// AU.GG..CG
0, 170, 120, 170, 210, 380, 330, 380, 120, 290, 240, 290, 190, 360, 310, 360,
// AU.GU..CG
140, 310, 260, 310, 120, 290, 240, 290, 120, 290, 240, 290, 20, 190, 140, 190,
// AU.UA..CG
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 380, 310, 380, 210,
// AU.UC..CG
310, 240, 310, 140, 310, 240, 310, 140, 310, 240, 310, 140, 310, 240, 310, 140,
// AU.UG..CG
190, 120, 190, 20, 400, 330, 400, 230, 310, 240, 310, 140, 380, 310, 380, 210,
// AU.UU..CG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// AU.AA..GC
240, 240, 120, 290, 240, 240, 120, 290, 120, 120, 0, 170, 250, 250, 130, 300,
// AU.AC..GC
240, 240, 120, 290, 240, 240, 120, 290, 200, 200, 80, 250, 240, 240, 120, 290,
// AU.AG..GC
120, 120, 0, 170, 290, 290, 170, 340, 240, 240, 120, 290, 250, 250, 130, 300,
// AU.AU..GC
200, 200, 80, 250, 240, 240, 120, 290, 200, 200, 80, 250, 140, 140, 20, 190,
// AU.CA..GC
240, 240, 320, 240, 240, 240, 320, 240, 120, 120, 200, 120, 250, 250, 330, 250,
// AU.CC..GC
240, 240, 320, 240, 240, 240, 320, 240, 200, 200, 280, 200, 240, 240, 320, 240,
// AU.CG..GC
120, 120, 200, 120, 290, 290, 370, 290, 240, 240, 320, 240, 250, 250, 330, 250,
// AU.CU..GC
200, 200, 280, 200, 240, 240, 320, 240, 200, 200, 280, 200, 140, 140, 220, 140,
// AU.GA..GC
120, 290, 240, 290, 120, 290, 240, 290, 0, 170, 120, 170, 130, 300, 250, 300,
// AU.GC..GC
120, 290, 240, 290, 120, 290, 240, 290, 80, 250, 200, 250, 120, 290, 240, 290,
// AU.GG..GC
0, 170, 120, 170, 170, 340, 290, 340, 120, 290, 240, 290, 130, 300, 250, 300,
// AU.GU..GC
80, 250, 200, 250, 120, 290, 240, 290, 80, 250, 200, 250, 20, 190, 140, 190,
// AU.UA..GC
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 320, 250, 320, 150,
// AU.UC..GC
310, 240, 310, 140, 310, 240, 310, 140, 270, 200, 270, 100, 310, 240, 310, 140,
// AU.UG..GC
190, 120, 190, 20, 360, 290, 360, 190, 310, 240, 310, 140, 320, 250, 320, 150,
// AU.UU..GC
270, 200, 270, 100, 310, 240, 310, 140, 270, 200, 270, 100, 210, 140, 210, 40,
// AU.AA..UA
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 360, 360, 240, 410,
// AU.AC..UA
290, 290, 170, 340, 290, 290, 170, 340, 340, 340, 220, 390, 290, 290, 170, 340,
// AU.AG..UA
170, 170, 50, 220, 370, 370, 250, 420, 290, 290, 170, 340, 360, 360, 240, 410,
// AU.AU..UA
340, 340, 220, 390, 290, 290, 170, 340, 340, 340, 220, 390, 190, 190, 70, 240,
// AU.CA..UA
290, 290, 370, 290, 290, 290, 370, 290, 170, 170, 250, 170, 360, 360, 440, 360,
// AU.CC..UA
290, 290, 370, 290, 290, 290, 370, 290, 340, 340, 420, 340, 290, 290, 370, 290,
// AU.CG..UA
170, 170, 250, 170, 370, 370, 450, 370, 290, 290, 370, 290, 360, 360, 440, 360,
// AU.CU..UA
340, 340, 420, 340, 290, 290, 370, 290, 340, 340, 420, 340, 190, 190, 270, 190,
// AU.GA..UA
170, 340, 290, 340, 170, 340, 290, 340, 50, 220, 170, 220, 240, 410, 360, 410,
// AU.GC..UA
170, 340, 290, 340, 170, 340, 290, 340, 220, 390, 340, 390, 170, 340, 290, 340,
// AU.GG..UA
50, 220, 170, 220, 250, 420, 370, 420, 170, 340, 290, 340, 240, 410, 360, 410,
// AU.GU..UA
220, 390, 340, 390, 170, 340, 290, 340, 220, 390, 340, 390, 70, 240, 190, 240,
// AU.UA..UA
360, 290, 360, 190, 360, 290, 360, 190, 240, 170, 240, 70, 430, 360, 430, 260,
// AU.UC..UA
360, 290, 360, 190, 360, 290, 360, 190, 410, 340, 410, 240, 360, 290, 360, 190,
// AU.UG..UA
240, 170, 240, 70, 440, 370, 440, 270, 360, 290, 360, 190, 430, 360, 430, 260,
// AU.UU..UA
410, 340, 410, 240, 360, 290, 360, 190, 410, 340, 410, 240, 260, 190, 260, 90,
// AU.AA..GU
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 410, 410, 290, 460,
// AU.AC..GU
290, 290, 170, 340, 290, 290, 170, 340, 350, 350, 230, 400, 290, 290, 170, 340,
// AU.AG..GU
170, 170, 50, 220, 410, 410, 290, 460, 290, 290, 170, 340, 410, 410, 290, 460,
// AU.AU..GU
350, 350, 230, 400, 290, 290, 170, 340, 350, 350, 230, 400, 190, 190, 70, 240,
// AU.CA..GU
290, 290, 370, 290, 290, 290, 370, 290, 170, 170, 250, 170, 410, 410, 490, 410,
// AU.CC..GU
290, 290, 370, 290, 290, 290, 370, 290, 350, 350, 430, 350, 290, 290, 370, 290,
// AU.CG..GU
170, 170, 250, 170, 410, 410, 490, 410, 290, 290, 370, 290, 410, 410, 490, 410,
// AU.CU..GU
350, 350, 430, 350, 290, 290, 370, 290, 350, 350, 430, 350, 190, 190, 270, 190,
// AU.GA..GU
170, 340, 290, 340, 170, 340, 290, 340, 50, 220, 170, 220, 290, 460, 410, 460,
// AU.GC..GU
170, 340, 290, 340, 170, 340, 290, 340, 230, 400, 350, 400, 170, 340, 290, 340,
// AU.GG..GU
50, 220, 170, 220, 290, 460, 410, 460, 170, 340, 290, 340, 290, 460, 410, 460,
// AU.GU..GU
230, 400, 350, 400, 170, 340, 290, 340, 230, 400, 350, 400, 70, 240, 190, 240,
// AU.UA..GU
360, 290, 360, 190, 360, 290, 360, 190, 240, 170, 240, 70, 480, 410, 480, 310,
// AU.UC..GU
360, 290, 360, 190, 360, 290, 360, 190, 420, 350, 420, 250, 360, 290, 360, 190,
// AU.UG..GU
240, 170, 240, 70, 480, 410, 480, 310, 360, 290, 360, 190, 480, 410, 480, 310,
// AU.UU..GU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// AU.AA..UG
240, 240, 120, 290, 240, 240, 120, 290, 120, 120, 0, 170, 310, 310, 190, 360,
// AU.AC..UG
240, 240, 120, 290, 240, 240, 120, 290, 240, 240, 120, 290, 240, 240, 120, 290,
// AU.AG..UG
120, 120, 0, 170, 330, 330, 210, 380, 240, 240, 120, 290, 310, 310, 190, 360,
// AU.AU..UG
260, 260, 140, 310, 240, 240, 120, 290, 240, 240, 120, 290, 140, 140, 20, 190,
// AU.CA..UG
240, 240, 320, 240, 240, 240, 320, 240, 120, 120, 200, 120, 310, 310, 390, 310,
// AU.CC..UG
240, 240, 320, 240, 240, 240, 320, 240, 240, 240, 320, 240, 240, 240, 320, 240,
// AU.CG..UG
120, 120, 200, 120, 330, 330, 410, 330, 240, 240, 320, 240, 310, 310, 390, 310,
// AU.CU..UG
260, 260, 340, 260, 240, 240, 320, 240, 240, 240, 320, 240, 140, 140, 220, 140,
// AU.GA..UG
120, 290, 240, 290, 120, 290, 240, 290, 0, 170, 120, 170, 190, 360, 310, 360,
// AU.GC..UG
120, 290, 240, 290, 120, 290, 240, 290, 120, 290, 240, 290, 120, 290, 240, 290,
// AU.GG..UG
0, 170, 120, 170, 210, 380, 330, 380, 120, 290, 240, 290, 190, 360, 310, 360,
// AU.GU..UG
140, 310, 260, 310, 120, 290, 240, 290, 120, 290, 240, 290, 20, 190, 140, 190,
// AU.UA..UG
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 380, 310, 380, 210,
// AU.UC..UG
310, 240, 310, 140, 310, 240, 310, 140, 310, 240, 310, 140, 310, 240, 310, 140,
// AU.UG..UG
190, 120, 190, 20, 400, 330, 400, 230, 310, 240, 310, 140, 380, 310, 380, 210,
// AU.UU..UG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// CG.AA..AU
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 360, 360, 240, 320,
// CG.AC..AU
240, 240, 120, 200, 240, 240, 120, 200, 300, 300, 180, 260, 240, 240, 120, 200,
// CG.AG..AU
120, 120, 0, 80, 360, 360, 240, 320, 240, 240, 120, 200, 360, 360, 240, 320,
// CG.AU..AU
300, 300, 180, 260, 240, 240, 120, 200, 300, 300, 180, 260, 140, 140, 20, 100,
// CG.CA..AU
240, 240, 290, 240, 240, 240, 290, 240, 120, 120, 170, 120, 360, 360, 410, 360,
// CG.CC..AU
240, 240, 290, 240, 240, 240, 290, 240, 300, 300, 350, 300, 240, 240, 290, 240,
// CG.CG..AU
120, 120, 170, 120, 360, 360, 410, 360, 240, 240, 290, 240, 360, 360, 410, 360,
// CG.CU..AU
300, 300, 350, 300, 240, 240, 290, 240, 300, 300, 350, 300, 140, 140, 190, 140,
// CG.GA..AU
120, 200, 240, 200, 120, 200, 240, 200, 0, 80, 120, 80, 240, 320, 360, 320,
// CG.GC..AU
120, 200, 240, 200, 120, 200, 240, 200, 180, 260, 300, 260, 120, 200, 240, 200,
// CG.GG..AU
0, 80, 120, 80, 240, 320, 360, 320, 120, 200, 240, 200, 240, 320, 360, 320,
// CG.GU..AU
180, 260, 300, 260, 120, 200, 240, 200, 180, 260, 300, 260, 20, 100, 140, 100,
// CG.UA..AU
250, 240, 250, 140, 250, 240, 250, 140, 130, 120, 130, 20, 370, 360, 370, 260,
// CG.UC..AU
250, 240, 250, 140, 250, 240, 250, 140, 310, 300, 310, 200, 250, 240, 250, 140,
// CG.UG..AU
130, 120, 130, 20, 370, 360, 370, 260, 250, 240, 250, 140, 370, 360, 370, 260,
// CG.UU..AU
310, 300, 310, 200, 250, 240, 250, 140, 310, 300, 310, 200, 150, 140, 150, 40,
// CG.AA..CG
190, 190, 70, 150, 190, 190, 70, 150, 70, 70, -50, 30, 260, 260, 140, 220,
// CG.AC..CG
190, 190, 70, 150, 190, 190, 70, 150, 190, 190, 70, 150, 190, 190, 70, 150,
// CG.AG..CG
70, 70, -50, 30, 280, 280, 160, 240, 190, 190, 70, 150, 260, 260, 140, 220,
// CG.AU..CG
210, 210, 90, 170, 190, 190, 70, 150, 190, 190, 70, 150, 90, 90, -30, 50,
// CG.CA..CG
190, 190, 240, 190, 190, 190, 240, 190, 70, 70, 120, 70, 260, 260, 310, 260,
// CG.CC..CG
190, 190, 240, 190, 190, 190, 240, 190, 190, 190, 240, 190, 190, 190, 240, 190,
// CG.CG..CG
70, 70, 120, 70, 280, 280, 330, 280, 190, 190, 240, 190, 260, 260, 310, 260,
// CG.CU..CG
210, 210, 260, 210, 190, 190, 240, 190, 190, 190, 240, 190, 90, 90, 140, 90,
// CG.GA..CG
70, 150, 190, 150, 70, 150, 190, 150, -50, 30, 70, 30, 140, 220, 260, 220,
// CG.GC..CG
70, 150, 190, 150, 70, 150, 190, 150, 70, 150, 190, 150, 70, 150, 190, 150,
// CG.GG..CG
-50, 30, 70, 30, 160, 240, 280, 240, 70, 150, 190, 150, 140, 220, 260, 220,
// CG.GU..CG
90, 170, 210, 170, 70, 150, 190, 150, 70, 150, 190, 150, -30, 50, 90, 50,
// CG.UA..CG
200, 190, 200, 90, 200, 190, 200, 90, 80, 70, 80, -30, 270, 260, 270, 160,
// CG.UC..CG
200, 190, 200, 90, 200, 190, 200, 90, 200, 190, 200, 90, 200, 190, 200, 90,
// CG.UG..CG
80, 70, 80, -30, 290, 280, 290, 180, 200, 190, 200, 90, 270, 260, 270, 160,
// CG.UU..CG
220, 210, 220, 110, 200, 190, 200, 90, 200, 190, 200, 90, 100, 90, 100, -10,
// CG.AA..GC
190, 190, 70, 150, 190, 190, 70, 150, 70, 70, -50, 30, 200, 200, 80, 160,
// CG.AC..GC
190, 190, 70, 150, 190, 190, 70, 150, 150, 150, 30, 110, 190, 190, 70, 150,
// CG.AG..GC
70, 70, -50, 30, 240, 240, 120, 200, 190, 190, 70, 150, 200, 200, 80, 160,
// CG.AU..GC
150, 150, 30, 110, 190, 190, 70, 150, 150, 150, 30, 110, 90, 90, -30, 50,
// CG.CA..GC
190, 190, 240, 190, 190, 190, 240, 190, 70, 70, 120, 70, 200, 200, 250, 200,
// CG.CC..GC
190, 190, 240, 190, 190, 190, 240, 190, 150, 150, 200, 150, 190, 190, 240, 190,
// CG.CG..GC
70, 70, 120, 70, 240, 240, 290, 240, 190, 190, 240, 190, 200, 200, 250, 200,
// CG.CU..GC
150, 150, 200, 150, 190, 190, 240, 190, 150, 150, 200, 150, 90, 90, 140, 90,
// CG.GA..GC
70, 150, 190, 150, 70, 150, 190, 150, -50, 30, 70, 30, 80, 160, 200, 160,
// CG.GC..GC
70, 150, 190, 150, 70, 150, 190, 150, 30, 110, 150, 110, 70, 150, 190, 150,
// CG.GG..GC
-50, 30, 70, 30, 120, 200, 240, 200, 70, 150, 190, 150, 80, 160, 200, 160,
// CG.GU..GC
30, 110, 150, 110, 70, 150, 190, 150, 30, 110, 150, 110, -30, 50, 90, 50,
// CG.UA..GC
200, 190, 200, 90, 200, 190, 200, 90, 80, 70, 80, -30, 210, 200, 210, 100,
// CG.UC..GC
200, 190, 200, 90, 200, 190, 200, 90, 160, 150, 160, 50, 200, 190, 200, 90,
// CG.UG..GC
80, 70, 80, -30, 250, 240, 250, 140, 200, 190, 200, 90, 210, 200, 210, 100,
// CG.UU..GC
160, 150, 160, 50, 200, 190, 200, 90, 160, 150, 160, 50, 100, 90, 100, -10,
// CG.AA..UA
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 310, 310, 190, 270,
// CG.AC..UA
240, 240, 120, 200, 240, 240, 120, 200, 290, 290, 170, 250, 240, 240, 120, 200,
// CG.AG..UA
120, 120, 0, 80, 320, 320, 200, 280, 240, 240, 120, 200, 310, 310, 190, 270,
// CG.AU..UA
290, 290, 170, 250, 240, 240, 120, 200, 290, 290, 170, 250, 140, 140, 20, 100,
// CG.CA..UA
240, 240, 290, 240, 240, 240, 290, 240, 120, 120, 170, 120, 310, 310, 360, 310,
// CG.CC..UA
240, 240, 290, 240, 240, 240, 290, 240, 290, 290, 340, 290, 240, 240, 290, 240,
// CG.CG..UA
120, 120, 170, 120, 320, 320, 370, 320, 240, 240, 290, 240, 310, 310, 360, 310,
// CG.CU..UA
290, 290, 340, 290, 240, 240, 290, 240, 290, 290, 340, 290, 140, 140, 190, 140,
// CG.GA..UA
120, 200, 240, 200, 120, 200, 240, 200, 0, 80, 120, 80, 190, 270, 310, 270,
// CG.GC..UA
120, 200, 240, 200, 120, 200, 240, 200, 170, 250, 290, 250, 120, 200, 240, 200,
// CG.GG..UA
0, 80, 120, 80, 200, 280, 320, 280, 120, 200, 240, 200, 190, 270, 310, 270,
// CG.GU..UA
170, 250, 290, 250, 120, 200, 240, 200, 170, 250, 290, 250, 20, 100, 140, 100,
// CG.UA..UA
250, 240, 250, 140, 250, 240, 250, 140, 130, 120, 130, 20, 320, 310, 320, 210,
// CG.UC..UA
250, 240, 250, 140, 250, 240, 250, 140, 300, 290, 300, 190, 250, 240, 250, 140,
// CG.UG..UA
130, 120, 130, 20, 330, 320, 330, 220, 250, 240, 250, 140, 320, 310, 320, 210,
// CG.UU..UA
300, 290, 300, 190, 250, 240, 250, 140, 300, 290, 300, 190, 150, 140, 150, 40,
// CG.AA..GU
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 360, 360, 240, 320,
// CG.AC..GU
240, 240, 120, 200, 240, 240, 120, 200, 300, 300, 180, 260, 240, 240, 120, 200,
// CG.AG..GU
120, 120, 0, 80, 360, 360, 240, 320, 240, 240, 120, 200, 360, 360, 240, 320,
// CG.AU..GU
300, 300, 180, 260, 240, 240, 120, 200, 300, 300, 180, 260, 140, 140, 20, 100,
// CG.CA..GU
240, 240, 290, 240, 240, 240, 290, 240, 120, 120, 170, 120, 360, 360, 410, 360,
// CG.CC..GU
240, 240, 290, 240, 240, 240, 290, 240, 300, 300, 350, 300, 240, 240, 290, 240,
// CG.CG..GU
120, 120, 170, 120, 360, 360, 410, 360, 240, 240, 290, 240, 360, 360, 410, 360,
// CG.CU..GU
300, 300, 350, 300, 240, 240, 290, 240, 300, 300, 350, 300, 140, 140, 190, 140,
// CG.GA..GU
120, 200, 240, 200, 120, 200, 240, 200, 0, 80, 120, 80, 240, 320, 360, 320,
// CG.GC..GU
120, 200, 240, 200, 120, 200, 240, 200, 180, 260, 300, 260, 120, 200, 240, 200,
// CG.GG..GU
0, 80, 120, 80, 240, 320, 360, 320, 120, 200, 240, 200, 240, 320, 360, 320,
// CG.GU..GU
180, 260, 300, 260, 120, 200, 240, 200, 180, 260, 300, 260, 20, 100, 140, 100,
// CG.UA..GU
250, 240, 250, 140, 250, 240, 250, 140, 130, 120, 130, 20, 370, 360, 370, 260,
// CG.UC..GU
250, 240, 250, 140, 250, 240, 250, 140, 310, 300, 310, 200, 250, 240, 250, 140,
// CG.UG..GU
130, 120, 130, 20, 370, 360, 370, 260, 250, 240, 250, 140, 370, 360, 370, 260,
// CG.UU..GU
310, 300, 310, 200, 250, 240, 250, 140, 310, 300, 310, 200, 150, 140, 150, 40,
// CG.AA..UG
190, 190, 70, 150, 190, 190, 70, 150, 70, 70, -50, 30, 260, 260, 140, 220,
// CG.AC..UG
190, 190, 70, 150, 190, 190, 70, 150, 190, 190, 70, 150, 190, 190, 70, 150,
// CG.AG..UG
70, 70, -50, 30, 280, 280, 160, 240, 190, 190, 70, 150, 260, 260, 140, 220,
// CG.AU..UG
210, 210, 90, 170, 190, 190, 70, 150, 190, 190, 70, 150, 90, 90, -30, 50,
// CG.CA..UG
190, 190, 240, 190, 190, 190, 240, 190, 70, 70, 120, 70, 260, 260, 310, 260,
// CG.CC..UG
190, 190, 240, 190, 190, 190, 240, 190, 190, 190, 240, 190, 190, 190, 240, 190,
// CG.CG..UG
70, 70, 120, 70, 280, 280, 330, 280, 190, 190, 240, 190, 260, 260, 310, 260,
// CG.CU..UG
210, 210, 260, 210, 190, 190, 240, 190, 190, 190, 240, 190, 90, 90, 140, 90,
// CG.GA..UG
70, 150, 190, 150, 70, 150, 190, 150, -50, 30, 70, 30, 140, 220, 260, 220,
// CG.GC..UG
70, 150, 190, 150, 70, 150, 190, 150, 70, 150, 190, 150, 70, 150, 190, 150,
// CG.GG..UG
-50, 30, 70, 30, 160, 240, 280, 240, 70, 150, 190, 150, 140, 220, 260, 220,
// CG.GU..UG
90, 170, 210, 170, 70, 150, 190, 150, 70, 150, 190, 150, -30, 50, 90, 50,
// CG.UA..UG
200, 190, 200, 90, 200, 190, 200, 90, 80, 70, 80, -30, 270, 260, 270, 160,
// CG.UC..UG
200, 190, 200, 90, 200, 190, 200, 90, 200, 190, 200, 90, 200, 190, 200, 90,
// CG.UG..UG
80, 70, 80, -30, 290, 280, 290, 180, 200, 190, 200, 90, 270, 260, 270, 160,
// CG.UU..UG
220, 210, 220, 110, 200, 190, 200, 90, 200, 190, 200, 90, 100, 90, 100, -10,
// GC.AA..AU
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 360, 360, 240, 380,
// GC.AC..AU
240, 240, 120, 260, 240, 240, 120, 260, 300, 300, 180, 320, 240, 240, 120, 260,
// GC.AG..AU
120, 120, 0, 140, 360, 360, 240, 380, 240, 240, 120, 260, 360, 360, 240, 380,
// GC.AU..AU
300, 300, 180, 320, 240, 240, 120, 260, 300, 300, 180, 320, 140, 140, 20, 160,
// GC.CA..AU
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 360, 360, 450, 360,
// GC.CC..AU
240, 240, 330, 240, 240, 240, 330, 240, 300, 300, 390, 300, 240, 240, 330, 240,
// GC.CG..AU
120, 120, 210, 120, 360, 360, 450, 360, 240, 240, 330, 240, 360, 360, 450, 360,
// GC.CU..AU
300, 300, 390, 300, 240, 240, 330, 240, 300, 300, 390, 300, 140, 140, 230, 140,
// GC.GA..AU
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 240, 360, 360, 360,
// GC.GC..AU
120, 240, 240, 240, 120, 240, 240, 240, 180, 300, 300, 300, 120, 240, 240, 240,
// GC.GG..AU
0, 120, 120, 120, 240, 360, 360, 360, 120, 240, 240, 240, 240, 360, 360, 360,
// GC.GU..AU
180, 300, 300, 300, 120, 240, 240, 240, 180, 300, 300, 300, 20, 140, 140, 140,
// GC.UA..AU
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 430, 360, 430, 260,
// GC.UC..AU
310, 240, 310, 140, 310, 240, 310, 140, 370, 300, 370, 200, 310, 240, 310, 140,
// GC.UG..AU
190, 120, 190, 20, 430, 360, 430, 260, 310, 240, 310, 140, 430, 360, 430, 260,
// GC.UU..AU
370, 300, 370, 200, 310, 240, 310, 140, 370, 300, 370, 200, 210, 140, 210, 40,
// GC.AA..CG
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 260, 260, 140, 280,
// GC.AC..CG
190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210,
// GC.AG..CG
70, 70, -50, 90, 280, 280, 160, 300, 190, 190, 70, 210, 260, 260, 140, 280,
// GC.AU..CG
210, 210, 90, 230, 190, 190, 70, 210, 190, 190, 70, 210, 90, 90, -30, 110,
// GC.CA..CG
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 260, 260, 350, 260,
// GC.CC..CG
190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190,
// GC.CG..CG
70, 70, 160, 70, 280, 280, 370, 280, 190, 190, 280, 190, 260, 260, 350, 260,
// GC.CU..CG
210, 210, 300, 210, 190, 190, 280, 190, 190, 190, 280, 190, 90, 90, 180, 90,
// GC.GA..CG
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 140, 260, 260, 260,
// GC.GC..CG
70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190,
// GC.GG..CG
-50, 70, 70, 70, 160, 280, 280, 280, 70, 190, 190, 190, 140, 260, 260, 260,
// GC.GU..CG
90, 210, 210, 210, 70, 190, 190, 190, 70, 190, 190, 190, -30, 90, 90, 90,
// GC.UA..CG
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 330, 260, 330, 160,
// GC.UC..CG
260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90,
// GC.UG..CG
140, 70, 140, -30, 350, 280, 350, 180, 260, 190, 260, 90, 330, 260, 330, 160,
// GC.UU..CG
280, 210, 280, 110, 260, 190, 260, 90, 260, 190, 260, 90, 160, 90, 160, -10,
// GC.AA..GC
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 200, 200, 80, 220,
// GC.AC..GC
190, 190, 70, 210, 190, 190, 70, 210, 150, 150, 30, 170, 190, 190, 70, 210,
// GC.AG..GC
70, 70, -50, 90, 240, 240, 120, 260, 190, 190, 70, 210, 200, 200, 80, 220,
// GC.AU..GC
150, 150, 30, 170, 190, 190, 70, 210, 150, 150, 30, 170, 90, 90, -30, 110,
// GC.CA..GC
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 200, 200, 290, 200,
// GC.CC..GC
190, 190, 280, 190, 190, 190, 280, 190, 150, 150, 240, 150, 190, 190, 280, 190,
// GC.CG..GC
70, 70, 160, 70, 240, 240, 330, 240, 190, 190, 280, 190, 200, 200, 290, 200,
// GC.CU..GC
150, 150, 240, 150, 190, 190, 280, 190, 150, 150, 240, 150, 90, 90, 180, 90,
// GC.GA..GC
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 80, 200, 200, 200,
// GC.GC..GC
70, 190, 190, 190, 70, 190, 190, 190, 30, 150, 150, 150, 70, 190, 190, 190,
// GC.GG..GC
-50, 70, 70, 70, 120, 240, 240, 240, 70, 190, 190, 190, 80, 200, 200, 200,
// GC.GU..GC
30, 150, 150, 150, 70, 190, 190, 190, 30, 150, 150, 150, -30, 90, 90, 90,
// GC.UA..GC
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 270, 200, 270, 100,
// GC.UC..GC
260, 190, 260, 90, 260, 190, 260, 90, 220, 150, 220, 50, 260, 190, 260, 90,
// GC.UG..GC
140, 70, 140, -30, 310, 240, 310, 140, 260, 190, 260, 90, 270, 200, 270, 100,
// GC.UU..GC
220, 150, 220, 50, 260, 190, 260, 90, 220, 150, 220, 50, 160, 90, 160, -10,
// GC.AA..UA
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GC.AC..UA
240, 240, 120, 260, 240, 240, 120, 260, 290, 290, 170, 310, 240, 240, 120, 260,
// GC.AG..UA
120, 120, 0, 140, 320, 320, 200, 340, 240, 240, 120, 260, 310, 310, 190, 330,
// GC.AU..UA
290, 290, 170, 310, 240, 240, 120, 260, 290, 290, 170, 310, 140, 140, 20, 160,
// GC.CA..UA
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 310, 310, 400, 310,
// GC.CC..UA
240, 240, 330, 240, 240, 240, 330, 240, 290, 290, 380, 290, 240, 240, 330, 240,
// GC.CG..UA
120, 120, 210, 120, 320, 320, 410, 320, 240, 240, 330, 240, 310, 310, 400, 310,
// GC.CU..UA
290, 290, 380, 290, 240, 240, 330, 240, 290, 290, 380, 290, 140, 140, 230, 140,
// GC.GA..UA
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 190, 310, 310, 310,
// GC.GC..UA
120, 240, 240, 240, 120, 240, 240, 240, 170, 290, 290, 290, 120, 240, 240, 240,
// GC.GG..UA
0, 120, 120, 120, 200, 320, 320, 320, 120, 240, 240, 240, 190, 310, 310, 310,
// GC.GU..UA
170, 290, 290, 290, 120, 240, 240, 240, 170, 290, 290, 290, 20, 140, 140, 140,
// GC.UA..UA
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 380, 310, 380, 210,
// GC.UC..UA
310, 240, 310, 140, 310, 240, 310, 140, 360, 290, 360, 190, 310, 240, 310, 140,
// GC.UG..UA
190, 120, 190, 20, 390, 320, 390, 220, 310, 240, 310, 140, 380, 310, 380, 210,
// GC.UU..UA
360, 290, 360, 190, 310, 240, 310, 140, 360, 290, 360, 190, 210, 140, 210, 40,
// GC.AA..GU
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 360, 360, 240, 380,
// GC.AC..GU
240, 240, 120, 260, 240, 240, 120, 260, 300, 300, 180, 320, 240, 240, 120, 260,
// GC.AG..GU
120, 120, 0, 140, 360, 360, 240, 380, 240, 240, 120, 260, 360, 360, 240, 380,
// GC.AU..GU
300, 300, 180, 320, 240, 240, 120, 260, 300, 300, 180, 320, 140, 140, 20, 160,
// GC.CA..GU
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 360, 360, 450, 360,
// GC.CC..GU
240, 240, 330, 240, 240, 240, 330, 240, 300, 300, 390, 300, 240, 240, 330, 240,
// GC.CG..GU
120, 120, 210, 120, 360, 360, 450, 360, 240, 240, 330, 240, 360, 360, 450, 360,
// GC.CU..GU
300, 300, 390, 300, 240, 240, 330, 240, 300, 300, 390, 300, 140, 140, 230, 140,
// GC.GA..GU
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 240, 360, 360, 360,
// GC.GC..GU
120, 240, 240, 240, 120, 240, 240, 240, 180, 300, 300, 300, 120, 240, 240, 240,
// GC.GG..GU
0, 120, 120, 120, 240, 360, 360, 360, 120, 240, 240, 240, 240, 360, 360, 360,
// GC.GU..GU
180, 300, 300, 300, 120, 240, 240, 240, 180, 300, 300, 300, 20, 140, 140, 140,
// GC.UA..GU
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 430, 360, 430, 260,
// GC.UC..GU
310, 240, 310, 140, 310, 240, 310, 140, 370, 300, 370, 200, 310, 240, 310, 140,
// GC.UG..GU
190, 120, 190, 20, 430, 360, 430, 260, 310, 240, 310, 140, 430, 360, 430, 260,
// GC.UU..GU
370, 300, 370, 200, 310, 240, 310, 140, 370, 300, 370, 200, 210, 140, 210, 40,
// GC.AA..UG
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 260, 260, 140, 280,
// GC.AC..UG
190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210,
// GC.AG..UG
70, 70, -50, 90, 280, 280, 160, 300, 190, 190, 70, 210, 260, 260, 140, 280,
// GC.AU..UG
210, 210, 90, 230, 190, 190, 70, 210, 190, 190, 70, 210, 90, 90, -30, 110,
// GC.CA..UG
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 260, 260, 350, 260,
// GC.CC..UG
190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190,
// GC.CG..UG
70, 70, 160, 70, 280, 280, 370, 280, 190, 190, 280, 190, 260, 260, 350, 260,
// GC.CU..UG
210, 210, 300, 210, 190, 190, 280, 190, 190, 190, 280, 190, 90, 90, 180, 90,
// GC.GA..UG
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 140, 260, 260, 260,
// GC.GC..UG
70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190,
// GC.GG..UG
-50, 70, 70, 70, 160, 280, 280, 280, 70, 190, 190, 190, 140, 260, 260, 260,
// GC.GU..UG
90, 210, 210, 210, 70, 190, 190, 190, 70, 190, 190, 190, -30, 90, 90, 90,
// GC.UA..UG
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 330, 260, 330, 160,
// GC.UC..UG
260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90,
// GC.UG..UG
140, 70, 140, -30, 350, 280, 350, 180, 260, 190, 260, 90, 330, 260, 330, 160,
// GC.UU..UG
280, 210, 280, 110, 260, 190, 260, 90, 260, 190, 260, 90, 160, 90, 160, -10,
// UA.AA..AU
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 410, 410, 290, 470,
// UA.AC..AU
290, 290, 170, 350, 290, 290, 170, 350, 350, 350, 230, 410, 290, 290, 170, 350,
// UA.AG..AU
170, 170, 50, 230, 410, 410, 290, 470, 290, 290, 170, 350, 410, 410, 290, 470,
// UA.AU..AU
350, 350, 230, 410, 290, 290, 170, 350, 350, 350, 230, 410, 190, 190, 70, 250,
// UA.CA..AU
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 410, 410, 530, 410,
// UA.CC..AU
290, 290, 410, 290, 290, 290, 410, 290, 350, 350, 470, 350, 290, 290, 410, 290,
// UA.CG..AU
170, 170, 290, 170, 410, 410, 530, 410, 290, 290, 410, 290, 410, 410, 530, 410,
// UA.CU..AU
350, 350, 470, 350, 290, 290, 410, 290, 350, 350, 470, 350, 190, 190, 310, 190,
// UA.GA..AU
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 290, 470, 410, 470,
// UA.GC..AU
170, 350, 290, 350, 170, 350, 290, 350, 230, 410, 350, 410, 170, 350, 290, 350,
// UA.GG..AU
50, 230, 170, 230, 290, 470, 410, 470, 170, 350, 290, 350, 290, 470, 410, 470,
// UA.GU..AU
230, 410, 350, 410, 170, 350, 290, 350, 230, 410, 350, 410, 70, 250, 190, 250,
// UA.UA..AU
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 530, 410, 530, 310,
// UA.UC..AU
410, 290, 410, 190, 410, 290, 410, 190, 470, 350, 470, 250, 410, 290, 410, 190,
// UA.UG..AU
290, 170, 290, 70, 530, 410, 530, 310, 410, 290, 410, 190, 530, 410, 530, 310,
// UA.UU..AU
470, 350, 470, 250, 410, 290, 410, 190, 470, 350, 470, 250, 310, 190, 310, 90,
// UA.AA..CG
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 310, 310, 190, 370,
// UA.AC..CG
240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300,
// UA.AG..CG
120, 120, 0, 180, 330, 330, 210, 390, 240, 240, 120, 300, 310, 310, 190, 370,
// UA.AU..CG
260, 260, 140, 320, 240, 240, 120, 300, 240, 240, 120, 300, 140, 140, 20, 200,
// UA.CA..CG
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 310, 310, 430, 310,
// UA.CC..CG
240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240,
// UA.CG..CG
120, 120, 240, 120, 330, 330, 450, 330, 240, 240, 360, 240, 310, 310, 430, 310,
// UA.CU..CG
260, 260, 380, 260, 240, 240, 360, 240, 240, 240, 360, 240, 140, 140, 260, 140,
// UA.GA..CG
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 190, 370, 310, 370,
// UA.GC..CG
120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300,
// UA.GG..CG
0, 180, 120, 180, 210, 390, 330, 390, 120, 300, 240, 300, 190, 370, 310, 370,
// UA.GU..CG
140, 320, 260, 320, 120, 300, 240, 300, 120, 300, 240, 300, 20, 200, 140, 200,
// UA.UA..CG
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 430, 310, 430, 210,
// UA.UC..CG
360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140,
// UA.UG..CG
240, 120, 240, 20, 450, 330, 450, 230, 360, 240, 360, 140, 430, 310, 430, 210,
// UA.UU..CG
380, 260, 380, 160, 360, 240, 360, 140, 360, 240, 360, 140, 260, 140, 260, 40,
// UA.AA..GC
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 250, 250, 130, 310,
// UA.AC..GC
240, 240, 120, 300, 240, 240, 120, 300, 200, 200, 80, 260, 240, 240, 120, 300,
// UA.AG..GC
120, 120, 0, 180, 290, 290, 170, 350, 240, 240, 120, 300, 250, 250, 130, 310,
// UA.AU..GC
200, 200, 80, 260, 240, 240, 120, 300, 200, 200, 80, 260, 140, 140, 20, 200,
// UA.CA..GC
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 250, 250, 370, 250,
// UA.CC..GC
240, 240, 360, 240, 240, 240, 360, 240, 200, 200, 320, 200, 240, 240, 360, 240,
// UA.CG..GC
120, 120, 240, 120, 290, 290, 410, 290, 240, 240, 360, 240, 250, 250, 370, 250,
// UA.CU..GC
200, 200, 320, 200, 240, 240, 360, 240, 200, 200, 320, 200, 140, 140, 260, 140,
// UA.GA..GC
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 130, 310, 250, 310,
// UA.GC..GC
120, 300, 240, 300, 120, 300, 240, 300, 80, 260, 200, 260, 120, 300, 240, 300,
// UA.GG..GC
0, 180, 120, 180, 170, 350, 290, 350, 120, 300, 240, 300, 130, 310, 250, 310,
// UA.GU..GC
80, 260, 200, 260, 120, 300, 240, 300, 80, 260, 200, 260, 20, 200, 140, 200,
// UA.UA..GC
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 370, 250, 370, 150,
// UA.UC..GC
360, 240, 360, 140, 360, 240, 360, 140, 320, 200, 320, 100, 360, 240, 360, 140,
// UA.UG..GC
240, 120, 240, 20, 410, 290, 410, 190, 360, 240, 360, 140, 370, 250, 370, 150,
// UA.UU..GC
320, 200, 320, 100, 360, 240, 360, 140, 320, 200, 320, 100, 260, 140, 260, 40,
// UA.AA..UA
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UA.AC..UA
290, 290, 170, 350, 290, 290, 170, 350, 340, 340, 220, 400, 290, 290, 170, 350,
// UA.AG..UA
170, 170, 50, 230, 370, 370, 250, 430, 290, 290, 170, 350, 360, 360, 240, 420,
// UA.AU..UA
340, 340, 220, 400, 290, 290, 170, 350, 340, 340, 220, 400, 190, 190, 70, 250,
// UA.CA..UA
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 360, 360, 480, 360,
// UA.CC..UA
290, 290, 410, 290, 290, 290, 410, 290, 340, 340, 460, 340, 290, 290, 410, 290,
// UA.CG..UA
170, 170, 290, 170, 370, 370, 490, 370, 290, 290, 410, 290, 360, 360, 480, 360,
// UA.CU..UA
340, 340, 460, 340, 290, 290, 410, 290, 340, 340, 460, 340, 190, 190, 310, 190,
// UA.GA..UA
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 240, 420, 360, 420,
// UA.GC..UA
170, 350, 290, 350, 170, 350, 290, 350, 220, 400, 340, 400, 170, 350, 290, 350,
// UA.GG..UA
50, 230, 170, 230, 250, 430, 370, 430, 170, 350, 290, 350, 240, 420, 360, 420,
// UA.GU..UA
220, 400, 340, 400, 170, 350, 290, 350, 220, 400, 340, 400, 70, 250, 190, 250,
// UA.UA..UA
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 480, 360, 480, 260,
// UA.UC..UA
410, 290, 410, 190, 410, 290, 410, 190, 460, 340, 460, 240, 410, 290, 410, 190,
// UA.UG..UA
290, 170, 290, 70, 490, 370, 490, 270, 410, 290, 410, 190, 480, 360, 480, 260,
// UA.UU..UA
460, 340, 460, 240, 410, 290, 410, 190, 460, 340, 460, 240, 310, 190, 310, 90,
// UA.AA..GU
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 410, 410, 290, 470,
// UA.AC..GU
290, 290, 170, 350, 290, 290, 170, 350, 350, 350, 230, 410, 290, 290, 170, 350,
// UA.AG..GU
170, 170, 50, 230, 410, 410, 290, 470, 290, 290, 170, 350, 410, 410, 290, 470,
// UA.AU..GU
350, 350, 230, 410, 290, 290, 170, 350, 350, 350, 230, 410, 190, 190, 70, 250,
// UA.CA..GU
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 410, 410, 530, 410,
// UA.CC..GU
290, 290, 410, 290, 290, 290, 410, 290, 350, 350, 470, 350, 290, 290, 410, 290,
// UA.CG..GU
170, 170, 290, 170, 410, 410, 530, 410, 290, 290, 410, 290, 410, 410, 530, 410,
// UA.CU..GU
350, 350, 470, 350, 290, 290, 410, 290, 350, 350, 470, 350, 190, 190, 310, 190,
// UA.GA..GU
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 290, 470, 410, 470,
// UA.GC..GU
170, 350, 290, 350, 170, 350, 290, 350, 230, 410, 350, 410, 170, 350, 290, 350,
// UA.GG..GU
50, 230, 170, 230, 290, 470, 410, 470, 170, 350, 290, 350, 290, 470, 410, 470,
// UA.GU..GU
230, 410, 350, 410, 170, 350, 290, 350, 230, 410, 350, 410, 70, 250, 190, 250,
// UA.UA..GU
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 530, 410, 530, 310,
// UA.UC..GU
410, 290, 410, 190, 410, 290, 410, 190, 470, 350, 470, 250, 410, 290, 410, 190,
// UA.UG..GU
290, 170, 290, 70, 530, 410, 530, 310, 410, 290, 410, 190, 530, 410, 530, 310,
// UA.UU..GU
470, 350, 470, 250, 410, 290, 410, 190, 470, 350, 470, 250, 310, 190, 310, 90,
// UA.AA..UG
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 310, 310, 190, 370,
// UA.AC..UG
240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300,
// UA.AG..UG
120, 120, 0, 180, 330, 330, 210, 390, 240, 240, 120, 300, 310, 310, 190, 370,
// UA.AU..UG
260, 260, 140, 320, 240, 240, 120, 300, 240, 240, 120, 300, 140, 140, 20, 200,
// UA.CA..UG
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 310, 310, 430, 310,
// UA.CC..UG
240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240,
// UA.CG..UG
120, 120, 240, 120, 330, 330, 450, 330, 240, 240, 360, 240, 310, 310, 430, 310,
// UA.CU..UG
260, 260, 380, 260, 240, 240, 360, 240, 240, 240, 360, 240, 140, 140, 260, 140,
// UA.GA..UG
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 190, 370, 310, 370,
// UA.GC..UG
120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300,
// UA.GG..UG
0, 180, 120, 180, 210, 390, 330, 390, 120, 300, 240, 300, 190, 370, 310, 370,
// UA.GU..UG
140, 320, 260, 320, 120, 300, 240, 300, 120, 300, 240, 300, 20, 200, 140, 200,
// UA.UA..UG
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 430, 310, 430, 210,
// UA.UC..UG
360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140,
// UA.UG..UG
240, 120, 240, 20, 450, 330, 450, 230, 360, 240, 360, 140, 430, 310, 430, 210,
// UA.UU..UG
380, 260, 380, 160, 360, 240, 360, 140, 360, 240, 360, 140, 260, 140, 260, 40,
// GU.AA..AU
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 360, 360, 240, 380,
// GU.AC..AU
240, 240, 120, 260, 240, 240, 120, 260, 300, 300, 180, 320, 240, 240, 120, 260,
// GU.AG..AU
120, 120, 0, 140, 360, 360, 240, 380, 240, 240, 120, 260, 360, 360, 240, 380,
// GU.AU..AU
300, 300, 180, 320, 240, 240, 120, 260, 300, 300, 180, 320, 140, 140, 20, 160,
// GU.CA..AU
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 360, 360, 450, 360,
// GU.CC..AU
240, 240, 330, 240, 240, 240, 330, 240, 300, 300, 390, 300, 240, 240, 330, 240,
// GU.CG..AU
120, 120, 210, 120, 360, 360, 450, 360, 240, 240, 330, 240, 360, 360, 450, 360,
// GU.CU..AU
300, 300, 390, 300, 240, 240, 330, 240, 300, 300, 390, 300, 140, 140, 230, 140,
// GU.GA..AU
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 240, 360, 360, 360,
// GU.GC..AU
120, 240, 240, 240, 120, 240, 240, 240, 180, 300, 300, 300, 120, 240, 240, 240,
// GU.GG..AU
0, 120, 120, 120, 240, 360, 360, 360, 120, 240, 240, 240, 240, 360, 360, 360,
// GU.GU..AU
180, 300, 300, 300, 120, 240, 240, 240, 180, 300, 300, 300, 20, 140, 140, 140,
// GU.UA..AU
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 430, 360, 430, 260,
// GU.UC..AU
310, 240, 310, 140, 310, 240, 310, 140, 370, 300, 370, 200, 310, 240, 310, 140,
// GU.UG..AU
190, 120, 190, 20, 430, 360, 430, 260, 310, 240, 310, 140, 430, 360, 430, 260,
// GU.UU..AU
370, 300, 370, 200, 310, 240, 310, 140, 370, 300, 370, 200, 210, 140, 210, 40,
// GU.AA..CG
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 260, 260, 140, 280,
// GU.AC..CG
190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210,
// GU.AG..CG
70, 70, -50, 90, 280, 280, 160, 300, 190, 190, 70, 210, 260, 260, 140, 280,
// GU.AU..CG
210, 210, 90, 230, 190, 190, 70, 210, 190, 190, 70, 210, 90, 90, -30, 110,
// GU.CA..CG
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 260, 260, 350, 260,
// GU.CC..CG
190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190,
// GU.CG..CG
70, 70, 160, 70, 280, 280, 370, 280, 190, 190, 280, 190, 260, 260, 350, 260,
// GU.CU..CG
210, 210, 300, 210, 190, 190, 280, 190, 190, 190, 280, 190, 90, 90, 180, 90,
// GU.GA..CG
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 140, 260, 260, 260,
// GU.GC..CG
70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190,
// GU.GG..CG
-50, 70, 70, 70, 160, 280, 280, 280, 70, 190, 190, 190, 140, 260, 260, 260,
// GU.GU..CG
90, 210, 210, 210, 70, 190, 190, 190, 70, 190, 190, 190, -30, 90, 90, 90,
// GU.UA..CG
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 330, 260, 330, 160,
// GU.UC..CG
260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90,
// GU.UG..CG
140, 70, 140, -30, 350, 280, 350, 180, 260, 190, 260, 90, 330, 260, 330, 160,
// GU.UU..CG
280, 210, 280, 110, 260, 190, 260, 90, 260, 190, 260, 90, 160, 90, 160, -10,
// GU.AA..GC
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 200, 200, 80, 220,
// GU.AC..GC
190, 190, 70, 210, 190, 190, 70, 210, 150, 150, 30, 170, 190, 190, 70, 210,
// GU.AG..GC
70, 70, -50, 90, 240, 240, 120, 260, 190, 190, 70, 210, 200, 200, 80, 220,
// GU.AU..GC
150, 150, 30, 170, 190, 190, 70, 210, 150, 150, 30, 170, 90, 90, -30, 110,
// GU.CA..GC
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 200, 200, 290, 200,
// GU.CC..GC
190, 190, 280, 190, 190, 190, 280, 190, 150, 150, 240, 150, 190, 190, 280, 190,
// GU.CG..GC
70, 70, 160, 70, 240, 240, 330, 240, 190, 190, 280, 190, 200, 200, 290, 200,
// GU.CU..GC
150, 150, 240, 150, 190, 190, 280, 190, 150, 150, 240, 150, 90, 90, 180, 90,
// GU.GA..GC
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 80, 200, 200, 200,
// GU.GC..GC
70, 190, 190, 190, 70, 190, 190, 190, 30, 150, 150, 150, 70, 190, 190, 190,
// GU.GG..GC
-50, 70, 70, 70, 120, 240, 240, 240, 70, 190, 190, 190, 80, 200, 200, 200,
// GU.GU..GC
30, 150, 150, 150, 70, 190, 190, 190, 30, 150, 150, 150, -30, 90, 90, 90,
// GU.UA..GC
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 270, 200, 270, 100,
// GU.UC..GC
260, 190, 260, 90, 260, 190, 260, 90, 220, 150, 220, 50, 260, 190, 260, 90,
// GU.UG..GC
140, 70, 140, -30, 310, 240, 310, 140, 260, 190, 260, 90, 270, 200, 270, 100,
// GU.UU..GC
220, 150, 220, 50, 260, 190, 260, 90, 220, 150, 220, 50, 160, 90, 160, -10,
// GU.AA..UA
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GU.AC..UA
240, 240, 120, 260, 240, 240, 120, 260, 290, 290, 170, 310, 240, 240, 120, 260,
// GU.AG..UA
120, 120, 0, 140, 320, 320, 200, 340, 240, 240, 120, 260, 310, 310, 190, 330,
// GU.AU..UA
290, 290, 170, 310, 240, 240, 120, 260, 290, 290, 170, 310, 140, 140, 20, 160,
// GU.CA..UA
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 310, 310, 400, 310,
// GU.CC..UA
240, 240, 330, 240, 240, 240, 330, 240, 290, 290, 380, 290, 240, 240, 330, 240,
// GU.CG..UA
120, 120, 210, 120, 320, 320, 410, 320, 240, 240, 330, 240, 310, 310, 400, 310,
// GU.CU..UA
290, 290, 380, 290, 240, 240, 330, 240, 290, 290, 380, 290, 140, 140, 230, 140,
// GU.GA..UA
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 190, 310, 310, 310,
// GU.GC..UA
120, 240, 240, 240, 120, 240, 240, 240, 170, 290, 290, 290, 120, 240, 240, 240,
// GU.GG..UA
0, 120, 120, 120, 200, 320, 320, 320, 120, 240, 240, 240, 190, 310, 310, 310,
// GU.GU..UA
170, 290, 290, 290, 120, 240, 240, 240, 170, 290, 290, 290, 20, 140, 140, 140,
// GU.UA..UA
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 380, 310, 380, 210,
// GU.UC..UA
310, 240, 310, 140, 310, 240, 310, 140, 360, 290, 360, 190, 310, 240, 310, 140,
// GU.UG..UA
190, 120, 190, 20, 390, 320, 390, 220, 310, 240, 310, 140, 380, 310, 380, 210,
// GU.UU..UA
360, 290, 360, 190, 310, 240, 310, 140, 360, 290, 360, 190, 210, 140, 210, 40,
// GU.AA..GU
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 360, 360, 240, 380,
// GU.AC..GU
240, 240, 120, 260, 240, 240, 120, 260, 300, 300, 180, 320, 240, 240, 120, 260,
// GU.AG..GU
120, 120, 0, 140, 360, 360, 240, 380, 240, 240, 120, 260, 360, 360, 240, 380,
// GU.AU..GU
300, 300, 180, 320, 240, 240, 120, 260, 300, 300, 180, 320, 140, 140, 20, 160,
// GU.CA..GU
240, 240, 330, 240, 240, 240, 330, 240, 120, 120, 210, 120, 360, 360, 450, 360,
// GU.CC..GU
240, 240, 330, 240, 240, 240, 330, 240, 300, 300, 390, 300, 240, 240, 330, 240,
// GU.CG..GU
120, 120, 210, 120, 360, 360, 450, 360, 240, 240, 330, 240, 360, 360, 450, 360,
// GU.CU..GU
300, 300, 390, 300, 240, 240, 330, 240, 300, 300, 390, 300, 140, 140, 230, 140,
// GU.GA..GU
120, 240, 240, 240, 120, 240, 240, 240, 0, 120, 120, 120, 240, 360, 360, 360,
// GU.GC..GU
120, 240, 240, 240, 120, 240, 240, 240, 180, 300, 300, 300, 120, 240, 240, 240,
// GU.GG..GU
0, 120, 120, 120, 240, 360, 360, 360, 120, 240, 240, 240, 240, 360, 360, 360,
// GU.GU..GU
180, 300, 300, 300, 120, 240, 240, 240, 180, 300, 300, 300, 20, 140, 140, 140,
// GU.UA..GU
310, 240, 310, 140, 310, 240, 310, 140, 190, 120, 190, 20, 430, 360, 430, 260,
// GU.UC..GU
310, 240, 310, 140, 310, 240, 310, 140, 370, 300, 370, 200, 310, 240, 310, 140,
// GU.UG..GU
190, 120, 190, 20, 430, 360, 430, 260, 310, 240, 310, 140, 430, 360, 430, 260,
// GU.UU..GU
370, 300, 370, 200, 310, 240, 310, 140, 370, 300, 370, 200, 210, 140, 210, 40,
// GU.AA..UG
190, 190, 70, 210, 190, 190, 70, 210, 70, 70, -50, 90, 260, 260, 140, 280,
// GU.AC..UG
190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210, 190, 190, 70, 210,
// GU.AG..UG
70, 70, -50, 90, 280, 280, 160, 300, 190, 190, 70, 210, 260, 260, 140, 280,
// GU.AU..UG
210, 210, 90, 230, 190, 190, 70, 210, 190, 190, 70, 210, 90, 90, -30, 110,
// GU.CA..UG
190, 190, 280, 190, 190, 190, 280, 190, 70, 70, 160, 70, 260, 260, 350, 260,
// GU.CC..UG
190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190, 190, 190, 280, 190,
// GU.CG..UG
70, 70, 160, 70, 280, 280, 370, 280, 190, 190, 280, 190, 260, 260, 350, 260,
// GU.CU..UG
210, 210, 300, 210, 190, 190, 280, 190, 190, 190, 280, 190, 90, 90, 180, 90,
// GU.GA..UG
70, 190, 190, 190, 70, 190, 190, 190, -50, 70, 70, 70, 140, 260, 260, 260,
// GU.GC..UG
70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190, 70, 190, 190, 190,
// GU.GG..UG
-50, 70, 70, 70, 160, 280, 280, 280, 70, 190, 190, 190, 140, 260, 260, 260,
// GU.GU..UG
90, 210, 210, 210, 70, 190, 190, 190, 70, 190, 190, 190, -30, 90, 90, 90,
// GU.UA..UG
260, 190, 260, 90, 260, 190, 260, 90, 140, 70, 140, -30, 330, 260, 330, 160,
// GU.UC..UG
260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90, 260, 190, 260, 90,
// GU.UG..UG
140, 70, 140, -30, 350, 280, 350, 180, 260, 190, 260, 90, 330, 260, 330, 160,
// GU.UU..UG
280, 210, 280, 110, 260, 190, 260, 90, 260, 190, 260, 90, 160, 90, 160, -10,
// UG.AA..AU
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 410, 410, 290, 470,
// UG.AC..AU
290, 290, 170, 350, 290, 290, 170, 350, 350, 350, 230, 410, 290, 290, 170, 350,
// UG.AG..AU
170, 170, 50, 230, 410, 410, 290, 470, 290, 290, 170, 350, 410, 410, 290, 470,
// UG.AU..AU
350, 350, 230, 410, 290, 290, 170, 350, 350, 350, 230, 410, 190, 190, 70, 250,
// UG.CA..AU
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 410, 410, 530, 410,
// UG.CC..AU
290, 290, 410, 290, 290, 290, 410, 290, 350, 350, 470, 350, 290, 290, 410, 290,
// UG.CG..AU
170, 170, 290, 170, 410, 410, 530, 410, 290, 290, 410, 290, 410, 410, 530, 410,
// UG.CU..AU
350, 350, 470, 350, 290, 290, 410, 290, 350, 350, 470, 350, 190, 190, 310, 190,
// UG.GA..AU
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 290, 470, 410, 470,
// UG.GC..AU
170, 350, 290, 350, 170, 350, 290, 350, 230, 410, 350, 410, 170, 350, 290, 350,
// UG.GG..AU
50, 230, 170, 230, 290, 470, 410, 470, 170, 350, 290, 350, 290, 470, 410, 470,
// UG.GU..AU
230, 410, 350, 410, 170, 350, 290, 350, 230, 410, 350, 410, 70, 250, 190, 250,
// UG.UA..AU
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 530, 410, 530, 310,
// UG.UC..AU
410, 290, 410, 190, 410, 290, 410, 190, 470, 350, 470, 250, 410, 290, 410, 190,
// UG.UG..AU
290, 170, 290, 70, 530, 410, 530, 310, 410, 290, 410, 190, 530, 410, 530, 310,
// UG.UU..AU
470, 350, 470, 250, 410, 290, 410, 190, 470, 350, 470, 250, 310, 190, 310, 90,
// UG.AA..CG
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 310, 310, 190, 370,
// UG.AC..CG
240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300,
// UG.AG..CG
120, 120, 0, 180, 330, 330, 210, 390, 240, 240, 120, 300, 310, 310, 190, 370,
// UG.AU..CG
260, 260, 140, 320, 240, 240, 120, 300, 240, 240, 120, 300, 140, 140, 20, 200,
// UG.CA..CG
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 310, 310, 430, 310,
// UG.CC..CG
240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240,
// UG.CG..CG
120, 120, 240, 120, 330, 330, 450, 330, 240, 240, 360, 240, 310, 310, 430, 310,
// UG.CU..CG
260, 260, 380, 260, 240, 240, 360, 240, 240, 240, 360, 240, 140, 140, 260, 140,
// UG.GA..CG
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 190, 370, 310, 370,
// UG.GC..CG
120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300,
// UG.GG..CG
0, 180, 120, 180, 210, 390, 330, 390, 120, 300, 240, 300, 190, 370, 310, 370,
// UG.GU..CG
140, 320, 260, 320, 120, 300, 240, 300, 120, 300, 240, 300, 20, 200, 140, 200,
// UG.UA..CG
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 430, 310, 430, 210,
// UG.UC..CG
360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140,
// UG.UG..CG
240, 120, 240, 20, 450, 330, 450, 230, 360, 240, 360, 140, 430, 310, 430, 210,
// UG.UU..CG
380, 260, 380, 160, 360, 240, 360, 140, 360, 240, 360, 140, 260, 140, 260, 40,
// UG.AA..GC
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 250, 250, 130, 310,
// UG.AC..GC
240, 240, 120, 300, 240, 240, 120, 300, 200, 200, 80, 260, 240, 240, 120, 300,
// UG.AG..GC
120, 120, 0, 180, 290, 290, 170, 350, 240, 240, 120, 300, 250, 250, 130, 310,
// UG.AU..GC
200, 200, 80, 260, 240, 240, 120, 300, 200, 200, 80, 260, 140, 140, 20, 200,
// UG.CA..GC
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 250, 250, 370, 250,
// UG.CC..GC
240, 240, 360, 240, 240, 240, 360, 240, 200, 200, 320, 200, 240, 240, 360, 240,
// UG.CG..GC
120, 120, 240, 120, 290, 290, 410, 290, 240, 240, 360, 240, 250, 250, 370, 250,
// UG.CU..GC
200, 200, 320, 200, 240, 240, 360, 240, 200, 200, 320, 200, 140, 140, 260, 140,
// UG.GA..GC
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 130, 310, 250, 310,
// UG.GC..GC
120, 300, 240, 300, 120, 300, 240, 300, 80, 260, 200, 260, 120, 300, 240, 300,
// UG.GG..GC
0, 180, 120, 180, 170, 350, 290, 350, 120, 300, 240, 300, 130, 310, 250, 310,
// UG.GU..GC
80, 260, 200, 260, 120, 300, 240, 300, 80, 260, 200, 260, 20, 200, 140, 200,
// UG.UA..GC
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 370, 250, 370, 150,
// UG.UC..GC
360, 240, 360, 140, 360, 240, 360, 140, 320, 200, 320, 100, 360, 240, 360, 140,
// UG.UG..GC
240, 120, 240, 20, 410, 290, 410, 190, 360, 240, 360, 140, 370, 250, 370, 150,
// UG.UU..GC
320, 200, 320, 100, 360, 240, 360, 140, 320, 200, 320, 100, 260, 140, 260, 40,
// UG.AA..UA
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UG.AC..UA
290, 290, 170, 350, 290, 290, 170, 350, 340, 340, 220, 400, 290, 290, 170, 350,
// UG.AG..UA
170, 170, 50, 230, 370, 370, 250, 430, 290, 290, 170, 350, 360, 360, 240, 420,
// UG.AU..UA
340, 340, 220, 400, 290, 290, 170, 350, 340, 340, 220, 400, 190, 190, 70, 250,
// UG.CA..UA
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 360, 360, 480, 360,
// UG.CC..UA
290, 290, 410, 290, 290, 290, 410, 290, 340, 340, 460, 340, 290, 290, 410, 290,
// UG.CG..UA
170, 170, 290, 170, 370, 370, 490, 370, 290, 290, 410, 290, 360, 360, 480, 360,
// UG.CU..UA
340, 340, 460, 340, 290, 290, 410, 290, 340, 340, 460, 340, 190, 190, 310, 190,
// UG.GA..UA
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 240, 420, 360, 420,
// UG.GC..UA
170, 350, 290, 350, 170, 350, 290, 350, 220, 400, 340, 400, 170, 350, 290, 350,
// UG.GG..UA
50, 230, 170, 230, 250, 430, 370, 430, 170, 350, 290, 350, 240, 420, 360, 420,
// UG.GU..UA
220, 400, 340, 400, 170, 350, 290, 350, 220, 400, 340, 400, 70, 250, 190, 250,
// UG.UA..UA
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 480, 360, 480, 260,
// UG.UC..UA
410, 290, 410, 190, 410, 290, 410, 190, 460, 340, 460, 240, 410, 290, 410, 190,
// UG.UG..UA
290, 170, 290, 70, 490, 370, 490, 270, 410, 290, 410, 190, 480, 360, 480, 260,
// UG.UU..UA
460, 340, 460, 240, 410, 290, 410, 190, 460, 340, 460, 240, 310, 190, 310, 90,
// UG.AA..GU
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 410, 410, 290, 470,
// UG.AC..GU
290, 290, 170, 350, 290, 290, 170, 350, 350, 350, 230, 410, 290, 290, 170, 350,
// UG.AG..GU
170, 170, 50, 230, 410, 410, 290, 470, 290, 290, 170, 350, 410, 410, 290, 470,
// UG.AU..GU
350, 350, 230, 410, 290, 290, 170, 350, 350, 350, 230, 410, 190, 190, 70, 250,
// UG.CA..GU
290, 290, 410, 290, 290, 290, 410, 290, 170, 170, 290, 170, 410, 410, 530, 410,
// UG.CC..GU
290, 290, 410, 290, 290, 290, 410, 290, 350, 350, 470, 350, 290, 290, 410, 290,
// UG.CG..GU
170, 170, 290, 170, 410, 410, 530, 410, 290, 290, 410, 290, 410, 410, 530, 410,
// UG.CU..GU
350, 350, 470, 350, 290, 290, 410, 290, 350, 350, 470, 350, 190, 190, 310, 190,
// UG.GA..GU
170, 350, 290, 350, 170, 350, 290, 350, 50, 230, 170, 230, 290, 470, 410, 470,
// UG.GC..GU
170, 350, 290, 350, 170, 350, 290, 350, 230, 410, 350, 410, 170, 350, 290, 350,
// UG.GG..GU
50, 230, 170, 230, 290, 470, 410, 470, 170, 350, 290, 350, 290, 470, 410, 470,
// UG.GU..GU
230, 410, 350, 410, 170, 350, 290, 350, 230, 410, 350, 410, 70, 250, 190, 250,
// UG.UA..GU
410, 290, 410, 190, 410, 290, 410, 190, 290, 170, 290, 70, 530, 410, 530, 310,
// UG.UC..GU
410, 290, 410, 190, 410, 290, 410, 190, 470, 350, 470, 250, 410, 290, 410, 190,
// UG.UG..GU
290, 170, 290, 70, 530, 410, 530, 310, 410, 290, 410, 190, 530, 410, 530, 310,
// UG.UU..GU
470, 350, 470, 250, 410, 290, 410, 190, 470, 350, 470, 250, 310, 190, 310, 90,
// UG.AA..UG
240, 240, 120, 300, 240, 240, 120, 300, 120, 120, 0, 180, 310, 310, 190, 370,
// UG.AC..UG
240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300, 240, 240, 120, 300,
// UG.AG..UG
120, 120, 0, 180, 330, 330, 210, 390, 240, 240, 120, 300, 310, 310, 190, 370,
// UG.AU..UG
260, 260, 140, 320, 240, 240, 120, 300, 240, 240, 120, 300, 140, 140, 20, 200,
// UG.CA..UG
240, 240, 360, 240, 240, 240, 360, 240, 120, 120, 240, 120, 310, 310, 430, 310,
// UG.CC..UG
240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240, 240, 240, 360, 240,
// UG.CG..UG
120, 120, 240, 120, 330, 330, 450, 330, 240, 240, 360, 240, 310, 310, 430, 310,
// UG.CU..UG
260, 260, 380, 260, 240, 240, 360, 240, 240, 240, 360, 240, 140, 140, 260, 140,
// UG.GA..UG
120, 300, 240, 300, 120, 300, 240, 300, 0, 180, 120, 180, 190, 370, 310, 370,
// UG.GC..UG
120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300, 120, 300, 240, 300,
// UG.GG..UG
0, 180, 120, 180, 210, 390, 330, 390, 120, 300, 240, 300, 190, 370, 310, 370,
// UG.GU..UG
140, 320, 260, 320, 120, 300, 240, 300, 120, 300, 240, 300, 20, 200, 140, 200,
// UG.UA..UG
360, 240, 360, 140, 360, 240, 360, 140, 240, 120, 240, 20, 430, 310, 430, 210,
// UG.UC..UG
360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140, 360, 240, 360, 140,
// UG.UG..UG
240, 120, 240, 20, 450, 330, 450, 230, 360, 240, 360, 140, 430, 310, 430, 210,
// UG.UU..UG
380, 260, 380, 160, 360, 240, 360, 140, 360, 240, 360, 140, 260, 140, 260, 40,
// >Interior Loops 1x2
// >CG.A..AU = 5'- C A A -3'
// > 3'- G Y X U -5'
// >Rows: X = A C G U (X constant for a row)
// >Columns: Y = A C G U (Y constant in column)
// AU.A..AU
340, 340, 220, 390, 340, 340, 220, 390, 220, 220, 100, 270, 460, 460, 340, 510,
// AU.C..AU
340, 340, 420, 340, 340, 340, 420, 340, 400, 400, 480, 400, 340, 340, 420, 340,
// AU.G..AU
100, 270, 220, 270, 340, 510, 460, 510, 220, 390, 340, 390, 340, 510, 460, 510,
// AU.U..AU
470, 400, 470, 300, 410, 340, 410, 240, 470, 400, 470, 300, 310, 240, 310, 140,
// AU.A..CG
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 360, 360, 240, 410,
// AU.C..CG
290, 290, 370, 290, 290, 290, 370, 290, 290, 290, 370, 290, 290, 290, 370, 290,
// AU.G..CG
50, 220, 170, 220, 260, 430, 380, 430, 170, 340, 290, 340, 240, 410, 360, 410,
// AU.U..CG
380, 310, 380, 210, 360, 290, 360, 190, 360, 290, 360, 190, 260, 190, 260, 90,
// AU.A..GC
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 300, 300, 180, 350,
// AU.C..GC
290, 290, 370, 290, 290, 290, 370, 290, 250, 250, 330, 250, 290, 290, 370, 290,
// AU.G..GC
50, 220, 170, 220, 220, 390, 340, 390, 170, 340, 290, 340, 180, 350, 300, 350,
// AU.U..GC
320, 250, 320, 150, 360, 290, 360, 190, 320, 250, 320, 150, 260, 190, 260, 90,
// AU.A..UA
340, 340, 220, 390, 340, 340, 220, 390, 220, 220, 100, 270, 410, 410, 290, 460,
// AU.C..UA
340, 340, 420, 340, 340, 340, 420, 340, 390, 390, 470, 390, 340, 340, 420, 340,
// AU.G..UA
100, 270, 220, 270, 300, 470, 420, 470, 220, 390, 340, 390, 290, 460, 410, 460,
// AU.U..UA
460, 390, 460, 290, 410, 340, 410, 240, 460, 390, 460, 290, 310, 240, 310, 140,
// AU.A..GU
340, 340, 220, 390, 340, 340, 220, 390, 220, 220, 100, 270, 460, 460, 340, 510,
// AU.C..GU
340, 340, 420, 340, 340, 340, 420, 340, 400, 400, 480, 400, 340, 340, 420, 340,
// AU.G..GU
100, 270, 220, 270, 340, 510, 460, 510, 220, 390, 340, 390, 340, 510, 460, 510,
// AU.U..GU
470, 400, 470, 300, 410, 340, 410, 240, 470, 400, 470, 300, 310, 240, 310, 140,
// AU.A..UG
290, 290, 170, 340, 290, 290, 170, 340, 170, 170, 50, 220, 360, 360, 240, 410,
// AU.C..UG
290, 290, 370, 290, 290, 290, 370, 290, 290, 290, 370, 290, 290, 290, 370, 290,
// AU.G..UG
50, 220, 170, 220, 260, 430, 380, 430, 170, 340, 290, 340, 240, 410, 360, 410,
// AU.U..UG
380, 310, 380, 210, 360, 290, 360, 190, 360, 290, 360, 190, 260, 190, 260, 90,
// CG.A..AU
290, 290, 170, 250, 290, 290, 170, 250, 170, 170, 50, 130, 410, 410, 290, 370,
// CG.C..AU
290, 290, 340, 290, 290, 290, 340, 290, 350, 350, 400, 350, 290, 290, 340, 290,
// CG.G..AU
50, 130, 170, 130, 290, 370, 410, 370, 170, 250, 290, 250, 290, 370, 410, 370,
// CG.U..AU
360, 350, 360, 250, 300, 290, 300, 190, 360, 350, 360, 250, 200, 190, 200, 90,
// CG.A..CG
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 310, 310, 190, 270,
// CG.C..CG
240, 240, 290, 240, 240, 240, 290, 240, 240, 240, 290, 240, 240, 240, 290, 240,
// CG.G..CG
0, 80, 120, 80, 210, 290, 330, 290, 120, 200, 240, 200, 190, 270, 310, 270,
// CG.U..CG
270, 260, 270, 160, 250, 240, 250, 140, 250, 240, 250, 140, 150, 140, 150, 40,
// CG.A..GC
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 250, 250, 130, 210,
// CG.C..GC
240, 240, 290, 240, 240, 240, 290, 240, 200, 200, 250, 200, 240, 240, 290, 240,
// CG.G..GC
0, 80, 120, 80, 170, 250, 290, 250, 120, 200, 240, 200, 130, 210, 250, 210,
// CG.U..GC
210, 200, 210, 100, 250, 240, 250, 140, 210, 200, 210, 100, 150, 140, 150, 40,
// CG.A..UA
290, 290, 170, 250, 290, 290, 170, 250, 170, 170, 50, 130, 360, 360, 240, 320,
// CG.C..UA
290, 290, 340, 290, 290, 290, 340, 290, 340, 340, 390, 340, 290, 290, 340, 290,
// CG.G..UA
50, 130, 170, 130, 250, 330, 370, 330, 170, 250, 290, 250, 240, 320, 360, 320,
// CG.U..UA
350, 340, 350, 240, 300, 290, 300, 190, 350, 340, 350, 240, 200, 190, 200, 90,
// CG.A..GU
290, 290, 170, 250, 290, 290, 170, 250, 170, 170, 50, 130, 410, 410, 290, 370,
// CG.C..GU
290, 290, 340, 290, 290, 290, 340, 290, 350, 350, 400, 350, 290, 290, 340, 290,
// CG.G..GU
50, 130, 170, 130, 290, 370, 410, 370, 170, 250, 290, 250, 290, 370, 410, 370,
// CG.U..GU
360, 350, 360, 250, 300, 290, 300, 190, 360, 350, 360, 250, 200, 190, 200, 90,
// CG.A..UG
240, 240, 120, 200, 240, 240, 120, 200, 120, 120, 0, 80, 310, 310, 190, 270,
// CG.C..UG
240, 240, 290, 240, 240, 240, 290, 240, 240, 240, 290, 240, 240, 240, 290, 240,
// CG.G..UG
0, 80, 120, 80, 210, 290, 330, 290, 120, 200, 240, 200, 190, 270, 310, 270,
// CG.U..UG
270, 260, 270, 160, 250, 240, 250, 140, 250, 240, 250, 140, 150, 140, 150, 40,
// GC.A..AU
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 410, 410, 290, 430,
// GC.C..AU
290, 290, 380, 290, 290, 290, 380, 290, 350, 350, 440, 350, 290, 290, 380, 290,
// GC.G..AU
50, 170, 170, 170, 290, 410, 410, 410, 170, 290, 290, 290, 290, 410, 410, 410,
// GC.U..AU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// GC.A..CG
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GC.C..CG
240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240,
// GC.G..CG
0, 120, 120, 120, 210, 330, 330, 330, 120, 240, 240, 240, 190, 310, 310, 310,
// GC.U..CG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// GC.A..GC
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 250, 250, 130, 270,
// GC.C..GC
240, 240, 330, 240, 240, 240, 330, 240, 200, 200, 290, 200, 240, 240, 330, 240,
// GC.G..GC
0, 120, 120, 120, 170, 290, 290, 290, 120, 240, 240, 240, 130, 250, 250, 250,
// GC.U..GC
270, 200, 270, 100, 310, 240, 310, 140, 270, 200, 270, 100, 210, 140, 210, 40,
// GC.A..UA
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 360, 360, 240, 380,
// GC.C..UA
290, 290, 380, 290, 290, 290, 380, 290, 340, 340, 430, 340, 290, 290, 380, 290,
// GC.G..UA
50, 170, 170, 170, 250, 370, 370, 370, 170, 290, 290, 290, 240, 360, 360, 360,
// GC.U..UA
410, 340, 410, 240, 360, 290, 360, 190, 410, 340, 410, 240, 260, 190, 260, 90,
// GC.A..GU
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 410, 410, 290, 430,
// GC.C..GU
290, 290, 380, 290, 290, 290, 380, 290, 350, 350, 440, 350, 290, 290, 380, 290,
// GC.G..GU
50, 170, 170, 170, 290, 410, 410, 410, 170, 290, 290, 290, 290, 410, 410, 410,
// GC.U..GU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// GC.A..UG
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GC.C..UG
240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240,
// GC.G..UG
0, 120, 120, 120, 210, 330, 330, 330, 120, 240, 240, 240, 190, 310, 310, 310,
// GC.U..UG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// UA.A..AU
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 460, 460, 340, 520,
// UA.C..AU
340, 340, 460, 340, 340, 340, 460, 340, 400, 400, 520, 400, 340, 340, 460, 340,
// UA.G..AU
100, 280, 220, 280, 340, 520, 460, 520, 220, 400, 340, 400, 340, 520, 460, 520,
// UA.U..AU
520, 400, 520, 300, 460, 340, 460, 240, 520, 400, 520, 300, 360, 240, 360, 140,
// UA.A..CG
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UA.C..CG
290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290,
// UA.G..CG
50, 230, 170, 230, 260, 440, 380, 440, 170, 350, 290, 350, 240, 420, 360, 420,
// UA.U..CG
430, 310, 430, 210, 410, 290, 410, 190, 410, 290, 410, 190, 310, 190, 310, 90,
// UA.A..GC
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 300, 300, 180, 360,
// UA.C..GC
290, 290, 410, 290, 290, 290, 410, 290, 250, 250, 370, 250, 290, 290, 410, 290,
// UA.G..GC
50, 230, 170, 230, 220, 400, 340, 400, 170, 350, 290, 350, 180, 360, 300, 360,
// UA.U..GC
370, 250, 370, 150, 410, 290, 410, 190, 370, 250, 370, 150, 310, 190, 310, 90,
// UA.A..UA
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 410, 410, 290, 470,
// UA.C..UA
340, 340, 460, 340, 340, 340, 460, 340, 390, 390, 510, 390, 340, 340, 460, 340,
// UA.G..UA
100, 280, 220, 280, 300, 480, 420, 480, 220, 400, 340, 400, 290, 470, 410, 470,
// UA.U..UA
510, 390, 510, 290, 460, 340, 460, 240, 510, 390, 510, 290, 360, 240, 360, 140,
// UA.A..GU
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 460, 460, 340, 520,
// UA.C..GU
340, 340, 460, 340, 340, 340, 460, 340, 400, 400, 520, 400, 340, 340, 460, 340,
// UA.G..GU
100, 280, 220, 280, 340, 520, 460, 520, 220, 400, 340, 400, 340, 520, 460, 520,
// UA.U..GU
520, 400, 520, 300, 460, 340, 460, 240, 520, 400, 520, 300, 360, 240, 360, 140,
// UA.A..UG
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UA.C..UG
290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290,
// UA.G..UG
50, 230, 170, 230, 260, 440, 380, 440, 170, 350, 290, 350, 240, 420, 360, 420,
// UA.U..UG
430, 310, 430, 210, 410, 290, 410, 190, 410, 290, 410, 190, 310, 190, 310, 90,
// GU.A..AU
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 410, 410, 290, 430,
// GU.C..AU
290, 290, 380, 290, 290, 290, 380, 290, 350, 350, 440, 350, 290, 290, 380, 290,
// GU.G..AU
50, 170, 170, 170, 290, 410, 410, 410, 170, 290, 290, 290, 290, 410, 410, 410,
// GU.U..AU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// GU.A..CG
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GU.C..CG
240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240,
// GU.G..CG
0, 120, 120, 120, 210, 330, 330, 330, 120, 240, 240, 240, 190, 310, 310, 310,
// GU.U..CG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// GU.A..GC
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 250, 250, 130, 270,
// GU.C..GC
240, 240, 330, 240, 240, 240, 330, 240, 200, 200, 290, 200, 240, 240, 330, 240,
// GU.G..GC
0, 120, 120, 120, 170, 290, 290, 290, 120, 240, 240, 240, 130, 250, 250, 250,
// GU.U..GC
270, 200, 270, 100, 310, 240, 310, 140, 270, 200, 270, 100, 210, 140, 210, 40,
// GU.A..UA
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 360, 360, 240, 380,
// GU.C..UA
290, 290, 380, 290, 290, 290, 380, 290, 340, 340, 430, 340, 290, 290, 380, 290,
// GU.G..UA
50, 170, 170, 170, 250, 370, 370, 370, 170, 290, 290, 290, 240, 360, 360, 360,
// GU.U..UA
410, 340, 410, 240, 360, 290, 360, 190, 410, 340, 410, 240, 260, 190, 260, 90,
// GU.A..GU
290, 290, 170, 310, 290, 290, 170, 310, 170, 170, 50, 190, 410, 410, 290, 430,
// GU.C..GU
290, 290, 380, 290, 290, 290, 380, 290, 350, 350, 440, 350, 290, 290, 380, 290,
// GU.G..GU
50, 170, 170, 170, 290, 410, 410, 410, 170, 290, 290, 290, 290, 410, 410, 410,
// GU.U..GU
420, 350, 420, 250, 360, 290, 360, 190, 420, 350, 420, 250, 260, 190, 260, 90,
// GU.A..UG
240, 240, 120, 260, 240, 240, 120, 260, 120, 120, 0, 140, 310, 310, 190, 330,
// GU.C..UG
240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240, 240, 240, 330, 240,
// GU.G..UG
0, 120, 120, 120, 210, 330, 330, 330, 120, 240, 240, 240, 190, 310, 310, 310,
// GU.U..UG
330, 260, 330, 160, 310, 240, 310, 140, 310, 240, 310, 140, 210, 140, 210, 40,
// UG.A..AU
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 460, 460, 340, 520,
// UG.C..AU
340, 340, 460, 340, 340, 340, 460, 340, 400, 400, 520, 400, 340, 340, 460, 340,
// UG.G..AU
100, 280, 220, 280, 340, 520, 460, 520, 220, 400, 340, 400, 340, 520, 460, 520,
// UG.U..AU
520, 400, 520, 300, 460, 340, 460, 240, 520, 400, 520, 300, 360, 240, 360, 140,
// UG.A..CG
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UG.C..CG
290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290,
// UG.G..CG
50, 230, 170, 230, 260, 440, 380, 440, 170, 350, 290, 350, 240, 420, 360, 420,
// UG.U..CG
430, 310, 430, 210, 410, 290, 410, 190, 410, 290, 410, 190, 310, 190, 310, 90,
// UG.A..GC
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 300, 300, 180, 360,
// UG.C..GC
290, 290, 410, 290, 290, 290, 410, 290, 250, 250, 370, 250, 290, 290, 410, 290,
// UG.G..GC
50, 230, 170, 230, 220, 400, 340, 400, 170, 350, 290, 350, 180, 360, 300, 360,
// UG.U..GC
370, 250, 370, 150, 410, 290, 410, 190, 370, 250, 370, 150, 310, 190, 310, 90,
// UG.A..UA
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 410, 410, 290, 470,
// UG.C..UA
340, 340, 460, 340, 340, 340, 460, 340, 390, 390, 510, 390, 340, 340, 460, 340,
// UG.G..UA
100, 280, 220, 280, 300, 480, 420, 480, 220, 400, 340, 400, 290, 470, 410, 470,
// UG.U..UA
510, 390, 510, 290, 460, 340, 460, 240, 510, 390, 510, 290, 360, 240, 360, 140,
// UG.A..GU
340, 340, 220, 400, 340, 340, 220, 400, 220, 220, 100, 280, 460, 460, 340, 520,
// UG.C..GU
340, 340, 460, 340, 340, 340, 460, 340, 400, 400, 520, 400, 340, 340, 460, 340,
// UG.G..GU
100, 280, 220, 280, 340, 520, 460, 520, 220, 400, 340, 400, 340, 520, 460, 520,
// UG.U..GU
520, 400, 520, 300, 460, 340, 460, 240, 520, 400, 520, 300, 360, 240, 360, 140,
// UG.A..UG
290, 290, 170, 350, 290, 290, 170, 350, 170, 170, 50, 230, 360, 360, 240, 420,
// UG.C..UG
290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290, 290, 290, 410, 290,
// UG.G..UG
50, 230, 170, 230, 260, 440, 380, 440, 170, 350, 290, 350, 240, 420, 360, 420,
// UG.U..UG
430, 310, 430, 210, 410, 290, 410, 190, 410, 290, 410, 190, 310, 190, 310, 90,
// >POLYC - Penalty for poly C hairpins.
// >First number is penalty for polyC triloop
// >Second number is "slope", i.e. penalty per C in a non triloop
// >Third number is "intercept", i.e. constant penalty for non triloops
0, 0, 0,
// >BETA - Pseudoknot energy parameters. B1 B2 B3 B1M B1P
// >B1 = Constant penalty for "open" pseudoknot
// >B2 = penalty per pair in pseudoknot
// >B3 = penalty per base in pseudoknot
// >B1M = constant penalty for pseudoknot in a "closed" loop
// >B1P = constant penalty for pseudoknot in a pseudoknot.
960, 10, 10, 1500, 1500,
// >BIMOLECULAR //TINOCO, 277
409 };
@article{djelloul_automated_2008,
title = {Automated motif extraction and classification in {RNA} tertiary structures},
volume = {14},
issn = {1355-8382, 1469-9001},
url = {http://rnajournal.cshlp.org/content/14/12/2489},
doi = {10.1261/rna.1061108},
abstract = {We used a novel graph-based approach to extract RNA tertiary motifs. We cataloged them all and clustered them using an innovative graph similarity measure. We applied our method to three widely studied structures: Haloarcula marismortui 50S (H.m 50S), Escherichia coli 50S (E. coli 50S), and Thermus thermophilus 16S (T.th 16S) RNAs. We identified 10 known motifs without any prior knowledge of their shapes or positions. We additionally identified four putative new motifs.},
language = {en},
number = {12},
urldate = {2018-10-04},
journal = {RNA},
author = {Djelloul, Mahassine and Denise, Alain},
month = jan,
year = {2008},
pmid = {18957493},
keywords = {clustering, graph similarity, RNA tertiary structure},
pages = {2489--2497},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/6PDZZRI6/Djelloul et Denise - 2008 - Automated motif extraction and classification in R.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/28T5ICXG/2489.html:text/html}
}
@article{roll_jar3d_2016,
title = {{JAR}3D {Webserver}: {Scoring} and aligning {RNA} loop sequences to known 3D motifs},
volume = {44},
issn = {0305-1048},
shorttitle = {{JAR}3D {Webserver}},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4987954/},
doi = {10.1093/nar/gkw453},
abstract = {Many non-coding RNAs have been identified and may function by forming 2D and 3D structures. RNA hairpin and internal loops are often represented as unstructured on secondary structure diagrams, but RNA 3D structures show that most such loops are structured by non-Watson–Crick basepairs and base stacking. Moreover, different RNA sequences can form the same RNA 3D motif. JAR3D finds possible 3D geometries for hairpin and internal loops by matching loop sequences to motif groups from the RNA 3D Motif Atlas, by exact sequence match when possible, and by probabilistic scoring and edit distance for novel sequences. The scoring gauges the ability of the sequences to form the same pattern of interactions observed in 3D structures of the motif. The JAR3D webserver at http://rna.bgsu.edu/jar3d/ takes one or many sequences of a single loop as input, or else one or many sequences of longer RNAs with multiple loops. Each sequence is scored against all current motif groups. The output shows the ten best-matching motif groups. Users can align input sequences to each of the motif groups found by JAR3D. JAR3D will be updated with every release of the RNA 3D Motif Atlas, and so its performance is expected to improve over time.},
number = {Web Server issue},
urldate = {2018-10-04},
journal = {Nucleic Acids Research},
author = {Roll, James and Zirbel, Craig L. and Sweeney, Blake and Petrov, Anton I. and Leontis, Neocles},
month = jul,
year = {2016},
pmid = {27235417},
pmcid = {PMC4987954},
pages = {W320--W327},
file = {PubMed Central Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/KWD59J5I/Roll et al. - 2016 - JAR3D Webserver Scoring and aligning RNA loop seq.pdf:application/pdf}
}
@article{zhong_rnamotifscan:_2010,
title = {{RNAMotifScan}: automatic identification of {RNA} structural motifs using secondary structural alignment},
volume = {38},
issn = {0305-1048},
shorttitle = {{RNAMotifScan}},
url = {https://academic.oup.com/nar/article/38/18/e176/1069222},
doi = {10.1093/nar/gkq672},
abstract = {Abstract. Recent studies have shown that RNA structural motifs play essential roles in RNA folding and interaction with other molecules. Computational identifi},
language = {en},
number = {18},
urldate = {2018-10-04},
journal = {Nucleic Acids Research},
author = {Zhong, Cuncong and Tang, Haixu and Zhang, Shaojie},
month = oct,
year = {2010},
pages = {e176--e176},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/ESXL69Q6/Zhong et al. - 2010 - RNAMotifScan automatic identification of RNA stru.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/MWTNC94Z/1069222.html:text/html}
}
@inproceedings{tahi_fast_2003,
title = {A fast algorithm for {RNA} secondary structure prediction including pseudoknots},
doi = {10.1109/BIBE.2003.1188924},
abstract = {Many important RNA molecules contain pseudoknots, which are generally excluded by the definition of the secondary structure, mainly for computational reasons. Still, most existing algorithms for secondary structure prediction are not satisfactory in results and complexities, even when pseudoknots are not allowed. We present an algorithm, called P-DCFold, for the prediction of RNA secondary structures including all kinds of pseudoknots. It is based on the comparative approach. The helices are searched recursively, from more "likely" to less "likely", using the "Divide and Conquer" approach. This approach, which allows to limit the amount of searching, is possible when only non-interleaved helices are searched for. The pseudoknots are therefore searched in several steps, each helix of the pseudoknot being selected in a different step. P-DCFold has been applied to tmRNA and RnaseP sequences. In less than two seconds, their respective secondary structures, including their pseudoknots, have been recovered very efficiently.},
booktitle = {Third {IEEE} {Symposium} on {Bioinformatics} and {Bioengineering}, 2003. {Proceedings}.},
author = {Tahi, F. and Engelen, S. and Regnier, M.},
month = mar,
year = {2003},
keywords = {2 s, Bioinformatics, Biological control systems, computational methods, computational reasons, Context modeling, Databases, Evolution (biology), fast algorithm, macromolecules, molecular biophysics, molecular configurations, noninterleaved helices, Predictive models, pseudoknots, recursive searches, RNA, RNA secondary structure prediction, RnaseP, Robustness, secondary structures, spatial structures, Stochastic processes, Switches, tmRNA},
pages = {11--17},
file = {IEEE Xplore Abstract Record:/nhome/siniac/lbecquey/Zotero/storage/HTHXNSVF/1188924.html:text/html}
}
@article{tahi_p-dcfold_2005,
title = {P-dcfold or how to predict all kinds of pseudoknots in rna secondary structures},
volume = {14},
issn = {0218-2130},
url = {https://www.worldscientific.com/doi/abs/10.1142/S021821300500234X},
doi = {10.1142/S021821300500234X},
abstract = {Pseudoknots play important roles in many RNAs. But for computational reasons, pseudoknots are usually excluded from the definition of RNA secondary structures. Indeed, prediction of pseudoknots increase very highly the complexities in time of the algorithms, knowing that all existing algorithms for RNA secondary structure prediction have complexities at least of O(n3). Some algorithms have been developed for searching pseudoknots, but all of them have very high complexities, and consider generally particular kinds of pseudoknots.We present an algorithm, called P-DCFold based on the comparative approach, for the prediction of RNA secondary structures including all kinds of pseudoknots. The helices are searched recursively using the "Divide and Conquer" approach, searching the helices from the "most significant" to the "less significant". A selected helix subdivide the sequence into two sub-sequences, the internal one and a concatenation of the two externals. This approach is used to search non-interleaved helices and allows to limit the space of searching. To search for pseudoknots, the processing is reiterated. Therefore, each helix of the pseudoknot is selected in a different step.P-DCFold has been applied to several RNA sequences. In less than two seconds, their respective secondary structures, including their pseudoknots, have been recovered very efficiently.},
number = {05},
urldate = {2018-10-02},
journal = {International Journal on Artificial Intelligence Tools},
author = {Tahi, Fariza and Stefan, Engelen and Regnier, Mireille},
month = oct,
year = {2005},
pages = {703--716},
file = {Snapshot:/nhome/siniac/lbecquey/Zotero/storage/GEIBPMJ4/S021821300500234X.html:text/html}
}
@article{tempel_fast_2012,
title = {A fast ab-initio method for predicting {miRNA} precursors in genomes},
volume = {40},
issn = {0305-1048},
url = {https://academic.oup.com/nar/article/40/11/e80/2409259},
doi = {10.1093/nar/gks146},
abstract = {Abstract. miRNAs are small non coding RNA structures which play important roles in biological processes. Finding miRNA precursors in genomes is therefore an i},
language = {en},
number = {11},
urldate = {2018-10-02},
journal = {Nucleic Acids Research},
author = {Tempel, Sébastien and Tahi, Fariza},
month = jun,
year = {2012},
pages = {e80--e80},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/BSCSRRL2/Tempel et Tahi - 2012 - A fast ab-initio method for predicting miRNA precu.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/ZTG4GDDT/2409259.html:text/html}
}
@article{reinharz_towards_2012,
title = {Towards 3D structure prediction of large {RNA} molecules: an integer programming framework to insert local 3D motifs in {RNA} secondary structure},
volume = {28},
issn = {1367-4803},
shorttitle = {Towards 3D structure prediction of large {RNA} molecules},
url = {https://academic.oup.com/bioinformatics/article/28/12/i207/269345},
doi = {10.1093/bioinformatics/bts226},
abstract = {Abstract. Motivation: The prediction of RNA 3D structures from its sequence only is a milestone to RNA function analysis and prediction. In recent years, many},
language = {en},
number = {12},
urldate = {2018-10-01},
journal = {Bioinformatics},
author = {Reinharz, Vladimir and Major, François and Waldispühl, Jérôme},
month = jun,
year = {2012},
pages = {i207--i214},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/IAYRK53E/Reinharz et al. - 2012 - Towards 3D structure prediction of large RNA molec.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/SSMTN6YZ/269345.html:text/html}
}
@article{pan_predicting_nodate,
title = {Predicting {RNA}–protein binding sites and motifs through combining local and global deep convolutional neural networks},
url = {https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty364/4990826},
doi = {10.1093/bioinformatics/bty364},
abstract = {AbstractMotivation. RNA-binding proteins (RBPs) take over 5–10\% of the eukaryotic proteome and play key roles in many biological processes, e.g. gene regulatio},
language = {en},
urldate = {2018-06-12},
journal = {Bioinformatics},
author = {Pan, Xiaoyong and Shen, Hong-Bin and Valencia, Alfonso},
file = {10.1093@bioinformatics@bty364.pdf:/nhome/siniac/lbecquey/Zotero/storage/KUQZ2HNN/10.1093@bioinformatics@bty364.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/TLQUYHEU/4990826.html:text/html}
}
@article{yi_brief_2017,
title = {A {Brief} {Review} of {RNA}–{Protein} {Interaction} {Database} {Resources}},
volume = {3},
issn = {2311-553X},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5832006/},
doi = {10.3390/ncrna3010006},
abstract = {RNA–Protein interactions play critical roles in various biological processes. By collecting and analyzing the RNA–Protein interactions and binding sites from experiments and predictions, RNA–Protein interaction databases have become an essential resource for the exploration of the transcriptional and post-transcriptional regulatory network. Here, we briefly review several widely used RNA–Protein interaction database resources developed in recent years to provide a guide of these databases. The content and major functions in databases are presented. The brief description of database helps users to quickly choose the database containing information they interested. In short, these RNA–Protein interaction database resources are continually updated, but the current state shows the efforts to identify and analyze the large amount of RNA–Protein interactions.},
number = {1},
urldate = {2018-06-08},
journal = {Non-Coding RNA},
author = {Yi, Ying and Zhao, Yue and Huang, Yan and Wang, Dong},
month = jan,
year = {2017},
pmid = {29657278},
pmcid = {PMC5832006},
file = {PubMed Central Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/C3ZRG7MJ/Yi et al. - 2017 - A Brief Review of RNA–Protein Interaction Database.pdf:application/pdf}
}
@article{das_automated_2007,
title = {Automated de novo prediction of native-like {RNA} tertiary structures},
volume = {104},
copyright = {© 2007 by The National Academy of Sciences of the USA. Freely available online through the PNAS open access option.},
issn = {0027-8424, 1091-6490},
url = {http://www.pnas.org/content/104/37/14664},
doi = {10.1073/pnas.0703836104},
abstract = {RNA tertiary structure prediction has been based almost entirely on base-pairing constraints derived from phylogenetic covariation analysis. We describe here a complementary approach, inspired by the Rosetta low-resolution protein structure prediction method, that seeks the lowest energy tertiary structure for a given RNA sequence without using evolutionary information. In a benchmark test of 20 RNA sequences with known structure and lengths of ≈30 nt, the new method reproduces better than 90\% of Watson–Crick base pairs, comparable with the accuracy of secondary structure prediction methods. In more than half the cases, at least one of the top five models agrees with the native structure to better than 4 Å rmsd over the backbone. Most importantly, the method recapitulates more than one-third of non-Watson–Crick base pairs seen in the native structures. Tandem stacks of “sheared” base pairs, base triplets, and pseudoknots are among the noncanonical features reproduced in the models. In the cases in which none of the top five models were native-like, higher energy conformations similar to the native structures are still sampled frequently but not assigned low energies. These results suggest that modest improvements in the energy function, together with the incorporation of information from phylogenetic covariance, may allow confident and accurate structure prediction for larger and more complex RNA chains.},
language = {en},
number = {37},
urldate = {2018-06-04},
journal = {Proceedings of the National Academy of Sciences},
author = {Das, Rhiju and Baker, David},
month = sep,
year = {2007},
pmid = {17726102},
keywords = {ab initio, energy-based, fragment assembly, nucleic acid, Rosetta},
pages = {14664--14669},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/H79FEN6P/Das and Baker - 2007 - Automated de novo prediction of native-like RNA te.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/WH7PUGNW/14664.html:text/html}
}
@article{cao_physics-based_2011,
title = {Physics-based de novo prediction of {RNA} 3D structures},
volume = {115},
issn = {1520-6106},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3072456/},
doi = {10.1021/jp112059y},
abstract = {Current experiments on structural determination cannot keep up the pace with the steadily emerging RNA sequences and new functions. This underscores the request for an accurate model for RNA three-dimensional (3D) structural prediction. Although considerable progress has been made in mechanistic studies, accurate prediction for RNA tertiary folding from sequence remains an unsolved problem. The first and most important requirement for the prediction of RNA structure from physical principles is an accurate free energy model. A recently developed three-vector virtual bond-based RNA folding model (“Vfold”) has allowed us to compute the chain entropy and predict folding free energies and structures for RNA secondary structures and simple pseudoknots. Here we develop a free energy-based method to predict larger more complex RNA tertiary folds. The approach is based on a multiscaling strategy: from the nucleotide sequence, we predict the two-dimensional (2D) structures (defined by the base pairs and tertiary contacts); based on the 2D structure, we construct a 3D scaffold; with the 3D scaffold as the initial state, we combine AMBER energy minimization and PDB-based fragment search to predict the all-atom structure. A key advantage of the approach is the statistical mechanical calculation for the conformational entropy of RNA structures, including those with cross-linked loops. Benchmark tests show that the model leads to significant improvements in RNA 3D structure prediction.},
number = {14},
urldate = {2018-06-04},
journal = {The journal of physical chemistry. B},
author = {Cao, Song and Chen, Shi-Jie},
month = apr,
year = {2011},
pmid = {21413701},
pmcid = {PMC3072456},
pages = {4216--4226},
file = {PubMed Central Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/ZY98QT5K/Cao and Chen - 2011 - Physics-based de novo prediction of RNA 3D structu.pdf:application/pdf}
}
@article{bottaro_towards_2015,
title = {Towards de novo {RNA} 3D {Structure} {Prediction}},
volume = {2},
copyright = {Copyright (c) 2015 Sandro Bottaro, Francesco Di Palma, Giovanni Bussi},
issn = {2375-2467},
url = {http://www.smartscitech.com/index.php/RD/article/view/544},
doi = {10.14800/rd.544},
abstract = {RNA is a fundamental class of biomolecules that mediate a large variety of molecular processes within the cell. Computational algorithms can be of great help in the understanding of RNA structure-function relationship. One of the main challenges in this field is the development of structure-prediction algorithms, which aim at the prediction of the three-dimensional (3D) native fold from the sole knowledge of the sequence. In a recent paper, we have introduced a scoring function for RNA structure prediction. Here, we analyze in detail the performance of the method, we underline strengths and shortcomings, and we discuss the results with respect to state-of-the-art techniques. These observations provide a starting point for improving current methodologies, thus paving the way to the advances of more accurate approaches for RNA 3D structure prediction.},
language = {en},
number = {2},
urldate = {2018-06-04},
journal = {RNA \& DISEASE},
author = {Bottaro, Sandro and Palma, Francesco Di and Bussi, Giovanni},
month = jan,
year = {2015},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/SWAYZQEV/Bottaro et al. - 2015 - Towards de novo RNA 3D Structure Prediction.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/SQMMYVCU/544.html:text/html}
}
@article{bindewald_multistrand_2016,
title = {Multistrand {Structure} {Prediction} of {Nucleic} {Acid} {Assemblies} and {Design} of {RNA} {Switches}},
volume = {16},
issn = {1530-6984},
url = {https://doi.org/10.1021/acs.nanolett.5b04651},
doi = {10.1021/acs.nanolett.5b04651},
abstract = {RNA is an attractive material for the creation of molecular logic gates that release programmed functionalities only in the presence of specific molecular interaction partners. Here we present HyperFold, a multistrand RNA/DNA structure prediction approach for predicting nucleic acid complexes that can contain pseudoknots. We show that HyperFold also performs competitively compared to other published folding algorithms. We performed a large variety of RNA/DNA hybrid reassociation experiments for different concentrations, DNA toehold lengths, and G+C content and find that the observed tendencies for reassociation correspond well to computational predictions. Importantly, we apply this method to the design and experimental verification of a two-stranded RNA molecular switch that upon binding to a single-stranded RNA toehold disease-marker trigger mRNA changes its conformation releasing an shRNA-like Dicer substrate structure. To demonstrate the concept, connective tissue growth factor (CTGF) mRNA and enhanced green fluorescent protein (eGFP) mRNA were chosen as trigger and target sequences, respectively. In vitro experiments confirm the formation of an RNA switch and demonstrate that the functional unit is being released when the trigger RNA interacts with the switch toehold. The designed RNA switch is shown to be functional in MDA-MB-231 breast cancer cells. Several other switches were also designed and tested. We conclude that this approach has considerable potential because, in principle, it allows the release of an siRNA designed against a gene that differs from the gene that is utilized as a biomarker for a disease state.},
number = {3},
urldate = {2018-05-31},
journal = {Nano Letters},
author = {Bindewald, Eckart and Afonin, Kirill A. and Viard, Mathias and Zakrevsky, Paul and Kim, Taejin and Shapiro, Bruce A.},
month = mar,
year = {2016},
pages = {1726--1735},
file = {ACS Full Text Snapshot:/nhome/siniac/lbecquey/Zotero/storage/285MME3I/acs.nanolett.html:text/html}
}
@article{ge_novo_2018,
title = {De novo discovery of structural motifs in {RNA} 3D structures through clustering},
volume = {46},
issn = {0305-1048},
url = {https://academic.oup.com/nar/article/46/9/4783/4925243},
doi = {10.1093/nar/gky139},
abstract = {Abstract. As functional components in three-dimensional (3D) conformation of an RNA, the RNA structural motifs provide an easy way to associate the molecular a},
language = {en},
number = {9},
urldate = {2018-05-31},
journal = {Nucleic Acids Research},
author = {Ge, Ping and Islam, Shahidul and Zhong, Cuncong and Zhang, Shaojie},
month = may,
year = {2018},
pages = {4783--4793},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/8YS7LY6E/Ge et al. - 2018 - De novo discovery of structural motifs in RNA 3D s.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/4TLRV8ZT/4925243.html:text/html}
}
@article{wang_rna_2018,
title = {{RNA} 3-dimensional structural motifs as a critical constraint of viroid {RNA} evolution},
volume = {14},
issn = {1553-7374},
url = {http://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1006801},
doi = {10.1371/journal.ppat.1006801},
language = {en},
number = {2},
urldate = {2018-05-31},
journal = {PLOS Pathogens},
author = {Wang, Ying and Zirbel, Craig L. and Leontis, Neocles B. and Ding, Biao},
month = feb,
year = {2018},
keywords = {Non-coding RNA sequences, RNA structure, RNA viruses, Sequence motif analysis, Viral evolution, Viral replication, Viral structure, Viroids},
pages = {e1006801},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/M3P6GCA7/Wang et al. - 2018 - RNA 3-dimensional structural motifs as a critical .pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/3YRBKI96/article.html:text/html}
}
@article{lorenz_viennarna_2011,
title = {{ViennaRNA} {Package} 2.0},
volume = {6},
issn = {1748-7188},
url = {https://doi.org/10.1186/1748-7188-6-26},
doi = {10.1186/1748-7188-6-26},
abstract = {Secondary structure forms an important intermediate level of description of nucleic acids that encapsulates the dominating part of the folding energy, is often well conserved in evolution, and is routinely used as a basis to explain experimental findings. Based on carefully measured thermodynamic parameters, exact dynamic programming algorithms can be used to compute ground states, base pairing probabilities, as well as thermodynamic properties.},
urldate = {2018-05-31},
journal = {Algorithms for Molecular Biology},
author = {Lorenz, Ronny and Bernhart, Stephan H. and Höner zu Siederdissen, Christian and Tafer, Hakim and Flamm, Christoph and Stadler, Peter F. and Hofacker, Ivo L.},
month = nov,
year = {2011},
keywords = {Consensus Structure, Folding Algorithm, Matthews Correlation Coefficient, Minimum Free Energy, Partition Function},
pages = {26},
annote = {Pages 26 in PDF},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/WFPBA2H8/Lorenz et al. - 2011 - ViennaRNA Package 2.0.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/ADNFF9EA/1748-7188-6-26.html:text/html}
}
@article{janssen_rna_2015,
title = {The {RNA} shapes studio},
volume = {31},
issn = {1367-4803},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4308662/},
doi = {10.1093/bioinformatics/btu649},
abstract = {Motivation: Abstract shape analysis, first proposed in 2004, allows one to extract several relevant structures from the folding space of an RNA sequence, preferable to focusing in a single structure of minimal free energy. We report recent extensions to this approach., Results: We have rebuilt the original RNAshapes as a repository of components that allows us to integrate several established tools for RNA structure analysis: RNAshapes, RNAalishapes and pknotsRG, including its recent extension pKiss. As a spin-off, we obtain heretofore unavailable functionality: e. g. with pKiss, we can now perform abstract shape analysis for structures holding pseudoknots up to the complexity of kissing hairpin motifs. The new tool pAliKiss can predict kissing hairpin motifs from aligned sequences. Along with the integration, the functionality of the tools was also extended in manifold ways., Availability and implementation: As before, the tool is available on the Bielefeld Bioinformatics server at http://bibiserv.cebitec.uni-bielefeld.de/rnashapesstudio., Contact: bibi-help@cebitec.uni-bielefeld.de},
number = {3},
urldate = {2018-05-31},
journal = {Bioinformatics},
author = {Janssen, Stefan and Giegerich, Robert},
month = feb,
year = {2015},
pmid = {25273103},
pmcid = {PMC4308662},
pages = {423--425},
file = {PubMed Central Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/KFQTVDR3/Janssen and Giegerich - 2015 - The RNA shapes studio.pdf:application/pdf}
}
@article{parlea_rna_2016,
series = {Advances in {RNA} {Structure} {Determination}},
title = {The {RNA} 3D {Motif} {Atlas}: {Computational} methods for extraction, organization and evaluation of {RNA} motifs},
volume = {103},
issn = {1046-2023},
shorttitle = {The {RNA} 3D {Motif} {Atlas}},
url = {http://www.sciencedirect.com/science/article/pii/S1046202316301049},
doi = {10.1016/j.ymeth.2016.04.025},
abstract = {RNA 3D motifs occupy places in structured RNA molecules that correspond to the hairpin, internal and multi-helix junction “loops” of their secondary structure representations. As many as 40\% of the nucleotides of an RNA molecule can belong to these structural elements, which are distinct from the regular double helical regions formed by contiguous AU, GC, and GU Watson-Crick basepairs. With the large number of atomic- or near atomic-resolution 3D structures appearing in a steady stream in the PDB/NDB structure databases, the automated identification, extraction, comparison, clustering and visualization of these structural elements presents an opportunity to enhance RNA science. Three broad applications are: (1) identification of modular, autonomous structural units for RNA nanotechnology, nanobiology and synthetic biology applications; (2) bioinformatic analysis to improve RNA 3D structure prediction from sequence; and (3) creation of searchable databases for exploring the binding specificities, structural flexibility, and dynamics of these RNA elements. In this contribution, we review methods developed for computational extraction of hairpin and internal loop motifs from a non-redundant set of high-quality RNA 3D structures. We provide a statistical summary of the extracted hairpin and internal loop motifs in the most recent version of the RNA 3D Motif Atlas. We also explore the reliability and accuracy of the extraction process by examining its performance in clustering recurrent motifs from homologous ribosomal RNA (rRNA) structures. We conclude with a summary of remaining challenges, especially with regard to extraction of multi-helix junction motifs.},
urldate = {2018-05-31},
journal = {Methods},
author = {Parlea, Lorena G. and Sweeney, Blake A. and Hosseini-Asanjan, Maryam and Zirbel, Craig L. and Leontis, Neocles B.},
month = jul,
year = {2016},
keywords = {Hairpin loop, Internal loop, Multi-helix junction loop, Non-Watson-Crick basepair, RNA 3D Motif, Structured RNA molecules},
pages = {99--119},
file = {ScienceDirect Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/HM9ZDD83/Parlea et al. - 2016 - The RNA 3D Motif Atlas Computational methods for .pdf:application/pdf;ScienceDirect Snapshot:/nhome/siniac/lbecquey/Zotero/storage/ANJRICVQ/S1046202316301049.html:text/html}
}
@article{legendre_bi-objective_2018,
title = {Bi-objective integer programming for {RNA} secondary structure prediction with pseudoknots},
volume = {19},
issn = {1471-2105},
url = {https://doi.org/10.1186/s12859-018-2007-7},
doi = {10.1186/s12859-018-2007-7},
abstract = {RNA structure prediction is an important field in bioinformatics, and numerous methods and tools have been proposed. Pseudoknots are specific motifs of RNA secondary structures that are difficult to predict. Almost all existing methods are based on a single model and return one solution, often missing the real structure. An alternative approach would be to combine different models and return a (small) set of solutions, maximizing its quality and diversity in order to increase the probability that it contains the real structure.},
urldate = {2018-05-24},
journal = {BMC Bioinformatics},
author = {Legendre, Audrey and Angel, Eric and Tahi, Fariza},
month = jan,
year = {2018},
keywords = {RNA, Bi-objective, Integer programming, Optimal solutions, Pseudoknot, Secondary structure, Sub-optimal solutions},
pages = {13},
annote = {Pages 13 in PDF},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/4YMW5M4S/Legendre et al. - 2018 - Bi-objective integer programming for RNA secondary.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/XP46BMHH/s12859-018-2007-7.html:text/html}
}
@article{legendre_bi-objective_2018-1,
title = {Bi-objective integer programming for {RNA} secondary structure prediction with pseudoknots},
volume = {19},
issn = {1471-2105},
url = {https://doi.org/10.1186/s12859-018-2007-7},
doi = {10.1186/s12859-018-2007-7},
abstract = {RNA structure prediction is an important field in bioinformatics, and numerous methods and tools have been proposed. Pseudoknots are specific motifs of RNA secondary structures that are difficult to predict. Almost all existing methods are based on a single model and return one solution, often missing the real structure. An alternative approach would be to combine different models and return a (small) set of solutions, maximizing its quality and diversity in order to increase the probability that it contains the real structure.},
number = {1},
urldate = {2018-10-08},
journal = {BMC Bioinformatics},
author = {Legendre, Audrey and Angel, Eric and Tahi, Fariza},
month = jan,
year = {2018},
pages = {13},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/J36PRAPX/Legendre et al. - 2018 - Bi-objective integer programming for RNA secondary.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/BZCRBGLK/s12859-018-2007-7.html:text/html}
}
@article{sarver_fr3d:_2008,
title = {{FR}3D: finding local and composite recurrent structural motifs in {RNA} 3D structures},
volume = {56},
issn = {1432-1416},
shorttitle = {{FR}3D},
url = {https://doi.org/10.1007/s00285-007-0110-x},
doi = {10.1007/s00285-007-0110-x},
abstract = {New methods are described for finding recurrent three-dimensional (3D) motifs in RNA atomic-resolution structures. Recurrent RNA 3D motifs are sets of RNA nucleotides with similar spatial arrangements. They can be local or composite. Local motifs comprise nucleotides that occur in the same hairpin or internal loop. Composite motifs comprise nucleotides belonging to three or more different RNA strand segments or molecules. We use a base-centered approach to construct efficient, yet exhaustive search procedures using geometric, symbolic, or mixed representations of RNA structure that we implement in a suite of MATLAB programs, “Find RNA 3D” (FR3D). The first modules of FR3D preprocess structure files to classify base-pair and -stacking interactions. Each base is represented geometrically by the position of its glycosidic nitrogen in 3D space and by the rotation matrix that describes its orientation with respect to a common frame. Base-pairing and base-stacking interactions are calculated from the base geometries and are represented symbolically according to the Leontis/Westhof basepairing classification, extended to include base-stacking. These data are stored and used to organize motif searches. For geometric searches, the user supplies the 3D structure of a query motif which FR3D uses to find and score geometrically similar candidate motifs, without regard to the sequential position of their nucleotides in the RNA chain or the identity of their bases. To score and rank candidate motifs, FR3D calculates a geometric discrepancy by rigidly rotating candidates to align optimally with the query motif and then comparing the relative orientations of the corresponding bases in the query and candidate motifs. Given the growing size of the RNA structure database, it is impossible to explicitly compute the discrepancy for all conceivable candidate motifs, even for motifs with less than ten nucleotides. The screening algorithm that we describe finds all candidate motifs whose geometric discrepancy with respect to the query motif falls below a user-specified cutoff discrepancy. This technique can be applied to RMSD searches. Candidate motifs identified geometrically may be further screened symbolically to identify those that contain particular basepair types or base-stacking arrangements or that conform to sequence continuity or nucleotide identity constraints. Purely symbolic searches for motifs containing user-defined sequence, continuity and interaction constraints have also been implemented. We demonstrate that FR3D finds all occurrences, both local and composite and with nucleotide substitutions, of sarcin/ricin and kink-turn motifs in the 23S and 5S ribosomal RNA 3D structures of the H. marismortui 50S ribosomal subunit and assigns the lowest discrepancy scores to bona fide examples of these motifs. The search algorithms have been optimized for speed to allow users to search the non-redundant RNA 3D structure database on a personal computer in a matter of minutes.},
language = {en},
number = {1},
urldate = {2018-10-10},
journal = {Journal of Mathematical Biology},
author = {Sarver, Michael and Zirbel, Craig L. and Stombaugh, Jesse and Mokdad, Ali and Leontis, Neocles B.},
month = jan,
year = {2008},
keywords = {05C85, 92C40},
pages = {215--252}
}
@article{petrov_webfr3dserver_2011,
title = {{WebFR}3D—a server for finding, aligning and analyzing recurrent {RNA} 3D motifs},
volume = {39},
issn = {0305-1048},
url = {https://academic.oup.com/nar/article/39/suppl_2/W50/2505799},
doi = {10.1093/nar/gkr249},
abstract = {Abstract. WebFR3D is the on-line version of ‘Find RNA 3D’ (FR3D), a program for annotating atomic-resolution RNA 3D structure files and searching them efficie},
language = {en},
number = {suppl\_2},
urldate = {2018-10-10},
journal = {Nucleic Acids Research},
author = {Petrov, Anton I. and Zirbel, Craig L. and Leontis, Neocles B.},
month = jul,
year = {2011},
pages = {W50--W55},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/WVGVFLFH/Petrov et al. - 2011 - WebFR3D—a server for finding, aligning and analyzi.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/8NMZZLKV/2505799.html:text/html}
}
@article{petrov_automated_2013,
title = {Automated classification of {RNA} 3D motifs and the {RNA} 3D {Motif} {Atlas}},
volume = {19},
issn = {1355-8382, 1469-9001},
url = {http://rnajournal.cshlp.org/content/19/10/1327},
doi = {10.1261/rna.039438.113},
abstract = {A monthly journal publishing high-quality, peer-reviewed research on all topics related to RNA and its metabolism in all organisms},
language = {en},
number = {10},
urldate = {2018-10-10},
journal = {RNA},
author = {Petrov, Anton I. and Zirbel, Craig L. and Leontis, Neocles B.},
month = jan,
year = {2013},
pmid = {23970545},
pages = {1327--1340},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/GIC5F2CJ/Petrov et al. - 2013 - Automated classification of RNA 3D motifs and the .pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/UJFVEML3/1327.full.html:text/html}
}
@article{lu_dssr:_2015,
title = {{DSSR}: an integrated software tool for dissecting the spatial structure of {RNA}},
volume = {43},
issn = {0305-1048},
shorttitle = {{DSSR}},
url = {https://academic.oup.com/nar/article/43/21/e142/2468098},
doi = {10.1093/nar/gkv716},
abstract = {Abstract. Insight into the three-dimensional architecture of RNA is essential for understanding its cellular functions. However, even the classic transfer RNA},
language = {en},
number = {21},
urldate = {2018-10-09},
journal = {Nucleic Acids Research},
author = {Lu, Xiang-Jun and Bussemaker, Harmen J. and Olson, Wilma K.},
month = dec,
year = {2015},
pages = {e142--e142},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/NURMS9UY/Lu et al. - 2015 - DSSR an integrated software tool for dissecting t.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/BTZXBR6S/2468098.html:text/html}
}
@article{antczak_rnapdbeewebserver_2014,
title = {{RNApdbee}—a webserver to derive secondary structures from pdb files of knotted and unknotted {RNAs}},
volume = {42},
issn = {0305-1048},
url = {https://academic.oup.com/nar/article/42/W1/W368/2435287},
doi = {10.1093/nar/gku330},
abstract = {Abstract. In RNA structural biology and bioinformatics an access to correct RNA secondary structure and its proper representation is of crucial importance. Thi},
language = {en},
number = {W1},
urldate = {2018-10-09},
journal = {Nucleic Acids Research},
author = {Antczak, Maciej and Zok, Tomasz and Popenda, Mariusz and Lukasiak, Piotr and Adamiak, Ryszard W. and Blazewicz, Jacek and Szachniuk, Marta},
month = jul,
year = {2014},
pages = {W368--W372},
file = {Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/RWXNJQH6/Antczak et al. - 2014 - RNApdbee—a webserver to derive secondary structure.pdf:application/pdf;Snapshot:/nhome/siniac/lbecquey/Zotero/storage/H6CZVH4F/2435287.html:text/html}
}
@article{laing_computational_2010,
title = {Computational approaches to 3D modeling of {RNA}},
volume = {22},
issn = {0953-8984},
url = {http://stacks.iop.org/0953-8984/22/i=28/a=283101},
doi = {10.1088/0953-8984/22/28/283101},
abstract = {Many exciting discoveries have recently revealed the versatility of RNA and its importance in a variety of functions within the cell. Since the structural features of RNA are of major importance to their biological function, there is much interest in predicting RNA structure, either in free form or in interaction with various ligands, including proteins, metabolites and other molecules. In recent years, an increasing number of researchers have developed novel RNA algorithms for predicting RNA secondary and tertiary structures. In this review, we describe current experimental and computational advances and discuss recent ideas that are transforming the traditional view of RNA folding. To evaluate the performance of the most recent RNA 3D folding algorithms, we provide a comparative study in order to test the performance of available 3D structure prediction algorithms for an RNA data set of 43 structures of various lengths and motifs. We find that the algorithms vary widely in terms of prediction quality across different RNA lengths and topologies; most predictions have very large root mean square deviations from the experimental structure. We conclude by outlining some suggestions for future RNA folding research.},
language = {en},
number = {28},
urldate = {2018-10-09},
journal = {Journal of Physics: Condensed Matter},
author = {Laing, Christian and Schlick, Tamar},
year = {2010},
pages = {283101}
}
@article{dawson_computational_2016,
series = {Theory and simulation • {Macromolcular} machines},
title = {Computational modeling of {RNA} 3D structures and interactions},
volume = {37},
issn = {0959-440X},
url = {http://www.sciencedirect.com/science/article/pii/S0959440X15001700},
doi = {10.1016/j.sbi.2015.11.007},
abstract = {RNA molecules have key functions in cellular processes beyond being carriers of protein-coding information. These functions are often dependent on the ability to form complex three-dimensional (3D) structures. However, experimental determination of RNA 3D structures is difficult, which has prompted the development of computational methods for structure prediction from sequence. Recent progress in 3D structure modeling of RNA and emerging approaches for predicting RNA interactions with ions, ligands and proteins have been stimulated by successes in protein 3D structure modeling.},
urldate = {2018-10-09},
journal = {Current Opinion in Structural Biology},
author = {Dawson, Wayne K and Bujnicki, Janusz M},
month = apr,
year = {2016},
pages = {22--28},
file = {ScienceDirect Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/7V5SQ8PN/Dawson et Bujnicki - 2016 - Computational modeling of RNA 3D structures and in.pdf:application/pdf;ScienceDirect Snapshot:/nhome/siniac/lbecquey/Zotero/storage/CDMTYU7W/S0959440X15001700.html:text/html}
}
@article{laing_computational_2011,
title = {Computational approaches to {RNA} structure prediction, analysis, and design},
volume = {21},
issn = {0959-440X},
url = {http://www.sciencedirect.com/science/article/pii/S0959440X11000674},
doi = {10.1016/j.sbi.2011.03.015},
abstract = {RNA molecules are important cellular components involved in many fundamental biological processes. Understanding the mechanisms behind their functions requires RNA tertiary structure knowledge. Although modeling approaches for the study of RNA structures and dynamics lag behind efforts in protein folding, much progress has been achieved in the past two years. Here, we review recent advances in RNA folding algorithms, RNA tertiary motif discovery, applications of graph theory approaches to RNA structure and function, and in silico generation of RNA sequence pools for aptamer design. Advances within each area can be combined to impact many problems in RNA structure and function.},
number = {3},
urldate = {2018-10-09},
journal = {Current Opinion in Structural Biology},
author = {Laing, Christian and Schlick, Tamar},
month = jun,
year = {2011},
pages = {306--318},
file = {ScienceDirect Snapshot:/nhome/siniac/lbecquey/Zotero/storage/LWS5RU5Z/S0959440X11000674.html:text/html}
}
@article{sato_ipknot:_2011,
title = {{IPknot}: fast and accurate prediction of {RNA} secondary structures with pseudoknots using integer programming},
volume = {27},
issn = {1367-4803},
shorttitle = {{IPknot}},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3117384/},
doi = {10.1093/bioinformatics/btr215},
abstract = {Motivation: Pseudoknots found in secondary structures of a number of functional RNAs play various roles in biological processes. Recent methods for predicting RNA secondary structures cover certain classes of pseudoknotted structures, but only a few of them achieve satisfying predictions in terms of both speed and accuracy., Results: We propose IPknot, a novel computational method for predicting RNA secondary structures with pseudoknots based on maximizing expected accuracy of a predicted structure. IPknot decomposes a pseudoknotted structure into a set of pseudoknot-free substructures and approximates a base-pairing probability distribution that considers pseudoknots, leading to the capability of modeling a wide class of pseudoknots and running quite fast. In addition, we propose a heuristic algorithm for refining base-paring probabilities to improve the prediction accuracy of IPknot. The problem of maximizing expected accuracy is solved by using integer programming with threshold cut. We also extend IPknot so that it can predict the consensus secondary structure with pseudoknots when a multiple sequence alignment is given. IPknot is validated through extensive experiments on various datasets, showing that IPknot achieves better prediction accuracy and faster running time as compared with several competitive prediction methods., Availability: The program of IPknot is available at http://www.ncrna.org/software/ipknot/. IPknot is also available as a web server at http://rna.naist.jp/ipknot/., Contact: satoken@k.u-tokyo.ac.jp; ykato@is.naist.jp, Supplementary information: Supplementary data are available at Bioinformatics online.},
number = {13},
urldate = {2018-10-12},
journal = {Bioinformatics},
author = {Sato, Kengo and Kato, Yuki and Hamada, Michiaki and Akutsu, Tatsuya and Asai, Kiyoshi},
month = jul,
year = {2011},
pmid = {21685106},
pmcid = {PMC3117384},
pages = {i85--i93},
file = {Texte intégral:/nhome/siniac/lbecquey/Zotero/storage/EEWT77EA/Sato et al. - 2011 - IPknot fast and accurate prediction of RNA second.pdf:application/pdf}
}
@article{zirbel_identifying_2015,
title = {Identifying novel sequence variants of {RNA} 3D motifs},
volume = {43},
issn = {0305-1048},
url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4551918/},
doi = {10.1093/nar/gkv651},
abstract = {Predicting RNA 3D structure from sequence is a major challenge in biophysics. An important sub-goal is accurately identifying recurrent 3D motifs from RNA internal and hairpin loop sequences extracted from secondary structure (2D) diagrams. We have developed and validated new probabilistic models for 3D motif sequences based on hybrid Stochastic Context-Free Grammars and Markov Random Fields (SCFG/MRF). The SCFG/MRF models are constructed using atomic-resolution RNA 3D structures. To parameterize each model, we use all instances of each motif found in the RNA 3D Motif Atlas and annotations of pairwise nucleotide interactions generated by the FR3D software. Isostericity relations between non-Watson–Crick basepairs are used in scoring sequence variants. SCFG techniques model nested pairs and insertions, while MRF ideas handle crossing interactions and base triples. We use test sets of randomly-generated sequences to set acceptance and rejection thresholds for each motif group and thus control the false positive rate. Validation was carried out by comparing results for four motif groups to RMDetect. The software developed for sequence scoring (JAR3D) is structured to automatically incorporate new motifs as they accumulate in the RNA 3D Motif Atlas when new structures are solved and is available free for download.},
number = {15},
urldate = {2018-10-19},
journal = {Nucleic Acids Research},
author = {Zirbel, Craig L. and Roll, James and Sweeney, Blake A. and Petrov, Anton I. and Pirrung, Meg and Leontis, Neocles B.},
month = sep,
year = {2015},
pmid = {26130723},
pmcid = {PMC4551918},
pages = {7504--7520},
file = {PubMed Central Full Text PDF:/nhome/siniac/lbecquey/Zotero/storage/C68JKL5J/Zirbel et al. - 2015 - Identifying novel sequence variants of RNA 3D moti.pdf:application/pdf}
}
\ No newline at end of file
<?xml version="1.0"?>
<!DOCTYPE ipe SYSTEM "ipe.dtd">
<ipe version="70206" creator="Ipe 7.2.7">
<info created="D:20181019094517" modified="D:20181019094517"/>
<ipestyle name="basic">
<symbol name="arrow/arc(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/farc(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/ptarc(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/fptarc(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="mark/circle(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e
0.4 0 0 0.4 0 0 e
</path>
</symbol>
<symbol name="mark/disk(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e
</path>
</symbol>
<symbol name="mark/fdisk(sfx)" transformations="translations">
<group>
<path fill="sym-fill">
0.5 0 0 0.5 0 0 e
</path>
<path fill="sym-stroke" fillrule="eofill">
0.6 0 0 0.6 0 0 e
0.4 0 0 0.4 0 0 e
</path>
</group>
</symbol>
<symbol name="mark/box(sx)" transformations="translations">
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
-0.4 -0.4 m
0.4 -0.4 l
0.4 0.4 l
-0.4 0.4 l
h
</path>
</symbol>
<symbol name="mark/square(sx)" transformations="translations">
<path fill="sym-stroke">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
</path>
</symbol>
<symbol name="mark/fsquare(sfx)" transformations="translations">
<group>
<path fill="sym-fill">
-0.5 -0.5 m
0.5 -0.5 l
0.5 0.5 l
-0.5 0.5 l
h
</path>
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
-0.4 -0.4 m
0.4 -0.4 l
0.4 0.4 l
-0.4 0.4 l
h
</path>
</group>
</symbol>
<symbol name="mark/cross(sx)" transformations="translations">
<group>
<path fill="sym-stroke">
-0.43 -0.57 m
0.57 0.43 l
0.43 0.57 l
-0.57 -0.43 l
h
</path>
<path fill="sym-stroke">
-0.43 0.57 m
0.57 -0.43 l
0.43 -0.57 l
-0.57 0.43 l
h
</path>
</group>
</symbol>
<symbol name="arrow/fnormal(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/pointed(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/fpointed(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/linear(spx)">
<path stroke="sym-stroke" pen="sym-pen">
-1 0.333 m
0 0 l
-1 -0.333 l
</path>
</symbol>
<symbol name="arrow/fdouble(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
-1 0 m
-2 0.333 l
-2 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/double(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
-1 0 m
-2 0.333 l
-2 -0.333 l
h
</path>
</symbol>
<pen name="heavier" value="0.8"/>
<pen name="fat" value="1.2"/>
<pen name="ultrafat" value="2"/>
<symbolsize name="large" value="5"/>
<symbolsize name="small" value="2"/>
<symbolsize name="tiny" value="1.1"/>
<arrowsize name="large" value="10"/>
<arrowsize name="small" value="5"/>
<arrowsize name="tiny" value="3"/>
<color name="red" value="1 0 0"/>
<color name="green" value="0 1 0"/>
<color name="blue" value="0 0 1"/>
<color name="yellow" value="1 1 0"/>
<color name="orange" value="1 0.647 0"/>
<color name="gold" value="1 0.843 0"/>
<color name="purple" value="0.627 0.125 0.941"/>
<color name="gray" value="0.745"/>
<color name="brown" value="0.647 0.165 0.165"/>
<color name="navy" value="0 0 0.502"/>
<color name="pink" value="1 0.753 0.796"/>
<color name="seagreen" value="0.18 0.545 0.341"/>
<color name="turquoise" value="0.251 0.878 0.816"/>
<color name="violet" value="0.933 0.51 0.933"/>
<color name="darkblue" value="0 0 0.545"/>
<color name="darkcyan" value="0 0.545 0.545"/>
<color name="darkgray" value="0.663"/>
<color name="darkgreen" value="0 0.392 0"/>
<color name="darkmagenta" value="0.545 0 0.545"/>
<color name="darkorange" value="1 0.549 0"/>
<color name="darkred" value="0.545 0 0"/>
<color name="lightblue" value="0.678 0.847 0.902"/>
<color name="lightcyan" value="0.878 1 1"/>
<color name="lightgray" value="0.827"/>
<color name="lightgreen" value="0.565 0.933 0.565"/>
<color name="lightyellow" value="1 1 0.878"/>
<dashstyle name="dashed" value="[4] 0"/>
<dashstyle name="dotted" value="[1 3] 0"/>
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
<textsize name="large" value="\large"/>
<textsize name="Large" value="\Large"/>
<textsize name="LARGE" value="\LARGE"/>
<textsize name="huge" value="\huge"/>
<textsize name="Huge" value="\Huge"/>
<textsize name="small" value="\small"/>
<textsize name="footnote" value="\footnotesize"/>
<textsize name="tiny" value="\tiny"/>
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
<gridsize name="4 pts" value="4"/>
<gridsize name="8 pts (~3 mm)" value="8"/>
<gridsize name="16 pts (~6 mm)" value="16"/>
<gridsize name="32 pts (~12 mm)" value="32"/>
<gridsize name="10 pts (~3.5 mm)" value="10"/>
<gridsize name="20 pts (~7 mm)" value="20"/>
<gridsize name="14 pts (~5 mm)" value="14"/>
<gridsize name="28 pts (~10 mm)" value="28"/>
<gridsize name="56 pts (~20 mm)" value="56"/>
<anglesize name="90 deg" value="90"/>
<anglesize name="60 deg" value="60"/>
<anglesize name="45 deg" value="45"/>
<anglesize name="30 deg" value="30"/>
<anglesize name="22.5 deg" value="22.5"/>
<opacity name="10%" value="0.1"/>
<opacity name="30%" value="0.3"/>
<opacity name="50%" value="0.5"/>
<opacity name="75%" value="0.75"/>
<tiling name="falling" angle="-60" step="4" width="1"/>
<tiling name="rising" angle="30" step="4" width="1"/>
</ipestyle>
<page>
<layer name="alpha"/>
<view layers="alpha" active="alpha"/>
<path layer="alpha" stroke="black" pen="ultrafat">
64 784 m
416 784 l
</path>
<use name="mark/disk(sx)" pos="80 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="96 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="112 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="128 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="144 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="160 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="176 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="192 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="208 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="224 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="240 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="256 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="272 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="288 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="304 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="320 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="336 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="352 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="368 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="384 784" size="large" stroke="black"/>
<use name="mark/disk(sx)" pos="400 784" size="large" stroke="black"/>
<path stroke="red">
136 792 m
136 776 l
328 776 l
328 792 l
h
</path>
<path matrix="1 0 0 1 0 -48" stroke="black" pen="ultrafat">
64 784 m
416 784 l
</path>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="80 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="96 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="112 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="128 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="144 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="160 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="176 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="192 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="208 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="224 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="240 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="256 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="272 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="288 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="304 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="320 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="336 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="352 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="368 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="384 784" size="large" stroke="black"/>
<use matrix="1 0 0 1 0 -48" name="mark/disk(sx)" pos="400 784" size="large" stroke="black"/>
<path matrix="1 0 0 1 0 -48" stroke="red">
136 792 m
136 776 l
328 776 l
328 792 l
h
</path>
<text matrix="1 0 0 1 8 -16" transformations="translations" pos="128 816" stroke="red" type="label" width="19.442" height="6.176" depth="4.09" valign="baseline" size="Large">$p_{x,i}$</text>
<text matrix="1 0 0 1 0 -16" transformations="translations" pos="136 832" stroke="black" type="label" width="11.515" height="8.896" depth="0" valign="baseline" size="huge">$u$</text>
<text matrix="1 0 0 1 8 -64" transformations="translations" pos="128 816" stroke="red" type="label" width="19.442" height="6.176" depth="4.09" valign="baseline" size="Large">$p_{x,i}$</text>
<text matrix="1 0 0 1 60 -16" transformations="translations" pos="324 808" stroke="red" type="label" width="35.903" height="6.225" depth="2.16" valign="baseline" size="small">$k_{x,i} = 12$</text>
<text matrix="1 0 0 1 60 -60" transformations="translations" pos="324 808" stroke="red" type="label" width="35.903" height="6.225" depth="2.16" valign="baseline" size="small" style="math">k_{x,i} = 12</text>
<text matrix="1 0 0 1 180 -116" transformations="translations" pos="136 832" stroke="black" type="label" width="11.515" height="8.896" depth="0" valign="baseline" size="huge" style="math">u</text>
<text matrix="1 0 0 1 -20 -132" transformations="translations" pos="136 832" stroke="black" type="label" width="69.552" height="9.962" depth="4.09" valign="baseline" size="Large" style="math">u-k_{x,i}+1</text>
<path stroke="black" fill="white" arrow="normal/normal">
144 712 m
144 732 l
</path>
</page>
</ipe>
<?xml version="1.0"?>
<!DOCTYPE ipe SYSTEM "ipe.dtd">
<ipe version="70206" creator="Ipe 7.2.7">
<info created="D:20181012182334" modified="D:20181012182334"/>
<ipestyle name="basic">
<symbol name="arrow/arc(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/farc(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/ptarc(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/fptarc(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="mark/circle(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e
0.4 0 0 0.4 0 0 e
</path>
</symbol>
<symbol name="mark/disk(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e
</path>
</symbol>
<symbol name="mark/fdisk(sfx)" transformations="translations">
<group>
<path fill="sym-fill">
0.5 0 0 0.5 0 0 e
</path>
<path fill="sym-stroke" fillrule="eofill">
0.6 0 0 0.6 0 0 e
0.4 0 0 0.4 0 0 e
</path>
</group>
</symbol>
<symbol name="mark/box(sx)" transformations="translations">
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
-0.4 -0.4 m
0.4 -0.4 l
0.4 0.4 l
-0.4 0.4 l
h
</path>
</symbol>
<symbol name="mark/square(sx)" transformations="translations">
<path fill="sym-stroke">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
</path>
</symbol>
<symbol name="mark/fsquare(sfx)" transformations="translations">
<group>
<path fill="sym-fill">
-0.5 -0.5 m
0.5 -0.5 l
0.5 0.5 l
-0.5 0.5 l
h
</path>
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m
0.6 -0.6 l
0.6 0.6 l
-0.6 0.6 l
h
-0.4 -0.4 m
0.4 -0.4 l
0.4 0.4 l
-0.4 0.4 l
h
</path>
</group>
</symbol>
<symbol name="mark/cross(sx)" transformations="translations">
<group>
<path fill="sym-stroke">
-0.43 -0.57 m
0.57 0.43 l
0.43 0.57 l
-0.57 -0.43 l
h
</path>
<path fill="sym-stroke">
-0.43 0.57 m
0.57 -0.43 l
0.43 -0.57 l
-0.57 0.43 l
h
</path>
</group>
</symbol>
<symbol name="arrow/fnormal(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/pointed(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/fpointed(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-0.8 0 l
-1 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/linear(spx)">
<path stroke="sym-stroke" pen="sym-pen">
-1 0.333 m
0 0 l
-1 -0.333 l
</path>
</symbol>
<symbol name="arrow/fdouble(spx)">
<path stroke="sym-stroke" fill="white" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
-1 0 m
-2 0.333 l
-2 -0.333 l
h
</path>
</symbol>
<symbol name="arrow/double(spx)">
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
0 0 m
-1 0.333 l
-1 -0.333 l
h
-1 0 m
-2 0.333 l
-2 -0.333 l
h
</path>
</symbol>
<pen name="heavier" value="0.8"/>
<pen name="fat" value="1.2"/>
<pen name="ultrafat" value="2"/>
<symbolsize name="large" value="5"/>
<symbolsize name="small" value="2"/>
<symbolsize name="tiny" value="1.1"/>
<arrowsize name="large" value="10"/>
<arrowsize name="small" value="5"/>
<arrowsize name="tiny" value="3"/>
<color name="red" value="1 0 0"/>
<color name="green" value="0 1 0"/>
<color name="blue" value="0 0 1"/>
<color name="yellow" value="1 1 0"/>
<color name="orange" value="1 0.647 0"/>
<color name="gold" value="1 0.843 0"/>
<color name="purple" value="0.627 0.125 0.941"/>
<color name="gray" value="0.745"/>
<color name="brown" value="0.647 0.165 0.165"/>
<color name="navy" value="0 0 0.502"/>
<color name="pink" value="1 0.753 0.796"/>
<color name="seagreen" value="0.18 0.545 0.341"/>
<color name="turquoise" value="0.251 0.878 0.816"/>
<color name="violet" value="0.933 0.51 0.933"/>
<color name="darkblue" value="0 0 0.545"/>
<color name="darkcyan" value="0 0.545 0.545"/>
<color name="darkgray" value="0.663"/>
<color name="darkgreen" value="0 0.392 0"/>
<color name="darkmagenta" value="0.545 0 0.545"/>
<color name="darkorange" value="1 0.549 0"/>
<color name="darkred" value="0.545 0 0"/>
<color name="lightblue" value="0.678 0.847 0.902"/>
<color name="lightcyan" value="0.878 1 1"/>
<color name="lightgray" value="0.827"/>
<color name="lightgreen" value="0.565 0.933 0.565"/>
<color name="lightyellow" value="1 1 0.878"/>
<dashstyle name="dashed" value="[4] 0"/>
<dashstyle name="dotted" value="[1 3] 0"/>
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
<textsize name="large" value="\large"/>
<textsize name="Large" value="\Large"/>
<textsize name="LARGE" value="\LARGE"/>
<textsize name="huge" value="\huge"/>
<textsize name="Huge" value="\Huge"/>
<textsize name="small" value="\small"/>
<textsize name="footnote" value="\footnotesize"/>
<textsize name="tiny" value="\tiny"/>
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
<gridsize name="4 pts" value="4"/>
<gridsize name="8 pts (~3 mm)" value="8"/>
<gridsize name="16 pts (~6 mm)" value="16"/>
<gridsize name="32 pts (~12 mm)" value="32"/>
<gridsize name="10 pts (~3.5 mm)" value="10"/>
<gridsize name="20 pts (~7 mm)" value="20"/>
<gridsize name="14 pts (~5 mm)" value="14"/>
<gridsize name="28 pts (~10 mm)" value="28"/>
<gridsize name="56 pts (~20 mm)" value="56"/>
<anglesize name="90 deg" value="90"/>
<anglesize name="60 deg" value="60"/>
<anglesize name="45 deg" value="45"/>
<anglesize name="30 deg" value="30"/>
<anglesize name="22.5 deg" value="22.5"/>
<opacity name="10%" value="0.1"/>
<opacity name="30%" value="0.3"/>
<opacity name="50%" value="0.5"/>
<opacity name="75%" value="0.75"/>
<tiling name="falling" angle="-60" step="4" width="1"/>
<tiling name="rising" angle="30" step="4" width="1"/>
</ipestyle>
<page>
<layer name="alpha"/>
<view layers="alpha" active="alpha"/>
<path layer="alpha" matrix="1 0 0 1 -32 0" stroke="black" pen="ultrafat">
64 704 m
320 704 l
</path>
<path matrix="1 0 0 1 -32 0" stroke="black" pen="ultrafat">
96 704 m
32.249 0 0 -32.249 128 708 160 704 a
</path>
<path matrix="1 0 0 1 -32 0" stroke="black" pen="ultrafat">
208 704 m
25.2982 0 0 -25.2982 232 696 256 704 a
</path>
<path matrix="1 0 0 1 -32 0" stroke="black" pen="ultrafat">
128 704 m
77.746 0 0 -77.746 200 674.667 272 704 a
</path>
<path matrix="1 0 0 1 256 64" stroke="black" pen="ultrafat">
64 704 m
320 704 l
</path>
<path matrix="1 0 0 1 256 64" stroke="black" pen="ultrafat">
208 704 m
25.2982 0 0 -25.2982 232 696 256 704 a
</path>
<path matrix="1 0 0 1 256 64" stroke="black" pen="ultrafat">
128 704 m
77.746 0 0 -77.746 200 674.667 272 704 a
</path>
<path matrix="1 0 0 1 256 -96" stroke="black" pen="ultrafat">
64 704 m
320 704 l
</path>
<path matrix="1 0 0 1 256 -96" stroke="black" pen="ultrafat">
96 704 m
32.249 0 0 -32.249 128 708 160 704 a
</path>
<text matrix="1 0 0 1 0 -16" transformations="translations" pos="64 688" stroke="black" type="label" width="202.242" height="17.213" depth="4.82" valign="baseline" size="Huge">structure $y$ with PK</text>
<path stroke="black" pen="ultrafat" arrow="normal/normal">
256 736 m
304 752 l
</path>
<path stroke="black" pen="ultrafat" arrow="normal/normal">
288 672 m
320 640 l
</path>
<text matrix="1 0 0 1 32 -16" transformations="translations" pos="384 752" stroke="black" type="label" width="60.952" height="16.741" depth="4.02" valign="baseline" size="huge">level $y^1$</text>
<text transformations="translations" pos="416 576" stroke="black" type="label" width="60.952" height="16.741" depth="4.02" valign="baseline" size="huge">level $y^2$</text>
<text transformations="translations" pos="432 672" stroke="black" type="label" width="17.843" height="13.97" depth="1.57" valign="baseline" size="Huge">+</text>
</page>
</ipe>
No preview for this file type
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx} % images PNG
\usepackage{geometry} % margins
\usepackage{url} % links
\usepackage{charter} % betterfont
\usepackage{stmaryrd} % math symbols ?
\usepackage{eso-pic}
\usepackage{siunitx} % SI units
\usepackage{amsmath} % advanced math symbols
\usepackage{rotating}
\usepackage{multirow}
\usepackage{color, colortbl} % color fonts and table backgrounds
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{notoccite}
\usepackage{fancyhdr} % page headers/footers
\newcommand\BackgroundPic{\put(0,0){\parbox[b][\paperheight]{\paperwidth}{
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{background.png}
\vfill
}}}
\geometry{top=1.5cm,bottom=1.5cm, left=2cm, right=2cm}
\titlespacing*{\paragraph}{0pt}{0pt plus 0pt minus 0pt}{0pt plus 0pt minus 0pt}
\titlespacing*{\subsection}{0pt}{0pt plus 0pt minus 0pt}{0pt plus 0pt minus 0pt}
\titlespacing*{\itemize}{0pt}{0pt plus 0pt minus 0pt}{0pt plus 0pt minus 0pt}
\title{Intermediate Work Report:}
\author{Louis Becquey}
\date{\today}
\setlength\parskip{\baselineskip}
\pagestyle{fancy}
\setlength{\headheight}{14.7pt}
\fancyhead[L]{\textsc{IP framework inserting RNA motives}}
% \fancyhead[L]{\leftmark}
\fancyhead[R]{Louis Becquey}
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage}
\begin{document}
\begin{titlepage}
\AddToShipoutPicture*{\BackgroundPic}
\begin{center}
\vspace{3cm}
\LARGE
\textsc{Intermediate Work Report:}\\
{\Large Louis Becquey, \today}\\
\vspace{2cm}
\textit{An IP framework that uses detected possible RNA motifs\\ to predict RNA secondary structures}\\
\end{center}
\normalsize
\vspace{5cm}
\hrulefill
\flushright{
\textbf{under the supervision of:\\}
Fariza Tahi, HDR \\
Eric Angel, HDR \\
\textit{AROBAS, IBISC, Paris-Saclay University}\\
~ \\
\includegraphics[height=1cm]{logoIBISC.png} ~ ~
\includegraphics[height=1cm]{minisaclay.png}
}
\flushleft
\hrulefill
\tableofcontents
\end{titlepage}
\newpage
\section{Motivation}
We now have quite consistent RNA motif databases (RNA3Dmotif \cite{djelloul_automated_2008}, the RNA Motif Atlas \cite{petrov_automated_2013}).\\
We call a RNA motif the combined description of these points:
\begin{itemize}
\item A sequence or consensus sequence that we know to adopt a particular base-pairing organisation (sequence information),
\item A particular base-pairing pattern in this sequence (or consensus sequence) considering canonical \& wobble pairing (bi-dimensional information),
\item A particular organisation of non-canonical contacts in space (tri-dimensional information).
\end{itemize}
Then, a RNA motif is direct data about how a sequence can fold in space. Here, we are interested in using them to predict the bi or tri dimensional structure of an RNA sequence from scratch.
Then, the algorithm we plan to use is the following:
\begin{itemize}
\item Find all possible occurences of known RNA motifs in the query sequence by pattern matching of the motifs consensus sequences against the query bases,
\item Define constraints on the secondary structure imposed by motives if included
\item Find a secondary structure that satisfies both the most the expected accuracy (MEA model) and criterion of motif inclusion, by solving a bi-objective IP problem, using the previous constraints.
\end{itemize}
\newpage
\section{Pattern matching to detect motif sites}
A very complete model has been developped by the BGSU team \cite{zirbel_identifying_2015},
which perfectly suits this need: JAR3D finds, given a RNA sequence with no additional information,
the sites that are likely to fold in known 3D motives of the RNA Motif Atlas \cite{petrov_automated_2013}.
The RNA 3D Motif Atlas is an updated database of substructures exracted from a non-redundant set of 3D RNA structures. They are grouped into "motifs", which are a given pattern of 3D non-canonical interactions.
Each motif contains one or several instances observed in real RNA structures.
The instances might differ in sequence, length of bulged insertions, and other details, but share a common graph of 3D non-canonical interactions.
For each motif group of the database, JAR3D estimates the probability that a sequence folds into the 3D pattern, given the known members of the motif group. It takes into account crossed contacts, base-ribose and base-phosphate interactions, and triple base-pairs.
This is the most scientifically correct approach to use to my knowledge. Unfortunately, the code is in MatLab and seems hard to use on a single computer (JAR3D is basically a webserver).
\section{Formulation of the IP problem}
This formulation is an improved merge between the IPknot \cite{sato_ipknot:_2011} formulation (without "levels") and RNAMoIP's one \cite{reinharz_towards_2012}.
% This problem has been inspired by IPknot's model \cite{sato_ipknot:_2011}, but without the use of what they call \textit{levels}, which are pseudoknot-free
% structures that should be superposed to give the true pseudoknotted secondary structure graph.\\
% Levels are mutually exclusive (a base cannot be paired in two different levels). The more levels you use, the more decision variables you have,
% but the more complex pseudoknots you are able to predict. IPknot and BiokoP use 2 levels, to predict simple knots.\\
% \begin{figure}[h]\centering \includegraphics[height=5cm]{levels.png}\end{figure}
\subsection{Variables}
% Let $m$ be the number of levels that our program uses.\\
Let $n$ be the number of nucleotides in the query RNA sequence $s$.\\
Let $M$ be the set of motifs that could be inserted in $s$ (a match exist between $s$ and the sequence of the motifs' components).\\
Let $x$ be a motif of $M$, $x$ having $j^x$ distinct components.\\
Let $P_{x,i}$ be the set of positions in $s$ where we can insert the $i$th component of motif $x$.\\
Let $k_{x,i}$ be the size in nucleotides of that $i$th component of $x$.\\
Let $y^u_v$ be the \textbf{decision boolean variable} indicating that $s[u]$ and $s[v]$ form a canonical base pairing. Then, we always have $u \neq v$.\\
Let $C^{x,i}_p$ be the \textbf{decision boolean variable} indicating that we do insert the $i$th component of motif $x$ at position $p$.
Note that a base pair $y^u_v$ is possible if and only if $v>u+3$, and that we do not need to use two variables $y^u_v$ and $y_{vu}$ for the same pair.
Then, we have $\sum_{i=4}^n (n-i)$ decision variables ($\approx \frac{1}{2}n^2$ decision variables) of the form $y^u_v$.
Regarding the $C^{x,i}_p$, if we have an average insertion of $\nu$ motives by RNA sequence, the motives having in average $\mu$ components, components that can be inserted in average at $\pi$ different positions in $s$,
then we need to add, in average, $\nu \times \mu \times \pi$ decision variables $C^{x,i}_p$.
Then, we expect having around $\frac{1}{2}n^2+\nu \mu \pi$ decision variables.
\newpage
\subsection{Objectives}
We have two objectives : Find a structure with correct expected accuracy, and find a structure which includes (large) known motifs.
Let $X$ be the vector of all our decision variables, we define the following loss functions to maximize:
$$ f_1(X) = \sum_{x \in M} \left[ (j^x)^2 \times \sum_{p \in P_{x,1}} C^{x,1}_p \right]$$
$$ f_2(X) = \sum_{u<v} p_{uv}\times y^u_v \times I[p_{uv}>\theta], \qquad \qquad
p_{uv} = \sum_{\sigma \in S(s)} y^u_v.p(\sigma | s)$$
$f_1$ is supposed to maximize the number of inserted motives in $s$, weighted by their number of components.
$f_2$ is supposed to maximise the expected accuracy of the secondary structure (MEA model).
$p_{uv}$ are the base pairing probabilities that can be estimated from a set $S(s)$ of secondary structures of $s$.
\subsection{10 Constraints to bind them all}
\paragraph{Constraint to ensure there only is 0 or 1 canonical pairing by nucleotide} ~
\begin{equation} \label{constraint:1}
\sum_{v>u} y^u_v + \sum_{v<u} y^v_u \leq 1 \qquad\qquad \forall u \in \llbracket 1,n \rrbracket
\end{equation}
\paragraph{Constraints to forbid lonely base pairs} ~
\begin{equation} \label{constraint:2}
1 + \sum_{v=u}^n y^{u-1}_v - \sum_{v=u+1}^n y^u_v + \sum_{v=u+2}^n y^{u+1}_v \geq 1 \qquad \qquad \forall u \in \llbracket 1,n\rrbracket
\end{equation}
\begin{equation} \label{constraint:3}
1 + \sum_{u=1}^{v-2} y^u_{v-1} - \sum_{u=1}^{v-1} y^u_v + \sum_{u=1}^{v} y^u_{v+1} \geq 1 \qquad \qquad \forall v \in \llbracket 1,n\rrbracket
\end{equation}
These conditions ensure that if a base pair exists with $s[i]$,
one of the adjacent bases is paired too.
Equation \ref{constraint:2} is useful if $s[u]$ is paired with $s[v>u]$ (a nucleotide later in the sequence),
and equation \ref{constraint:3} if $s[v]$ is paired with $s[u<v]$ (a nucleotide earlier in the sequence).
\paragraph{Constraint to forbid pairings inside a motif component} ~
\begin{equation} \label{constraint:4}
k_{x,i} \; C^{x,i}_p + \sum_{u=p}^{p+k_{x,i}-1}\left[ \sum_{v>u} y^u_v + \sum_{v<u} y^v_u \right] \leq k_{x,i}
\qquad \qquad \forall p \in P_{x,i} \qquad \forall x \in M, i \in \llbracket 1,j^x \rrbracket
\end{equation}
\paragraph{Constraint to forbid component to overlap} ~
\begin{equation} \label{constraint:5}
\sum_{x \in M} \sum_{i=1}^{j^x}\sum_{\substack{p \in P_{x,i}\\u-k_{x,i}+1 \leq p \leq u}}^u C^{x,i}_p \leq 1 \qquad \qquad \forall u \in \llbracket 1,n \rrbracket
\end{equation}
Then, whatever the nucleotide $u$, it can be part of a motif component only once.
$u$ belongs to a component $x,i$ if and only if $u-k_{x,i}+1 \leq p_{x,i} \leq u$.\\
\begin{center}\includegraphics[height=3cm]{component.png}\end{center}
\paragraph{Constraints to respect the structure of large motives ($\forall x \in \{ x\in M | j^x \geq 2\}$)} ~
The first two constraints ensure that a component is inserted if and only if the next and the previous one are also inserted somewhere.
They also force a minimal distance of 3 nucleotides between any two consecutive components of the same motif.
\begin{equation}\label{constraint:6}
C^{x,i}_p \leq \sum_{\substack{p' \in P_{x,i+1}\\ p'>p+k_{x,i}+2}} C^{x,i+1}_{p'}
\qquad \qquad \forall p \in P_{x,i} \qquad \forall x \in \{ x\in M | j^x \geq 2\}, i \in \llbracket 1,j^x \llbracket
\end{equation}
\begin{equation}\label{constraint:7}
C^{x,i}_p \leq \sum_{\substack{p' \in P_{x,i-1}\\ p'<p-k_{x,i-1}-2}} C^{x,i-1}_{p'}
\qquad \qquad \forall p \in P_{x,i} \qquad \forall x \in \{ x\in M | j^x \geq 2\}, i \in \rrbracket 1,j^x \rrbracket
\end{equation}
We add another one to ensure that all components of any motif are inserted the same number of times in $s$:
\begin{equation}\label{constraint:8}
\sum_{p\in P_{x,1}} C^{x,1}_p - \frac{1}{j^x} \sum_{i=1}^{j^x} \sum_{p\in P_{x,i}} C^{x,i}_p = 0 \qquad \qquad x\in M
\end{equation}
And finally, we force base pairs between the end of a component and the beginning of the next one:
\begin{equation}\label{constraint:9}
C^{x,i}_p \leq \sum_{p' \in P_{x,i-1}} y^{p'+k_{x,i}-1}_p \qquad \qquad \forall x \in \{ x\in M | j^x \geq 2\}, i \in \rrbracket 1,j^x \rrbracket
\end{equation}
\begin{equation}\label{constraint:10}
C^{x,i}_p \leq \sum_{p' \in P_{x,i+1}} y^{p+k_{x,i}-1}_{p'} \qquad \qquad \forall x \in \{ x\in M | j^x \geq 2\}, i \in \llbracket 1,j^x \llbracket
\end{equation}
\section{Remaning questions}
\begin{itemize}
\item I am not sure how to compute the base-pair probabilities for the MEA model (objective $f_2$).
If you already have a set of secondary structures $S(s)$, why do you need this program ?
\item In objective $f_1$, weighting the motif by the number of components (squared) shows no reason to be the best idea.
Some exploration is needed. An additional weight given by the pattern-matching step might be an idea, reflecting the probability to see the motif here in $s$.
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \newpage
\bibliographystyle{unsrt}
\bibliography{RNA}
\end{document}
\ No newline at end of file
>All values represent delta G in units of deka cal/mol (kcal/mol*100)
>Stacking 5' X1 Y1 3'
> 3' X2 Y2 5'
>X1X2 = AU CG GC UA GU UG (row headings)
>Y1Y2 = AU CG GC UA GU UG (column headings)
-90 -220 -210 -110 -60 -140
-210 -330 -240 -210 -140 -210
-240 -340 -330 -220 -150 -250
-130 -240 -210 -90 -100 -130
-130 -250 -210 -140 -50 130
-100 -150 -140 -60 30 -50
>Hairpin Loop Energies: size = 1,2,3,..,30
0 0 570 560 560 540 590 560 640 650 660 670 680 690 690 700 710 710 720 720 730 730 740 740 750 750 750 760 760 770
>Bulge loop Energies: size = 1,2,3,..,30
380 280 320 360 400 440 460 470 480 490 500 510 520 530 540 540 550 550 560 570 570 580 580 580 590 590 600 600 600 610
>Interior Loop Energies: size = 1,2,3,..,30
0 0 0 170 180 200 220 230 240 250 260 270 280 290 300 300 310 310 320 330 330 340 340 340 350 350 360 360 360 370
>NINIO asymmetry Terms: m1, m2, m3, m4, max
>Energy = MAX[ max, asymmetry*m#] where # = MIN(4,L1,L2)
>and L1, L2 are lengths of each side of loop,
>and asymmetry = |L1-L2|
50 50 50 50 300
>Triloops 5' .. 3' (Not listed equals 0 bonus)
AAAAU 0
>Tetraloops 5' .. 3' (Not listed equals 0 bonus)
AGAAAU -200
AGCAAU -150
AGUAAU -150
AGUGAU -150
CGAAAG -300
CGAAGG -250
CGAGAG -200
CGCAAG -300
CGCGAG -250
CGGAAG -300
CGGGAG -150
CGUAAG -200
CGUGAG -300
CUAACG -200
CUACGG -250
CUUCGG -300
GGAAAC -300
GGAAGC -150
GGAGAC -300
GGCAAC -250
GGCGAC -150
GGGAAC -150
GGGAGC -150
GGGGAC -300
GGUGAC -300
GUGAAC -150
UGAAAA -150
UGAAAG -200
UGAGAG -250
UGGAAA -150
>Mismatch HP:
>Columns 5'-AU,CG,GC,UA,GU,UG-3'
>rows 5'-AA,AC,AG,AU,CA,..,UU-3'
-30 -150 -110 -50 20 -50
-50 -150 -150 -30 -50 -30
-30 -140 -130 -60 -30 -60
-30 -180 -210 -50 -30 -50
-10 -100 -110 -20 -10 -20
-20 -90 -70 -10 -20 -10
-150 -290 -240 -120 -150 -170
-20 -80 -50 0 -20 0
-110 -220 -240 -140 -90 -80
-120 -200 -290 -120 -110 -120
-20 -160 -140 -70 -30 -30
20 -110 -120 -20 0 -70
-30 -170 -190 -30 -30 -60
-30 -140 -100 -10 -30 -10
-60 -180 -220 -50 -40 -60
-110 -200 -150 -80 -110 -80
>Mismatch Interior:
>Columns 5'-AU,CG,GC,UA,GU,UG-3'
>rows 5'-AA,AC,AG,AU,CA,..,UU-3'
70 0 0 70 70 70
70 0 0 70 70 70
-40 -110 -110 -40 -40 -40
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
-40 -110 -110 -40 -40 -40
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
70 0 0 70 70 70
0 -70 -70 0 0 0
>Dangle Energies: 5' X1 Y 3'
> 3' X2 . 5'
>Columns: Y = A, C, G, U
>Rows = X1X2 = AU,CG,GC,UA,GU,UG
-80 -50 -80 -60
-170 -80 -170 -120
-110 -40 -130 -60
-70 -10 -70 -10
-80 -50 -80 -60
-70 -10 -70 -10
>Dangle Energies: 5' X1 . 3'
> 3' X2 Y 5'
>Columns: Y = A, C, G, U
>Rows = X1X2 = AU,CG,GC,UA,GU,UG
-30 -10 -20 -20
-20 -30 0 0
-50 -30 -20 -10
-30 -30 -40 -20
-30 -10 -20 -20
-30 -30 -40 -20
>Multiloop terms: ALPHA_1, ALPHA_2, ALPHA_3
>ML penalty = ALPHA_1 + s * ALPHA_2 + u *ALPHA_3
>s = # stems adjacent to ML, u = unpaired bases in ML
340 40 0
>AT_PENALTY:
>Penalty for non GC pairs that terminate a helix
50
>Interior Loops 1x1
>CG..AU = 5'- C X A 3'
> 3'- G Y U 5'
>Rows: X = A C G U (X constant for a row)
>Columns: Y = A C G U (Y constant in column)
AU..AU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 150
AU..CG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 100
AU..GC
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
AU..UA
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 120
AU..GU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
AU..UG
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
CG..AU
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
CG..CG
40 -40 40 40
30 50 40 50
-10 40 -170 40
40 0 40 -30
CG..GC
110 40 40 40
40 40 40 40
40 40 -140 40
40 40 40 40
CG..UA
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
CG..GU
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
CG..UG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
GC..AU
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
GC..CG
80 40 40 40
40 40 40 40
40 40 -210 40
40 40 40 -70
GC..GC
40 30 -10 40
-40 50 40 0
40 40 -170 40
40 50 40 -30
GC..UA
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 100
GC..GU
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
GC..UG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
UA..AU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 180
UA..CG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
UA..GC
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
UA..UA
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 150
UA..GU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
UA..UG
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
GU..AU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
GU..CG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
GU..GC
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
GU..UA
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
GU..GU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
GU..UG
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
UG..AU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
UG..CG
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
UG..GC
110 110 110 110
110 110 110 110
110 110 -100 110
110 110 110 110
UG..UA
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
UG..GU
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
UG..UG
170 170 170 170
170 170 170 170
170 170 -40 170
170 170 170 170
>Interior Loops 2x2
>CG.AG..AU = 5'- C A G A -3'
> 3'- G Y X U -5'
>Rows: X = A C G U (X constant for a row)
>Columns: Y = A C G U (Y constant in column)
AU.AA..AU
280 260 150 200
230 220 110 200
170 160 50 200
200 200 200 200
AU.AC..AU
280 260 150 200
340 260 250 200
200 200 200 200
340 260 250 200
AU.AG..AU
170 160 50 200
200 200 200 200
210 200 90 200
100 -20 50 200
AU.AU..AU
200 200 200 200
310 230 220 200
220 110 180 200
290 180 250 200
AU.CA..AU
250 310 200 310
210 200 200 200
150 240 200 240
200 200 200 200
AU.CC..AU
250 250 200 250
250 250 200 250
200 200 200 200
250 250 200 250
AU.CG..AU
150 240 200 240
200 200 200 200
190 240 200 240
-30 70 200 70
AU.CU..AU
200 200 200 200
220 220 200 220
100 190 200 190
170 160 200 160
AU.GA..AU
150 200 210 230
110 200 160 90
50 200 100 210
200 200 200 200
AU.GC..AU
150 200 210 130
250 200 270 230
200 200 200 200
250 200 270 230
AU.GG..AU
50 200 100 210
200 200 200 200
90 200 140 170
50 200 30 -150
AU.GU..AU
200 200 200 200
220 200 240 200
180 200 150 -20
250 200 220 230
AU.UA..AU
200 310 130 270
200 200 -10 120
200 240 110 240
200 200 200 200
AU.UC..AU
200 250 30 170
200 250 130 170
200 200 200 200
200 250 130 170
AU.UG..AU
200 240 110 240
200 200 200 200
200 240 70 200
200 70 -250 70
AU.UU..AU
200 200 200 200
200 220 100 140
200 190 -120 190
200 160 130 80
AU.AA..CG
210 200 90 200
190 170 60 200
10 0 -110 200
200 200 200 200
AU.AC..CG
180 170 60 200
250 170 160 200
200 200 200 200
150 70 70 200
AU.AG..CG
70 60 -50 200
200 200 200 200
180 160 50 200
0 -120 -50 200
AU.AU..CG
200 200 200 200
250 180 170 200
40 -80 -10 200
210 100 170 200
AU.CA..CG
190 240 200 240
160 160 200 160
-10 80 200 80
200 200 200 200
AU.CC..CG
160 150 200 150
160 160 200 160
200 200 200 200
60 60 200 60
AU.CG..CG
50 140 200 140
200 200 200 200
150 210 200 210
-130 -30 200 -30
AU.CU..CG
200 200 200 200
170 160 200 160
-90 10 200 10
90 80 200 80
AU.GA..CG
90 200 140 170
60 200 120 40
-110 200 -60 50
200 200 200 200
AU.GC..CG
60 200 110 40
160 200 180 140
200 200 200 200
70 200 80 50
AU.GG..CG
-50 200 0 110
200 200 200 200
50 200 110 130
-50 200 -70 -250
AU.GU..CG
200 200 200 200
170 200 180 150
-10 200 -30 -210
170 200 140 150
AU.UA..CG
200 240 70 200
200 160 -50 80
200 80 -50 80
200 200 200 200
AU.UC..CG
200 150 -60 70
200 160 50 80
200 200 200 200
200 60 -50 -20
AU.UG..CG
200 140 10 150
200 200 200 200
200 210 40 170
200 -30 -350 -30
AU.UU..CG
200 200 200 200
200 160 50 80
200 10 -310 10
200 80 50 0
AU.AA..GC
200 190 80 200
190 180 70 200
100 90 -20 200
200 200 200 200
AU.AC..GC
240 220 110 200
280 210 200 200
200 200 200 200
270 190 180 200
AU.AG..GC
100 90 -20 200
200 200 200 200
180 160 50 200
30 -80 -10 200
AU.AU..GC
200 200 200 200
270 190 180 200
180 70 140 200
220 100 180 200
AU.CA..GC
180 230 200 230
170 160 200 160
80 170 200 170
200 200 200 200
AU.CC..GC
210 210 200 210
200 190 200 190
200 200 200 200
180 180 200 180
AU.CG..GC
80 170 200 170
200 200 200 200
150 210 200 210
-90 0 200 0
AU.CU..GC
200 200 200 200
180 180 200 180
60 150 200 150
90 90 200 90
AU.GA..GC
80 200 130 160
70 200 120 50
-20 200 30 140
200 200 200 200
AU.GC..GC
110 200 170 90
200 200 210 180
200 200 200 200
180 200 200 160
AU.GG..GC
-20 200 30 140
200 200 200 200
50 200 110 130
-10 200 -40 -210
AU.GU..GC
200 200 200 200
180 200 200 160
140 200 110 -60
180 200 150 160
AU.UA..GC
200 230 60 190
200 160 -50 80
200 170 40 180
200 200 200 200
AU.UC..GC
200 210 0 130
200 190 80 110
200 200 200 200
200 180 70 100
AU.UG..GC
200 170 40 180
200 200 200 200
200 210 40 170
200 0 -310 0
AU.UU..GC
200 200 200 200
200 180 70 100
200 150 -160 160
200 90 60 10
AU.AA..UA
280 260 150 200
250 240 130 200
150 140 30 200
200 200 200 200
AU.AC..UA
260 250 140 200
310 230 220 200
200 200 200 200
310 230 220 200
AU.AG..UA
150 140 30 200
200 200 200 200
210 190 80 200
130 20 90 200
AU.AU..UA
200 200 200 200
310 230 220 200
230 120 190 200
270 150 220 200
AU.CA..UA
250 310 200 310
230 220 200 220
130 220 200 220
200 200 200 200
AU.CC..UA
240 230 200 230
220 220 200 220
200 200 200 200
220 220 200 220
AU.CG..UA
130 220 200 220
200 200 200 200
180 240 200 240
10 100 200 100
AU.CU..UA
200 200 200 200
220 220 200 220
110 200 200 200
140 140 200 140
AU.GA..UA
150 200 210 230
130 200 180 110
30 200 80 190
200 200 200 200
AU.GC..UA
140 200 190 120
220 200 240 200
200 200 200 200
220 200 240 200
AU.GG..UA
30 200 80 190
200 200 200 200
80 200 140 160
90 200 70 -110
AU.GU..UA
200 200 200 200
220 200 240 200
190 200 160 -10
220 200 200 200
AU.UA..UA
200 310 130 270
200 220 10 140
200 220 90 220
200 200 200 200
AU.UC..UA
200 230 20 150
200 220 100 140
200 200 200 200
200 220 100 140
AU.UG..UA
200 220 90 220
200 200 200 200
200 240 70 200
200 100 -210 110
AU.UU..UA
200 200 200 200
200 220 100 140
200 200 -110 200
200 140 110 60
AU.AA..GU
280 260 150 200
230 220 110 200
170 160 50 200
200 200 200 200
AU.AC..GU
280 260 150 200
340 260 250 200
200 200 200 200
340 260 250 200
AU.AG..GU
170 160 50 200
200 200 200 200
210 200 90 200
100 -20 50 200
AU.AU..GU
200 200 200 200
310 230 220 200
220 110 180 200
290 180 250 200
AU.CA..GU
250 310 200 310
210 200 200 200
150 240 200 240
200 200 200 200
AU.CC..GU
250 250 200 250
250 250 200 250
200 200 200 200
250 250 200 250
AU.CG..GU
150 240 200 240
200 200 200 200
190 240 200 240
-30 70 200 70
AU.CU..GU
200 200 200 200
220 220 200 220
100 190 200 190
170 160 200 160
AU.GA..GU
150 200 210 230
110 200 160 90
50 200 100 210
200 200 200 200
AU.GC..GU
150 200 210 130
250 200 270 230
200 200 200 200
250 200 270 230
AU.GG..GU
50 200 100 210
200 200 200 200
90 200 140 170
50 200 30 -150
AU.GU..GU
200 200 200 200
220 200 240 200
180 200 150 -20
250 200 220 230
AU.UA..GU
200 310 130 270
200 200 -10 120
200 240 110 240
200 200 200 200
AU.UC..GU
200 250 30 170
200 250 130 170
200 200 200 200
200 250 130 170
AU.UG..GU
200 240 110 240
200 200 200 200
200 240 70 200
200 70 -250 70
AU.UU..GU
200 200 200 200
200 220 100 140
200 190 -120 190
200 160 130 80
AU.AA..UG
280 260 150 200
250 240 130 200
150 140 30 200
200 200 200 200
AU.AC..UG
260 250 140 200
310 230 220 200
200 200 200 200
310 230 220 200
AU.AG..UG
150 140 30 200
200 200 200 200
210 190 80 200
130 20 90 200
AU.AU..UG
200 200 200 200
310 230 220 200
230 120 190 200
270 150 220 200
AU.CA..UG
250 310 200 310
230 220 200 220
130 220 200 220
200 200 200 200
AU.CC..UG
240 230 200 230
220 220 200 220
200 200 200 200
220 220 200 220
AU.CG..UG
130 220 200 220
200 200 200 200
180 240 200 240
10 100 200 100
AU.CU..UG
200 200 200 200
220 220 200 220
110 200 200 200
140 140 200 140
AU.GA..UG
150 200 210 230
130 200 180 110
30 200 80 190
200 200 200 200
AU.GC..UG
140 200 190 120
220 200 240 200
200 200 200 200
220 200 240 200
AU.GG..UG
30 200 80 190
200 200 200 200
80 200 140 160
90 200 70 -110
AU.GU..UG
200 200 200 200
220 200 240 200
190 200 160 -10
220 200 200 200
AU.UA..UG
200 310 130 270
200 220 10 140
200 220 90 220
200 200 200 200
AU.UC..UG
200 230 20 150
200 220 100 140
200 200 200 200
200 220 100 140
AU.UG..UG
200 220 90 220
200 200 200 200
200 240 70 200
200 100 -210 110
AU.UU..UG
200 200 200 200
200 220 100 140
200 200 -110 200
200 140 110 60
CG.AA..AU
200 240 100 200
160 190 60 200
100 130 0 200
200 200 200 200
CG.AC..AU
200 240 100 200
260 240 200 200
200 200 200 200
260 240 200 200
CG.AG..AU
100 130 0 200
200 200 200 200
140 170 40 200
20 -40 0 200
CG.AU..AU
200 200 200 200
230 210 170 200
150 80 130 200
220 150 200 200
CG.CA..AU
190 280 200 270
150 180 200 160
90 220 200 200
200 200 200 200
CG.CC..AU
190 220 200 210
190 220 200 210
200 200 200 200
190 220 200 210
CG.CG..AU
90 220 200 200
200 200 200 200
130 220 200 200
-90 40 200 30
CG.CU..AU
200 200 200 200
160 190 200 180
40 170 200 150
110 140 200 120
CG.GA..AU
100 200 180 180
60 200 130 40
0 200 70 160
200 200 200 200
CG.GC..AU
100 200 180 80
200 200 240 180
200 200 200 200
200 200 240 180
CG.GG..AU
0 200 70 160
200 200 200 200
40 200 110 120
0 200 0 -200
CG.GU..AU
200 200 200 200
170 200 210 150
130 200 120 -70
200 200 190 180
CG.UA..AU
200 270 30 220
200 160 -110 70
200 200 10 190
200 200 200 200
CG.UC..AU
200 210 -70 120
200 210 30 120
200 200 200 200
200 210 30 120
CG.UG..AU
200 200 10 190
200 200 200 200
200 200 -30 150
200 30 -350 20
CG.UU..AU
200 200 200 200
200 180 0 90
200 150 -220 150
200 120 30 30
CG.AA..CG
50 60 0 200
110 150 -70 200
-30 10 -160 200
200 200 200 200
CG.AC..CG
110 110 -100 200
170 150 -60 200
200 200 200 200
70 50 20 200
CG.AG..CG
40 50 -70 200
200 200 200 200
100 140 0 200
10 -70 -80 200
CG.AU..CG
200 200 200 200
180 150 120 200
-50 -60 -60 200
150 0 90 200
CG.CA..CG
130 220 200 200
100 130 200 120
-70 70 200 40
200 200 200 200
CG.CC..CG
100 190 200 110
100 130 200 120
200 200 200 200
0 30 200 170
CG.CG..CG
70 70 200 100
200 200 200 200
90 180 200 170
-190 -30 200 -70
CG.CU..CG
200 200 200 200
110 140 200 120
-150 -20 200 -30
-20 -10 200 20
CG.GA..CG
-20 200 110 90
-40 200 90 0
-170 200 -90 30
200 200 200 200
CG.GC..CG
70 200 80 -10
110 200 150 100
200 200 200 200
20 200 50 0
CG.GG..CG
-50 200 -20 60
200 200 200 200
0 200 80 90
-90 200 -100 -300
CG.GU..CG
200 200 200 200
120 200 150 100
-130 200 -60 -240
90 200 110 60
CG.UA..CG
200 200 -10 140
200 120 -160 30
200 40 -160 50
200 200 200 200
CG.UC..CG
200 110 -160 30
200 120 -60 30
200 200 200 200
200 20 -160 10
CG.UG..CG
200 50 -60 140
200 200 200 200
200 170 -70 120
200 -70 -440 -100
CG.UU..CG
200 200 200 200
200 120 -50 30
200 -10 -410 10
200 40 -100 60
CG.AA..GC
130 160 30 200
120 150 20 200
30 60 -70 200
200 200 200 200
CG.AC..GC
160 200 60 200
210 180 150 200
200 200 200 200
190 170 130 200
CG.AG..GC
30 60 -70 200
200 200 200 200
100 140 0 200
-40 -110 -60 200
CG.AU..GC
200 200 200 200
190 170 130 200
110 40 90 200
140 80 130 200
CG.CA..GC
120 210 200 190
110 140 200 120
20 150 200 130
200 200 200 200
CG.CC..GC
150 180 200 170
140 170 200 150
200 200 200 200
120 150 200 140
CG.CG..GC
20 150 200 130
200 200 200 200
90 180 200 170
-150 -20 200 -40
CG.CU..GC
200 200 200 200
120 150 200 140
0 130 200 110
30 60 200 50
CG.GA..GC
30 200 100 110
20 200 90 0
-70 200 0 90
200 200 200 200
CG.GC..GC
60 200 140 40
150 200 180 130
200 200 200 200
130 200 170 110
CG.GG..GC
-70 200 0 90
200 200 200 200
0 200 80 90
-60 200 -70 -260
CG.GU..GC
200 200 200 200
130 200 170 110
90 200 90 -110
130 200 120 110
CG.UA..GC
200 190 -40 140
200 120 -150 30
200 130 -60 130
200 200 200 200
CG.UC..GC
200 170 -110 80
200 150 -20 60
200 200 200 200
200 140 -40 50
CG.UG..GC
200 130 -60 130
200 200 200 200
200 170 -70 120
200 -40 -420 -50
CG.UU..GC
200 200 200 200
200 140 -40 50
200 110 -260 110
200 50 -50 -40
CG.AA..UA
200 240 100 200
180 210 80 200
80 110 -20 200
200 200 200 200
CG.AC..UA
190 220 90 200
230 210 170 200
200 200 200 200
230 210 170 200
CG.AG..UA
80 110 -20 200
200 200 200 200
130 170 30 200
60 0 40 200
CG.AU..UA
200 200 200 200
230 210 170 200
160 90 140 200
190 130 180 200
CG.CA..UA
190 280 200 270
170 200 200 180
70 200 200 180
200 200 200 200
CG.CC..UA
180 210 200 190
160 190 200 180
200 200 200 200
160 190 200 180
CG.CG..UA
70 200 200 180
200 200 200 200
120 210 200 200
-50 80 200 70
CG.CU..UA
200 200 200 200
160 190 200 180
50 180 200 160
80 110 200 100
CG.GA..UA
100 200 180 180
80 200 150 60
-20 200 50 140
200 200 200 200
CG.GC..UA
90 200 160 70
170 200 210 150
200 200 200 200
170 200 210 150
CG.GG..UA
-20 200 50 140
200 200 200 200
30 200 110 110
40 200 40 -160
CG.GU..UA
200 200 200 200
170 200 210 150
140 200 130 -60
180 200 170 160
CG.UA..UA
200 270 30 220
200 180 -90 90
200 180 -10 180
200 200 200 200
CG.UC..UA
200 190 -80 100
200 180 0 90
200 200 200 200
200 180 0 90
CG.UG..UA
200 180 -10 180
200 200 200 200
200 200 -40 150
200 70 -310 60
CG.UU..UA
200 200 200 200
200 180 0 90
200 160 -210 160
200 100 0 10
CG.AA..GU
200 240 100 200
160 190 60 200
100 130 0 200
200 200 200 200
CG.AC..GU
200 240 100 200
260 240 200 200
200 200 200 200
260 240 200 200
CG.AG..GU
100 130 0 200
200 200 200 200
140 170 40 200
20 -40 0 200
CG.AU..GU
200 200 200 200
230 210 170 200
150 80 130 200
220 150 200 200
CG.CA..GU
190 280 200 270
150 180 200 160
90 220 200 200
200 200 200 200
CG.CC..GU
190 220 200 210
190 220 200 210
200 200 200 200
190 220 200 210
CG.CG..GU
90 220 200 200
200 200 200 200
130 220 200 200
-90 40 200 30
CG.CU..GU
200 200 200 200
160 190 200 180
40 170 200 150
110 140 200 120
CG.GA..GU
100 200 180 180
60 200 130 40
0 200 70 160
200 200 200 200
CG.GC..GU
100 200 180 80
200 200 240 180
200 200 200 200
200 200 240 180
CG.GG..GU
0 200 70 160
200 200 200 200
40 200 110 120
0 200 0 -200
CG.GU..GU
200 200 200 200
170 200 210 150
130 200 120 -70
200 200 190 180
CG.UA..GU
200 270 30 220
200 160 -110 70
200 200 10 190
200 200 200 200
CG.UC..GU
200 210 -70 120
200 210 30 120
200 200 200 200
200 210 30 120
CG.UG..GU
200 200 10 190
200 200 200 200
200 200 -30 150
200 30 -350 20
CG.UU..GU
200 200 200 200
200 180 0 90
200 150 -220 150
200 120 30 30
CG.AA..UG
200 240 100 200
180 210 80 200
80 110 -20 200
200 200 200 200
CG.AC..UG
190 220 90 200
230 210 170 200
200 200 200 200
230 210 170 200
CG.AG..UG
80 110 -20 200
200 200 200 200
130 170 30 200
60 0 40 200
CG.AU..UG
200 200 200 200
230 210 170 200
160 90 140 200
190 130 180 200
CG.CA..UG
190 280 200 270
170 200 200 180
70 200 200 180
200 200 200 200
CG.CC..UG
180 210 200 190
160 190 200 180
200 200 200 200
160 190 200 180
CG.CG..UG
70 200 200 180
200 200 200 200
120 210 200 200
-50 80 200 70
CG.CU..UG
200 200 200 200
160 190 200 180
50 180 200 160
80 110 200 100
CG.GA..UG
100 200 180 180
80 200 150 60
-20 200 50 140
200 200 200 200
CG.GC..UG
90 200 160 70
170 200 210 150
200 200 200 200
170 200 210 150
CG.GG..UG
-20 200 50 140
200 200 200 200
30 200 110 110
40 200 40 -160
CG.GU..UG
200 200 200 200
170 200 210 150
140 200 130 -60
180 200 170 160
CG.UA..UG
200 270 30 220
200 180 -90 90
200 180 -10 180
200 200 200 200
CG.UC..UG
200 190 -80 100
200 180 0 90
200 200 200 200
200 180 0 90
CG.UG..UG
200 180 -10 180
200 200 200 200
200 200 -40 150
200 70 -310 60
CG.UU..UG
200 200 200 200
200 180 0 90
200 160 -210 160
200 100 0 10
GC.AA..AU
210 180 70 200
170 140 30 200
110 80 -30 200
200 200 200 200
GC.AC..AU
210 180 70 200
270 180 170 200
200 200 200 200
270 180 170 200
GC.AG..AU
110 80 -30 200
200 200 200 200
150 120 10 200
30 -100 -30 200
GC.AU..AU
200 200 200 200
240 150 140 200
160 30 100 200
230 100 170 200
GC.CA..AU
190 250 200 250
140 140 200 150
80 180 200 190
200 200 200 200
GC.CC..AU
190 190 200 190
190 190 200 190
200 200 200 200
190 190 200 190
GC.CG..AU
80 180 200 190
200 200 200 200
120 180 200 190
-90 10 200 10
GC.CU..AU
200 200 200 200
160 160 200 160
30 130 200 140
100 100 200 110
GC.GA..AU
10 200 180 40
-30 200 130 -110
-90 200 70 10
200 200 200 200
GC.GC..AU
10 200 180 -60
110 200 240 40
200 200 200 200
110 200 240 40
GC.GG..AU
-90 200 70 10
200 200 200 200
-50 200 110 -30
-90 200 0 -350
GC.GU..AU
200 200 200 200
80 200 210 10
40 200 120 -220
110 200 190 30
GC.UA..AU
200 150 0 210
200 40 -150 70
200 90 -30 190
200 200 200 200
GC.UC..AU
200 90 -100 110
200 90 0 110
200 200 200 200
200 90 0 110
GC.UG..AU
200 90 -30 190
200 200 200 200
200 80 -70 150
200 -90 -390 10
GC.UU..AU
200 200 200 200
200 60 -30 80
200 40 -260 140
200 0 -10 30
GC.AA..CG
150 120 10 200
120 90 -10 200
-50 -80 -190 200
200 200 200 200
GC.AC..CG
120 90 -20 200
180 90 90 200
200 200 200 200
80 0 -10 200
GC.AG..CG
10 -20 -130 200
200 200 200 200
110 80 -20 200
-70 -200 -130 200
GC.AU..CG
200 200 200 200
190 100 90 200
-30 -160 -90 200
150 20 90 200
GC.CA..CG
120 180 200 190
100 100 200 100
-80 20 200 30
200 200 200 200
GC.CC..CG
90 90 200 100
100 100 200 100
200 200 200 200
0 0 200 0
GC.CG..CG
-10 90 200 90
200 200 200 200
90 150 200 150
-190 -90 200 -90
GC.CU..CG
200 200 200 200
100 100 200 110
-150 -50 200 -50
20 20 200 30
GC.GA..CG
-50 200 110 -30
-80 200 90 -150
-260 200 -90 -150
200 200 200 200
GC.GC..CG
-80 200 80 -160
20 200 150 -50
200 200 200 200
-80 200 50 -150
GC.GG..CG
-190 200 -20 -90
200 200 200 200
-90 200 80 -60
-190 200 -100 -450
GC.GU..CG
200 200 200 200
30 200 150 -50
-150 200 -60 -410
30 200 110 -50
GC.UA..CG
200 80 -70 150
200 0 -190 20
200 -80 -190 30
200 200 200 200
GC.UC..CG
200 0 -200 20
200 0 -90 20
200 200 200 200
200 -100 -190 -70
GC.UG..CG
200 -10 -130 90
200 200 200 200
200 50 -100 110
200 -190 -490 -90
GC.UU..CG
200 200 200 200
200 0 -90 30
200 -150 -450 -50
200 -70 -90 -50
GC.AA..GC
50 110 40 200
130 100 70 200
-20 70 -50 200
200 200 200 200
GC.AC..GC
60 110 50 200
220 190 70 200
200 200 200 200
200 110 50 200
GC.AG..GC
0 -100 -70 200
200 200 200 200
110 80 -20 200
-10 -160 -60 200
GC.AU..GC
200 200 200 200
200 110 100 200
90 -10 60 200
140 30 140 200
GC.CA..GC
110 170 200 180
100 100 200 110
-40 110 200 120
200 200 200 200
GC.CC..GC
150 150 200 150
130 130 200 140
200 200 200 200
120 120 200 120
GC.CG..GC
-70 -60 200 120
200 200 200 200
90 150 200 150
-160 -60 200 -50
GC.CU..GC
200 200 200 200
120 120 200 120
0 100 200 100
30 30 200 30
GC.GA..GC
-30 200 100 -50
-70 200 90 -150
-170 200 0 -130
200 200 200 200
GC.GC..GC
10 200 140 -60
70 200 180 -20
200 200 200 200
40 200 170 -10
GC.GG..GC
-160 200 0 -60
200 200 200 200
-90 200 80 -60
-160 200 -70 -410
GC.GU..GC
200 200 200 200
40 200 170 -30
30 200 90 -240
50 200 120 10
GC.UA..GC
200 70 10 150
200 0 -190 -20
200 20 -90 90
200 200 200 200
GC.UC..GC
200 50 -70 0
200 30 -30 -10
200 200 200 200
200 20 -70 40
GC.UG..GC
200 20 -80 90
200 200 200 200
200 50 -100 110
200 -160 -440 -100
GC.UU..GC
200 200 200 200
200 170 -70 20
200 0 -300 60
200 10 -100 60
GC.AA..UA
210 180 70 200
190 160 50 200
90 60 -50 200
200 200 200 200
GC.AC..UA
200 170 60 200
240 150 140 200
200 200 200 200
240 150 140 200
GC.AG..UA
90 60 -50 200
200 200 200 200
140 110 0 200
70 -60 10 200
GC.AU..UA
200 200 200 200
240 150 140 200
170 40 110 200
200 70 150 200
GC.CA..UA
190 250 200 250
160 160 200 170
60 160 200 170
200 200 200 200
GC.CC..UA
170 170 200 180
160 160 200 160
200 200 200 200
160 160 200 160
GC.CG..UA
60 160 200 170
200 200 200 200
120 180 200 180
-50 50 200 50
GC.CU..UA
200 200 200 200
160 160 200 160
40 140 200 150
80 80 200 80
GC.GA..UA
10 200 180 40
-10 200 150 -90
-110 200 50 -10
200 200 200 200
GC.GC..UA
0 200 160 -80
80 200 210 10
200 200 200 200
80 200 210 10
GC.GG..UA
-110 200 50 -10
200 200 200 200
-60 200 110 -30
-50 200 40 -310
GC.GU..UA
200 200 200 200
80 200 210 10
50 200 130 -210
80 200 170 10
GC.UA..UA
200 150 0 210
200 60 -130 90
200 70 -50 170
200 200 200 200
GC.UC..UA
200 70 -120 100
200 60 -30 80
200 200 200 200
200 60 -30 80
GC.UG..UA
200 70 -50 170
200 200 200 200
200 80 -70 140
200 -50 -350 50
GC.UU..UA
200 200 200 200
200 60 -30 80
200 50 -250 150
200 -20 -30 0
GC.AA..GU
210 180 70 200
170 140 30 200
110 80 -30 200
200 200 200 200
GC.AC..GU
210 180 70 200
270 180 170 200
200 200 200 200
270 180 170 200
GC.AG..GU
110 80 -30 200
200 200 200 200
150 120 10 200
30 -100 -30 200
GC.AU..GU
200 200 200 200
240 150 140 200
160 30 100 200
230 100 170 200
GC.CA..GU
190 250 200 250
140 140 200 150
80 180 200 190
200 200 200 200
GC.CC..GU
190 190 200 190
190 190 200 190
200 200 200 200
190 190 200 190
GC.CG..GU
80 180 200 190
200 200 200 200
120 180 200 190
-90 10 200 10
GC.CU..GU
200 200 200 200
160 160 200 160
30 130 200 140
100 100 200 110
GC.GA..GU
10 200 180 40
-30 200 130 -110
-90 200 70 10
200 200 200 200
GC.GC..GU
10 200 180 -60
110 200 240 40
200 200 200 200
110 200 240 40
GC.GG..GU
-90 200 70 10
200 200 200 200
-50 200 110 -30
-90 200 0 -350
GC.GU..GU
200 200 200 200
80 200 210 10
40 200 120 -220
110 200 190 30
GC.UA..GU
200 150 0 210
200 40 -150 70
200 90 -30 190
200 200 200 200
GC.UC..GU
200 90 -100 110
200 90 0 110
200 200 200 200
200 90 0 110
GC.UG..GU
200 90 -30 190
200 200 200 200
200 80 -70 150
200 -90 -390 10
GC.UU..GU
200 200 200 200
200 60 -30 80
200 40 -260 140
200 0 -10 30
GC.AA..UG
210 180 70 200
190 160 50 200
90 60 -50 200
200 200 200 200
GC.AC..UG
200 170 60 200
240 150 140 200
200 200 200 200
240 150 140 200
GC.AG..UG
90 60 -50 200
200 200 200 200
140 110 0 200
70 -60 10 200
GC.AU..UG
200 200 200 200
240 150 140 200
170 40 110 200
200 70 150 200
GC.CA..UG
190 250 200 250
160 160 200 170
60 160 200 170
200 200 200 200
GC.CC..UG
170 170 200 180
160 160 200 160
200 200 200 200
160 160 200 160
GC.CG..UG
60 160 200 170
200 200 200 200
120 180 200 180
-50 50 200 50
GC.CU..UG
200 200 200 200
160 160 200 160
40 140 200 150
80 80 200 80
GC.GA..UG
10 200 180 40
-10 200 150 -90
-110 200 50 -10
200 200 200 200
GC.GC..UG
0 200 160 -80
80 200 210 10
200 200 200 200
80 200 210 10
GC.GG..UG
-110 200 50 -10
200 200 200 200
-60 200 110 -30
-50 200 40 -310
GC.GU..UG
200 200 200 200
80 200 210 10
50 200 130 -210
80 200 170 10
GC.UA..UG
200 150 0 210
200 60 -130 90
200 70 -50 170
200 200 200 200
GC.UC..UG
200 70 -120 100
200 60 -30 80
200 200 200 200
200 60 -30 80
GC.UG..UG
200 70 -50 170
200 200 200 200
200 80 -70 140
200 -50 -350 50
GC.UU..UG
200 200 200 200
200 60 -30 80
200 50 -250 150
200 -20 -30 0
UA.AA..AU
280 280 170 200
230 230 130 200
170 170 70 200
200 200 200 200
UA.AC..AU
280 280 170 200
340 280 270 200
200 200 200 200
340 280 270 200
UA.AG..AU
170 170 70 200
200 200 200 200
210 210 110 200
100 0 70 200
UA.AU..AU
200 200 200 200
310 250 240 200
220 120 200 200
290 190 270 200
UA.CA..AU
230 340 200 310
190 230 200 200
130 270 200 240
200 200 200 200
UA.CC..AU
230 280 200 250
230 280 200 250
200 200 200 200
230 280 200 250
UA.CG..AU
130 270 200 240
200 200 200 200
170 270 200 240
-50 100 200 70
UA.CU..AU
200 200 200 200
200 250 200 220
80 220 200 190
150 190 200 160
UA.GA..AU
170 200 210 220
130 200 170 80
70 200 110 200
200 200 200 200
UA.GC..AU
170 200 210 120
270 200 270 220
200 200 200 200
270 200 270 220
UA.GG..AU
70 200 110 200
200 200 200 200
110 200 150 160
70 200 30 -160
UA.GU..AU
200 200 200 200
240 200 240 190
200 200 160 -30
270 200 230 220
UA.UA..AU
200 340 100 290
200 230 -50 150
200 270 70 270
200 200 200 200
UA.UC..AU
200 280 0 190
200 280 100 190
200 200 200 200
200 280 100 190
UA.UG..AU
200 270 70 270
200 200 200 200
200 270 30 230
200 100 -290 90
UA.UU..AU
200 200 200 200
200 250 70 160
200 220 -160 220
200 190 90 110
UA.AA..CG
210 210 110 200
190 190 80 200
10 10 -90 200
200 200 200 200
UA.AC..CG
180 180 80 200
250 190 180 200
200 200 200 200
150 90 90 200
UA.AG..CG
70 70 -30 200
200 200 200 200
180 180 70 200
0 -100 -30 200
UA.AU..CG
200 200 200 200
250 190 190 200
40 -60 10 200
210 110 190 200
UA.CA..CG
170 270 200 240
140 190 200 160
-30 110 200 80
200 200 200 200
UA.CC..CG
140 180 200 150
140 190 200 160
200 200 200 200
40 90 200 60
UA.CG..CG
30 170 200 140
200 200 200 200
130 240 200 210
-150 0 200 -30
UA.CU..CG
200 200 200 200
150 190 200 160
-110 40 200 10
70 110 200 80
UA.GA..CG
110 200 150 160
80 200 120 30
-90 200 -50 40
200 200 200 200
UA.GC..CG
80 200 120 30
180 200 180 130
200 200 200 200
90 200 80 40
UA.GG..CG
-30 200 10 100
200 200 200 200
70 200 110 120
-30 200 -70 -260
UA.GU..CG
200 200 200 200
190 200 190 140
10 200 -30 -220
190 200 150 140
UA.UA..CG
200 270 30 230
200 190 -90 100
200 110 -90 110
200 200 200 200
UA.UC..CG
200 180 -100 100
200 190 10 100
200 200 200 200
200 90 -90 0
UA.UG..CG
200 170 -30 170
200 200 200 200
200 240 0 190
200 0 -390 -10
UA.UU..CG
200 200 200 200
200 190 10 110
200 40 -350 30
200 110 10 30
UA.AA..GC
200 200 100 200
190 190 90 200
100 100 0 200
200 200 200 200
UA.AC..GC
240 240 130 200
280 220 220 200
200 200 200 200
270 210 200 200
UA.AG..GC
100 100 0 200
200 200 200 200
180 180 70 200
30 -70 10 200
UA.AU..GC
200 200 200 200
270 210 200 200
180 80 160 200
220 120 190 200
UA.CA..GC
160 260 200 230
150 190 200 160
60 200 200 170
200 200 200 200
UA.CC..GC
190 240 200 210
180 220 200 190
200 200 200 200
160 210 200 180
UA.CG..GC
60 200 200 170
200 200 200 200
130 240 200 210
-110 30 200 0
UA.CU..GC
200 200 200 200
160 210 200 180
40 180 200 150
70 120 200 90
UA.GA..GC
100 200 140 150
90 200 130 40
0 200 40 130
200 200 200 200
UA.GC..GC
130 200 170 80
220 200 220 170
200 200 200 200
200 200 200 150
UA.GG..GC
0 200 40 130
200 200 200 200
70 200 110 120
10 200 -30 -220
UA.GU..GC
200 200 200 200
200 200 200 150
160 200 120 -70
190 200 150 150
UA.UA..GC
200 260 20 220
200 190 -90 110
200 200 0 200
200 200 200 200
UA.UC..GC
200 240 -40 150
200 220 40 140
200 200 200 200
200 210 30 120
UA.UG..GC
200 200 0 200
200 200 200 200
200 240 0 190
200 30 -350 30
UA.UU..GC
200 200 200 200
200 210 30 120
200 180 -200 180
200 120 20 30
UA.AA..UA
280 280 170 200
250 250 150 200
150 150 50 200
200 200 200 200
UA.AC..UA
260 260 160 200
310 250 240 200
200 200 200 200
310 250 240 200
UA.AG..UA
150 150 50 200
200 200 200 200
210 210 100 200
130 30 110 200
UA.AU..UA
200 200 200 200
310 250 240 200
230 130 210 200
270 170 240 200
UA.CA..UA
230 340 200 310
210 250 200 220
110 250 200 220
200 200 200 200
UA.CC..UA
220 260 200 230
200 250 200 220
200 200 200 200
200 250 200 220
UA.CG..UA
110 250 200 220
200 200 200 200
160 270 200 240
-10 130 200 100
UA.CU..UA
200 200 200 200
200 250 200 220
90 230 200 200
120 170 200 140
UA.GA..UA
170 200 210 220
150 200 190 100
50 200 90 180
200 200 200 200
UA.GC..UA
160 200 200 110
240 200 240 190
200 200 200 200
240 200 240 190
UA.GG..UA
50 200 90 180
200 200 200 200
100 200 140 150
110 200 70 -120
UA.GU..UA
200 200 200 200
240 200 240 190
210 200 170 -20
240 200 200 190
UA.UA..UA
200 340 100 290
200 250 -30 170
200 250 50 250
200 200 200 200
UA.UC..UA
200 260 -20 180
200 250 70 160
200 200 200 200
200 250 70 160
UA.UG..UA
200 250 50 250
200 200 200 200
200 270 30 220
200 130 -250 130
UA.UU..UA
200 200 200 200
200 250 70 160
200 230 -150 230
200 170 70 80
UA.AA..GU
280 280 170 200
230 230 130 200
170 170 70 200
200 200 200 200
UA.AC..GU
280 280 170 200
340 280 270 200
200 200 200 200
340 280 270 200
UA.AG..GU
170 170 70 200
200 200 200 200
210 210 110 200
100 0 70 200
UA.AU..GU
200 200 200 200
310 250 240 200
220 120 200 200
290 190 270 200
UA.CA..GU
230 340 200 310
190 230 200 200
130 270 200 240
200 200 200 200
UA.CC..GU
230 280 200 250
230 280 200 250
200 200 200 200
230 280 200 250
UA.CG..GU
130 270 200 240
200 200 200 200
170 270 200 240
-50 100 200 70
UA.CU..GU
200 200 200 200
200 250 200 220
80 220 200 190
150 190 200 160
UA.GA..GU
170 200 210 220
130 200 170 80
70 200 110 200
200 200 200 200
UA.GC..GU
170 200 210 120
270 200 270 220
200 200 200 200
270 200 270 220
UA.GG..GU
70 200 110 200
200 200 200 200
110 200 150 160
70 200 30 -160
UA.GU..GU
200 200 200 200
240 200 240 190
200 200 160 -30
270 200 230 220
UA.UA..GU
200 340 100 290
200 230 -50 150
200 270 70 270
200 200 200 200
UA.UC..GU
200 280 0 190
200 280 100 190
200 200 200 200
200 280 100 190
UA.UG..GU
200 270 70 270
200 200 200 200
200 270 30 230
200 100 -290 90
UA.UU..GU
200 200 200 200
200 250 70 160
200 220 -160 220
200 190 90 110
UA.AA..UG
280 280 170 200
250 250 150 200
150 150 50 200
200 200 200 200
UA.AC..UG
260 260 160 200
310 250 240 200
200 200 200 200
310 250 240 200
UA.AG..UG
150 150 50 200
200 200 200 200
210 210 100 200
130 30 110 200
UA.AU..UG
200 200 200 200
310 250 240 200
230 130 210 200
270 170 240 200
UA.CA..UG
230 340 200 310
210 250 200 220
110 250 200 220
200 200 200 200
UA.CC..UG
220 260 200 230
200 250 200 220
200 200 200 200
200 250 200 220
UA.CG..UG
110 250 200 220
200 200 200 200
160 270 200 240
-10 130 200 100
UA.CU..UG
200 200 200 200
200 250 200 220
90 230 200 200
120 170 200 140
UA.GA..UG
170 200 210 220
150 200 190 100
50 200 90 180
200 200 200 200
UA.GC..UG
160 200 200 110
240 200 240 190
200 200 200 200
240 200 240 190
UA.GG..UG
50 200 90 180
200 200 200 200
100 200 140 150
110 200 70 -120
UA.GU..UG
200 200 200 200
240 200 240 190
210 200 170 -20
240 200 200 190
UA.UA..UG
200 340 100 290
200 250 -30 170
200 250 50 250
200 200 200 200
UA.UC..UG
200 260 -20 180
200 250 70 160
200 200 200 200
200 250 70 160
UA.UG..UG
200 250 50 250
200 200 200 200
200 270 30 220
200 130 -250 130
UA.UU..UG
200 200 200 200
200 250 70 160
200 230 -150 230
200 170 70 80
GU.AA..AU
280 260 150 200
230 220 110 200
170 160 50 200
200 200 200 200
GU.AC..AU
280 260 150 200
340 260 250 200
200 200 200 200
340 260 250 200
GU.AG..AU
170 160 50 200
200 200 200 200
210 200 90 200
100 -20 50 200
GU.AU..AU
200 200 200 200
310 230 220 200
220 110 180 200
290 180 250 200
GU.CA..AU
250 310 200 310
210 200 200 200
150 240 200 240
200 200 200 200
GU.CC..AU
250 250 200 250
250 250 200 250
200 200 200 200
250 250 200 250
GU.CG..AU
150 240 200 240
200 200 200 200
190 240 200 240
-30 70 200 70
GU.CU..AU
200 200 200 200
220 220 200 220
100 190 200 190
170 160 200 160
GU.GA..AU
150 200 210 230
110 200 160 90
50 200 100 210
200 200 200 200
GU.GC..AU
150 200 210 130
250 200 270 230
200 200 200 200
250 200 270 230
GU.GG..AU
50 200 100 210
200 200 200 200
90 200 140 170
50 200 30 -150
GU.GU..AU
200 200 200 200
220 200 240 200
180 200 150 -20
250 200 220 230
GU.UA..AU
200 310 130 270
200 200 -10 120
200 240 110 240
200 200 200 200
GU.UC..AU
200 250 30 170
200 250 130 170
200 200 200 200
200 250 130 170
GU.UG..AU
200 240 110 240
200 200 200 200
200 240 70 200
200 70 -250 70
GU.UU..AU
200 200 200 200
200 220 100 140
200 190 -120 190
200 160 130 80
GU.AA..CG
210 200 90 200
190 170 60 200
10 0 -110 200
200 200 200 200
GU.AC..CG
180 170 60 200
250 170 160 200
200 200 200 200
150 70 70 200
GU.AG..CG
70 60 -50 200
200 200 200 200
180 160 50 200
0 -120 -50 200
GU.AU..CG
200 200 200 200
250 180 170 200
40 -80 -10 200
210 100 170 200
GU.CA..CG
190 240 200 240
160 160 200 160
-10 80 200 80
200 200 200 200
GU.CC..CG
160 150 200 150
160 160 200 160
200 200 200 200
60 60 200 60
GU.CG..CG
50 140 200 140
200 200 200 200
150 210 200 210
-130 -30 200 -30
GU.CU..CG
200 200 200 200
170 160 200 160
-90 10 200 10
90 80 200 80
GU.GA..CG
90 200 140 170
60 200 120 40
-110 200 -60 50
200 200 200 200
GU.GC..CG
60 200 110 40
160 200 180 140
200 200 200 200
70 200 80 50
GU.GG..CG
-50 200 0 110
200 200 200 200
50 200 110 130
-50 200 -70 -250
GU.GU..CG
200 200 200 200
170 200 180 150
-10 200 -30 -210
170 200 140 150
GU.UA..CG
200 240 70 200
200 160 -50 80
200 80 -50 80
200 200 200 200
GU.UC..CG
200 150 -60 70
200 160 50 80
200 200 200 200
200 60 -50 -20
GU.UG..CG
200 140 10 150
200 200 200 200
200 210 40 170
200 -30 -350 -30
GU.UU..CG
200 200 200 200
200 160 50 80
200 10 -310 10
200 80 50 0
GU.AA..GC
200 190 80 200
190 180 70 200
100 90 -20 200
200 200 200 200
GU.AC..GC
240 220 110 200
280 210 200 200
200 200 200 200
270 190 180 200
GU.AG..GC
100 90 -20 200
200 200 200 200
180 160 50 200
30 -80 -10 200
GU.AU..GC
200 200 200 200
270 190 180 200
180 70 140 200
220 100 180 200
GU.CA..GC
180 230 200 230
170 160 200 160
80 170 200 170
200 200 200 200
GU.CC..GC
210 210 200 210
200 190 200 190
200 200 200 200
180 180 200 180
GU.CG..GC
80 170 200 170
200 200 200 200
150 210 200 210
-90 0 200 0
GU.CU..GC
200 200 200 200
180 180 200 180
60 150 200 150
90 90 200 90
GU.GA..GC
80 200 130 160
70 200 120 50
-20 200 30 140
200 200 200 200
GU.GC..GC
110 200 170 90
200 200 210 180
200 200 200 200
180 200 200 160
GU.GG..GC
-20 200 30 140
200 200 200 200
50 200 110 130
-10 200 -40 -210
GU.GU..GC
200 200 200 200
180 200 200 160
140 200 110 -60
180 200 150 160
GU.UA..GC
200 230 60 190
200 160 -50 80
200 170 40 180
200 200 200 200
GU.UC..GC
200 210 0 130
200 190 80 110
200 200 200 200
200 180 70 100
GU.UG..GC
200 170 40 180
200 200 200 200
200 210 40 170
200 0 -310 0
GU.UU..GC
200 200 200 200
200 180 70 100
200 150 -160 160
200 90 60 10
GU.AA..UA
280 260 150 200
250 240 130 200
150 140 30 200
200 200 200 200
GU.AC..UA
260 250 140 200
310 230 220 200
200 200 200 200
310 230 220 200
GU.AG..UA
150 140 30 200
200 200 200 200
210 190 80 200
130 20 90 200
GU.AU..UA
200 200 200 200
310 230 220 200
230 120 190 200
270 150 220 200
GU.CA..UA
250 310 200 310
230 220 200 220
130 220 200 220
200 200 200 200
GU.CC..UA
240 230 200 230
220 220 200 220
200 200 200 200
220 220 200 220
GU.CG..UA
130 220 200 220
200 200 200 200
180 240 200 240
10 100 200 100
GU.CU..UA
200 200 200 200
220 220 200 220
110 200 200 200
140 140 200 140
GU.GA..UA
150 200 210 230
130 200 180 110
30 200 80 190
200 200 200 200
GU.GC..UA
140 200 190 120
220 200 240 200
200 200 200 200
220 200 240 200
GU.GG..UA
30 200 80 190
200 200 200 200
80 200 140 160
90 200 70 -110
GU.GU..UA
200 200 200 200
220 200 240 200
190 200 160 -10
220 200 200 200
GU.UA..UA
200 310 130 270
200 220 10 140
200 220 90 220
200 200 200 200
GU.UC..UA
200 230 20 150
200 220 100 140
200 200 200 200
200 220 100 140
GU.UG..UA
200 220 90 220
200 200 200 200
200 240 70 200
200 100 -210 110
GU.UU..UA
200 200 200 200
200 220 100 140
200 200 -110 200
200 140 110 60
GU.AA..GU
280 260 150 200
230 220 110 200
170 160 50 200
200 200 200 200
GU.AC..GU
280 260 150 200
340 260 250 200
200 200 200 200
340 260 250 200
GU.AG..GU
170 160 50 200
200 200 200 200
210 200 90 200
100 -20 50 200
GU.AU..GU
200 200 200 200
310 230 220 200
220 110 180 200
290 180 250 200
GU.CA..GU
250 310 200 310
210 200 200 200
150 240 200 240
200 200 200 200
GU.CC..GU
250 250 200 250
250 250 200 250
200 200 200 200
250 250 200 250
GU.CG..GU
150 240 200 240
200 200 200 200
190 240 200 240
-30 70 200 70
GU.CU..GU
200 200 200 200
220 220 200 220
100 190 200 190
170 160 200 160
GU.GA..GU
150 200 210 230
110 200 160 90
50 200 100 210
200 200 200 200
GU.GC..GU
150 200 210 130
250 200 270 230
200 200 200 200
250 200 270 230
GU.GG..GU
50 200 100 210
200 200 200 200
90 200 140 170
50 200 30 -150
GU.GU..GU
200 200 200 200
220 200 240 200
180 200 150 -20
250 200 220 230
GU.UA..GU
200 310 130 270
200 200 -10 120
200 240 110 240
200 200 200 200
GU.UC..GU
200 250 30 170
200 250 130 170
200 200 200 200
200 250 130 170
GU.UG..GU
200 240 110 240
200 200 200 200
200 240 70 200
200 70 -250 70
GU.UU..GU
200 200 200 200
200 220 100 140
200 190 -120 190
200 160 130 80
GU.AA..UG
280 260 150 200
250 240 130 200
150 140 30 200
200 200 200 200
GU.AC..UG
260 250 140 200
310 230 220 200
200 200 200 200
310 230 220 200
GU.AG..UG
150 140 30 200
200 200 200 200
210 190 80 200
130 20 90 200
GU.AU..UG
200 200 200 200
310 230 220 200
230 120 190 200
270 150 220 200
GU.CA..UG
250 310 200 310
230 220 200 220
130 220 200 220
200 200 200 200
GU.CC..UG
240 230 200 230
220 220 200 220
200 200 200 200
220 220 200 220
GU.CG..UG
130 220 200 220
200 200 200 200
180 240 200 240
10 100 200 100
GU.CU..UG
200 200 200 200
220 220 200 220
110 200 200 200
140 140 200 140
GU.GA..UG
150 200 210 230
130 200 180 110
30 200 80 190
200 200 200 200
GU.GC..UG
140 200 190 120
220 200 240 200
200 200 200 200
220 200 240 200
GU.GG..UG
30 200 80 190
200 200 200 200
80 200 140 160
90 200 70 -110
GU.GU..UG
200 200 200 200
220 200 240 200
190 200 160 -10
220 200 200 200
GU.UA..UG
200 310 130 270
200 220 10 140
200 220 90 220
200 200 200 200
GU.UC..UG
200 230 20 150
200 220 100 140
200 200 200 200
200 220 100 140
GU.UG..UG
200 220 90 220
200 200 200 200
200 240 70 200
200 100 -210 110
GU.UU..UG
200 200 200 200
200 220 100 140
200 200 -110 200
200 140 110 60
UG.AA..AU
280 280 170 200
230 230 130 200
170 170 70 200
200 200 200 200
UG.AC..AU
280 280 170 200
340 280 270 200
200 200 200 200
340 280 270 200
UG.AG..AU
170 170 70 200
200 200 200 200
210 210 110 200
100 0 70 200
UG.AU..AU
200 200 200 200
310 250 240 200
220 120 200 200
290 190 270 200
UG.CA..AU
230 340 200 310
190 230 200 200
130 270 200 240
200 200 200 200
UG.CC..AU
230 280 200 250
230 280 200 250
200 200 200 200
230 280 200 250
UG.CG..AU
130 270 200 240
200 200 200 200
170 270 200 240
-50 100 200 70
UG.CU..AU
200 200 200 200
200 250 200 220
80 220 200 190
150 190 200 160
UG.GA..AU
170 200 210 220
130 200 170 80
70 200 110 200
200 200 200 200
UG.GC..AU
170 200 210 120
270 200 270 220
200 200 200 200
270 200 270 220
UG.GG..AU
70 200 110 200
200 200 200 200
110 200 150 160
70 200 30 -160
UG.GU..AU
200 200 200 200
240 200 240 190
200 200 160 -30
270 200 230 220
UG.UA..AU
200 340 100 290
200 230 -50 150
200 270 70 270
200 200 200 200
UG.UC..AU
200 280 0 190
200 280 100 190
200 200 200 200
200 280 100 190
UG.UG..AU
200 270 70 270
200 200 200 200
200 270 30 230
200 100 -290 90
UG.UU..AU
200 200 200 200
200 250 70 160
200 220 -160 220
200 190 90 110
UG.AA..CG
210 210 110 200
190 190 80 200
10 10 -90 200
200 200 200 200
UG.AC..CG
180 180 80 200
250 190 180 200
200 200 200 200
150 90 90 200
UG.AG..CG
70 70 -30 200
200 200 200 200
180 180 70 200
0 -100 -30 200
UG.AU..CG
200 200 200 200
250 190 190 200
40 -60 10 200
210 110 190 200
UG.CA..CG
170 270 200 240
140 190 200 160
-30 110 200 80
200 200 200 200
UG.CC..CG
140 180 200 150
140 190 200 160
200 200 200 200
40 90 200 60
UG.CG..CG
30 170 200 140
200 200 200 200
130 240 200 210
-150 0 200 -30
UG.CU..CG
200 200 200 200
150 190 200 160
-110 40 200 10
70 110 200 80
UG.GA..CG
110 200 150 160
80 200 120 30
-90 200 -50 40
200 200 200 200
UG.GC..CG
80 200 120 30
180 200 180 130
200 200 200 200
90 200 80 40
UG.GG..CG
-30 200 10 100
200 200 200 200
70 200 110 120
-30 200 -70 -260
UG.GU..CG
200 200 200 200
190 200 190 140
10 200 -30 -220
190 200 150 140
UG.UA..CG
200 270 30 230
200 190 -90 100
200 110 -90 110
200 200 200 200
UG.UC..CG
200 180 -100 100
200 190 10 100
200 200 200 200
200 90 -90 0
UG.UG..CG
200 170 -30 170
200 200 200 200
200 240 0 190
200 0 -390 -10
UG.UU..CG
200 200 200 200
200 190 10 110
200 40 -350 30
200 110 10 30
UG.AA..GC
200 200 100 200
190 190 90 200
100 100 0 200
200 200 200 200
UG.AC..GC
240 240 130 200
280 220 220 200
200 200 200 200
270 210 200 200
UG.AG..GC
100 100 0 200
200 200 200 200
180 180 70 200
30 -70 10 200
UG.AU..GC
200 200 200 200
270 210 200 200
180 80 160 200
220 120 190 200
UG.CA..GC
160 260 200 230
150 190 200 160
60 200 200 170
200 200 200 200
UG.CC..GC
190 240 200 210
180 220 200 190
200 200 200 200
160 210 200 180
UG.CG..GC
60 200 200 170
200 200 200 200
130 240 200 210
-110 30 200 0
UG.CU..GC
200 200 200 200
160 210 200 180
40 180 200 150
70 120 200 90
UG.GA..GC
100 200 140 150
90 200 130 40
0 200 40 130
200 200 200 200
UG.GC..GC
130 200 170 80
220 200 220 170
200 200 200 200
200 200 200 150
UG.GG..GC
0 200 40 130
200 200 200 200
70 200 110 120
10 200 -30 -220
UG.GU..GC
200 200 200 200
200 200 200 150
160 200 120 -70
190 200 150 150
UG.UA..GC
200 260 20 220
200 190 -90 110
200 200 0 200
200 200 200 200
UG.UC..GC
200 240 -40 150
200 220 40 140
200 200 200 200
200 210 30 120
UG.UG..GC
200 200 0 200
200 200 200 200
200 240 0 190
200 30 -350 30
UG.UU..GC
200 200 200 200
200 210 30 120
200 180 -200 180
200 120 20 30
UG.AA..UA
280 280 170 200
250 250 150 200
150 150 50 200
200 200 200 200
UG.AC..UA
260 260 160 200
310 250 240 200
200 200 200 200
310 250 240 200
UG.AG..UA
150 150 50 200
200 200 200 200
210 210 100 200
130 30 110 200
UG.AU..UA
200 200 200 200
310 250 240 200
230 130 210 200
270 170 240 200
UG.CA..UA
230 340 200 310
210 250 200 220
110 250 200 220
200 200 200 200
UG.CC..UA
220 260 200 230
200 250 200 220
200 200 200 200
200 250 200 220
UG.CG..UA
110 250 200 220
200 200 200 200
160 270 200 240
-10 130 200 100
UG.CU..UA
200 200 200 200
200 250 200 220
90 230 200 200
120 170 200 140
UG.GA..UA
170 200 210 220
150 200 190 100
50 200 90 180
200 200 200 200
UG.GC..UA
160 200 200 110
240 200 240 190
200 200 200 200
240 200 240 190
UG.GG..UA
50 200 90 180
200 200 200 200
100 200 140 150
110 200 70 -120
UG.GU..UA
200 200 200 200
240 200 240 190
210 200 170 -20
240 200 200 190
UG.UA..UA
200 340 100 290
200 250 -30 170
200 250 50 250
200 200 200 200
UG.UC..UA
200 260 -20 180
200 250 70 160
200 200 200 200
200 250 70 160
UG.UG..UA
200 250 50 250
200 200 200 200
200 270 30 220
200 130 -250 130
UG.UU..UA
200 200 200 200
200 250 70 160
200 230 -150 230
200 170 70 80
UG.AA..GU
280 280 170 200
230 230 130 200
170 170 70 200
200 200 200 200
UG.AC..GU
280 280 170 200
340 280 270 200
200 200 200 200
340 280 270 200
UG.AG..GU
170 170 70 200
200 200 200 200
210 210 110 200
100 0 70 200
UG.AU..GU
200 200 200 200
310 250 240 200
220 120 200 200
290 190 270 200
UG.CA..GU
230 340 200 310
190 230 200 200
130 270 200 240
200 200 200 200
UG.CC..GU
230 280 200 250
230 280 200 250
200 200 200 200
230 280 200 250
UG.CG..GU
130 270 200 240
200 200 200 200
170 270 200 240
-50 100 200 70
UG.CU..GU
200 200 200 200
200 250 200 220
80 220 200 190
150 190 200 160
UG.GA..GU
170 200 210 220
130 200 170 80
70 200 110 200
200 200 200 200
UG.GC..GU
170 200 210 120
270 200 270 220
200 200 200 200
270 200 270 220
UG.GG..GU
70 200 110 200
200 200 200 200
110 200 150 160
70 200 30 -160
UG.GU..GU
200 200 200 200
240 200 240 190
200 200 160 -30
270 200 230 220
UG.UA..GU
200 340 100 290
200 230 -50 150
200 270 70 270
200 200 200 200
UG.UC..GU
200 280 0 190
200 280 100 190
200 200 200 200
200 280 100 190
UG.UG..GU
200 270 70 270
200 200 200 200
200 270 30 230
200 100 -290 90
UG.UU..GU
200 200 200 200
200 250 70 160
200 220 -160 220
200 190 90 110
UG.AA..UG
280 280 170 200
250 250 150 200
150 150 50 200
200 200 200 200
UG.AC..UG
260 260 160 200
310 250 240 200
200 200 200 200
310 250 240 200
UG.AG..UG
150 150 50 200
200 200 200 200
210 210 100 200
130 30 110 200
UG.AU..UG
200 200 200 200
310 250 240 200
230 130 210 200
270 170 240 200
UG.CA..UG
230 340 200 310
210 250 200 220
110 250 200 220
200 200 200 200
UG.CC..UG
220 260 200 230
200 250 200 220
200 200 200 200
200 250 200 220
UG.CG..UG
110 250 200 220
200 200 200 200
160 270 200 240
-10 130 200 100
UG.CU..UG
200 200 200 200
200 250 200 220
90 230 200 200
120 170 200 140
UG.GA..UG
170 200 210 220
150 200 190 100
50 200 90 180
200 200 200 200
UG.GC..UG
160 200 200 110
240 200 240 190
200 200 200 200
240 200 240 190
UG.GG..UG
50 200 90 180
200 200 200 200
100 200 140 150
110 200 70 -120
UG.GU..UG
200 200 200 200
240 200 240 190
210 200 170 -20
240 200 200 190
UG.UA..UG
200 340 100 290
200 250 -30 170
200 250 50 250
200 200 200 200
UG.UC..UG
200 260 -20 180
200 250 70 160
200 200 200 200
200 250 70 160
UG.UG..UG
200 250 50 250
200 200 200 200
200 270 30 220
200 130 -250 130
UG.UU..UG
200 200 200 200
200 250 70 160
200 230 -150 230
200 170 70 80
>Interior Loops 1x2
>CG.A..AU = 5'- C A A -3'
> 3'- G Y X U -5'
>Rows: X = A C G U (X constant for a row)
>Columns: Y = A C G U (Y constant in column)
AU.A..AU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
AU.C..AU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
AU.G..AU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
AU.U..AU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
AU.A..CG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
AU.C..CG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
AU.G..CG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
AU.U..CG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
AU.A..GC
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
AU.C..GC
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
AU.G..GC
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
AU.U..GC
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
AU.A..UA
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
AU.C..UA
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
AU.G..UA
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
AU.U..UA
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
AU.A..GU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
AU.C..GU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
AU.G..GU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
AU.U..GU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
AU.A..UG
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
AU.C..UG
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
AU.G..UG
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
AU.U..UG
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
CG.A..AU
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
CG.C..AU
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
CG.G..AU
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
CG.U..AU
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
CG.A..CG
230 220 110 400
210 170 160 400
80 60 40 400
400 400 400 400
CG.C..CG
230 220 400 220
220 250 400 220
400 400 400 400
250 190 400 220
CG.G..CG
170 400 80 400
400 400 400 400
80 400 220 400
400 400 400 400
CG.U..CG
400 400 400 400
400 220 400 150
400 400 400 400
400 170 400 120
CG.A..GC
240 220 160 400
210 170 160 400
100 60 40 400
400 400 400 400
CG.C..GC
230 220 400 220
220 250 400 220
400 400 400 400
250 190 400 220
CG.G..GC
170 400 80 400
400 400 400 400
80 400 220 400
400 400 400 400
CG.U..GC
400 400 400 400
400 220 400 130
400 400 400 400
400 170 400 120
CG.A..UA
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
CG.C..UA
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
CG.G..UA
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
CG.U..UA
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
CG.A..GU
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
CG.C..GU
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
CG.G..GU
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
CG.U..GU
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
CG.A..UG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
CG.C..UG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
CG.G..UG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
CG.U..UG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GC.A..AU
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GC.C..AU
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GC.G..AU
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GC.U..AU
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GC.A..CG
240 220 160 400
210 170 160 400
100 60 40 400
400 400 400 400
GC.C..CG
230 220 400 220
220 250 400 220
400 400 400 400
250 190 400 220
GC.G..CG
170 400 80 400
400 400 400 400
80 400 220 400
400 400 400 400
GC.U..CG
400 400 400 400
400 220 400 130
400 400 400 400
400 170 400 120
GC.A..GC
250 220 210 400
210 170 160 400
120 60 40 400
400 400 400 400
GC.C..GC
230 220 400 220
220 250 400 220
400 400 400 400
250 190 400 220
GC.G..GC
170 400 80 400
400 400 400 400
80 400 220 400
400 400 400 400
GC.U..GC
400 400 400 400
400 220 400 120
400 400 400 400
400 170 400 120
GC.A..UA
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GC.C..UA
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GC.G..UA
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GC.U..UA
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GC.A..GU
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GC.C..GU
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GC.G..GU
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GC.U..GU
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GC.A..UG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GC.C..UG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GC.G..UG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GC.U..UG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
UA.A..AU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UA.C..AU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UA.G..AU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UA.U..AU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UA.A..CG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
UA.C..CG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
UA.G..CG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
UA.U..CG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
UA.A..GC
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
UA.C..GC
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
UA.G..GC
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
UA.U..GC
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
UA.A..UA
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UA.C..UA
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UA.G..UA
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UA.U..UA
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UA.A..GU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UA.C..GU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UA.G..GU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UA.U..GU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UA.A..UG
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UA.C..UG
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UA.G..UG
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UA.U..UG
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
GU.A..AU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
GU.C..AU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
GU.G..AU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
GU.U..AU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
GU.A..CG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GU.C..CG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GU.G..CG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GU.U..CG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GU.A..GC
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
GU.C..GC
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
GU.G..GC
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
GU.U..GC
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
GU.A..UA
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
GU.C..UA
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
GU.G..UA
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
GU.U..UA
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
GU.A..GU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
GU.C..GU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
GU.G..GU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
GU.U..GU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
GU.A..UG
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
GU.C..UG
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
GU.G..UG
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
GU.U..UG
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UG.A..AU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UG.C..AU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UG.G..AU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UG.U..AU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UG.A..CG
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
UG.C..CG
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
UG.G..CG
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
UG.U..CG
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
UG.A..GC
320 300 240 480
290 250 240 480
180 140 120 480
480 480 480 480
UG.C..GC
310 300 480 300
300 330 480 300
480 480 480 480
330 270 480 300
UG.G..GC
250 480 160 480
480 480 480 480
160 480 300 480
480 480 480 480
UG.U..GC
480 480 480 480
480 300 480 210
480 480 480 480
480 250 480 200
UG.A..UA
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UG.C..UA
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UG.G..UA
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UG.U..UA
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UG.A..GU
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UG.C..GU
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UG.G..GU
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UG.U..GU
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
UG.A..UG
390 370 310 550
360 320 310 550
250 210 190 550
550 550 550 550
UG.C..UG
380 370 550 370
370 400 550 370
550 550 550 550
400 340 550 370
UG.G..UG
320 550 230 550
550 550 550 550
230 550 370 550
550 550 550 550
UG.U..UG
550 550 550 550
550 370 550 280
550 550 550 550
550 320 550 270
>POLYC - Penalty for poly C hairpins.
>First number is penalty for polyC triloop
>Second number is "slope", i.e. penalty per C in a non triloop
>Third number is "intercept", i.e. constant penalty for non triloops
140 30 160
>BETA - Pseudoknot energy parameters. B1 B2 B3 B1M B1P
>B1 = Constant penalty for "open" pseudoknot
>B2 = penalty per pair in pseudoknot
>B3 = penalty per base in pseudoknot
>B1M = constant penalty for pseudoknot in a "closed" loop
>B1P = constant penalty for pseudoknot in a pseudoknot.
960 10 10 1500 1500
>BIMOLECULAR //TINOCO, 277
409
#!/usr/bin/python3
from sys import argv
import subprocess
import inspect
from multiprocessing import Pool, TimeoutError, cpu_count
from os import path, makedirs, getcwd, chdir, devnull
# Retrieve Jar3D Paths from file EditMe
jar3dexec = ""
HLmotifDir = ""
ILmotifDir = ""
exec(compile(open(path.dirname(path.abspath(inspect.getfile(inspect.currentframe())))+"/EditMe").read(),'','exec'))
class Loop:
def __init__(self, header, subsequence, looptype, position):
self.header = header
self.seq = subsequence
self.type = looptype
self.position = position
def get_header(self):
return self.header
def subsequence(self):
return self.seq
class InsertionSite:
def __init__(self, loop, csv_line):
# BEWARE : jar3d csv output is crap because of java's locale settings.
# On french OSes, it uses commas to delimit the fields AND as floating point delimiters !!
# Parse with caution, and check what the csv output files look like on your system...
info = csv_line.split(',')
self.loop = loop # the Loop object that has been searched with jar3d
self.position = loop.position # position of the loop's components, so the motif's ones, in the query sequence.
self.atlas_id = info[2] # Motif model identifier of the RNA 3D Motif Atlas
self.score = int(float(info[4])) # alignment score of the subsequence to the motif model
self.rotation = int(info[-2]) # should the motif model be inverted to fit the sequence ?
def __lt__(self, other):
return self.score < other.score
def __gt__(self, other):
return self.score > other.score
def enumerate_loops(s):
def printLoops(s,loops):
print(s)
for l in loops:
i = 0
m=''
for c in l:
while i<c[0]:
m+=' '
i+=1
while i<c[1]+1:
m+='-'
i+=1
while i<len(s):
m+=' '
i+=1
print(m,"\tfound in position",l)
def resort(unclosedLoops):
loops.insert(len(loops)-1-unclosedLoops, loops[-1])
loops.pop(-1)
opened = []
openingStart = []
closingStart = []
loops = []
loopsUnclosed = 0
consecutiveOpenings = []
if s[0]=='(':
consecutiveOpenings.append(1)
consecutiveClosings = 0
lastclosed = -1
previous = ''
for i in range(len(s)):
# If we arrive on an unpaired segment
if s[i] == '.':
if previous == '(':
openingStart.append(i-1)
if previous == ')':
closingStart.append(i-1)
# Opening basepair
if s[i] == '(':
if previous == '(':
consecutiveOpenings[-1] += 1
else:
consecutiveOpenings.append(1)
if previous == ')':
closingStart.append(i-1)
if len(openingStart) and openingStart[-1] == opened[-1]: # We have something like (...(
loops.append( [(openingStart[-1],i)] ) # Create a new loop starting with this component.
openingStart.pop(-1)
loopsUnclosed += 1
if len(closingStart) and closingStart[-1] == lastclosed: # We have something like )...( or even )(
loops[-1].append( (closingStart[-1],i) ) # Append a component to existing multiloop
closingStart.pop(-1)
opened.append(i)
# Closing basepair
if s[i] == ')':
if previous == ')':
consecutiveClosings += 1
else:
consecutiveClosings = 1
if previous == '(': # This is not supposed to happen in real data, but whatever.
openingStart.append(i-1)
if len(openingStart) and openingStart[-1] == opened[-1]: # We have something like (...) or ()
loops.append( [(openingStart[-1], i)] ) # Create a new loop, and save it as already closed (HL)
openingStart.pop(-1)
resort(loopsUnclosed)
if len(closingStart) and closingStart[-1] == lastclosed: # We have something like )...)
loops[-1].append( (closingStart[-1],i) ) # Append a component to existing multiloop and close it.
closingStart.pop(-1)
loopsUnclosed -= 1
resort(loopsUnclosed)
if i+1<len(s):
if s[i+1] != ')': # We are on something like: ).
if consecutiveClosings < consecutiveOpenings[-1]: # an openingStart has not been correctly detected, like in ...((((((...)))...)))
loops.append( [(opened[-2], opened[-1])] ) # Create a new loop (uncompleted)
loopsUnclosed+=1
if consecutiveClosings == consecutiveOpenings[-1]: # We just completed an HL+stem, like ...(((...))).., we can forget its info
consecutiveClosings = 0
consecutiveOpenings.pop(-1)
else: # There are still several basepairs to remember, forget only the processed ones, keep the others
consecutiveOpenings[-1] -= consecutiveClosings
consecutiveClosings = 0
else: # We are on something like: ))
if consecutiveClosings == consecutiveOpenings[-1]: # we are on an closingStart that cannot be correctly detected, like in ...(((...(((...))))))
loops[-1].append( (i, i+1) ) # Append a component to the uncomplete loop and close it.
loopsUnclosed -= 1
resort(loopsUnclosed)
consecutiveClosings = 0 # Forget the info about the processed stem.
consecutiveOpenings.pop(-1)
opened.pop(-1)
lastclosed = i
previous = s[i]
# print(i,"=",s[i],"\t", "consec. Op=", consecutiveOpenings,"Cl=",consecutiveClosings)
printLoops(s, loops)
return(loops)
def launchJar3d(loop):
# write motif to a file
newpath = getcwd()+'/'+loop.header[1:]
if not path.exists(newpath):
makedirs(newpath)
chdir(newpath)
filename = loop.header[1:]+".fasta"
fasta = open(filename,'w')
fasta.write(loop.get_header()+'\n'+loop.subsequence()+'\n')
fasta.close()
# Launch Jar3D on it
if loop.type == 'h':
cmd = ["java", "-jar", jar3dexec, filename, HLmotifDir+"/all.txt", loop.header[1:]+".HLloop.csv", loop.header[1:]+".HLseq.csv"]
else:
cmd = ["java", "-jar", jar3dexec, filename, ILmotifDir+"/all.txt", loop.header[1:]+".ILloop.csv", loop.header[1:]+".ILseq.csv"]
print(' '.join(cmd))
nowhere = open(devnull, 'w')
subprocess.call(cmd, stdout=nowhere)
nowhere.close()
# Retrieve results
insertion_sites = []
if loop.type == 'h':
capstype = "HL"
else:
capstype = "IL"
csv = open(loop.header[1:]+".%sseq.csv"%capstype, 'r')
l = csv.readline()
while l:
if "true" in l:
insertion_sites.append( InsertionSite(loop, l) )
l = csv.readline()
csv.close()
# Cleaning
chdir("..")
subprocess.call(["rm","-r",loop.header[1:]])
return insertion_sites
filename = argv[1]
basename = filename[0:filename.index('.')]
# Retrieving possible 2D structrures from RNAsubopt
print("Retrieving possible 2D structures from RNAsubopt...")
dbn = open(basename+".dbn","w")
subprocess.call(["RNAsubopt", "-i", filename], stdout=dbn)
dbn.close()
dbn = open(basename+".dbn","r")
dbn.readline()
s = dbn.readline().split(' ')[0]
structures = []
l = dbn.readline()
while l:
structures.append(l.split(' ')[0])
l = dbn.readline()
dbn.close()
subprocess.call(["rm", basename+".dbn"])
for ss in structures:
print(ss)
print()
# Extracting probable loops from these structures
print("Extracting probable loops from these structures...")
HLs = []
ILs = []
for ss in structures:
loop_candidates = enumerate_loops(ss)
for loop_candidate in loop_candidates:
if len(loop_candidate) == 1 and loop_candidate not in HLs:
HLs.append(loop_candidate)
if len(loop_candidate) == 2 and loop_candidate not in ILs:
ILs.append(loop_candidate)
print("TOTAL:")
print(len(HLs),"probable hairpin loops found")
print(len(ILs),"probable internal loops")
print()
# Retrieve subsequences corresponding to the possible loops
print("Retrieving subsequences corresponding to the possible loops...")
loops = []
for i,l in enumerate(HLs):
loops.append(Loop(">HL%d"%(i+1), s[l[0][0]-1:l[0][1]], "h", l))
print()
print(loops[-1].get_header(),"\t\t",l)
print(loops[-1].subsequence())
for i,l in enumerate(ILs):
loops.append(Loop(">IL%d"%(i+1), s[l[0][0]-1:l[0][1]]+'*'+s[l[1][0]-1:l[1][1]], "i", l))
print()
print(">IL",i+1,"\t\t",l)
print(loops[-1].subsequence())
print()
# Scanning loop subsequences against motif database
print("Scanning loop subsequences against motif database (using %d threads)..." % (cpu_count()-1))
pool = Pool(processes=cpu_count()-1)
insertion_sites = [ x for y in pool.map(launchJar3d, loops) for x in y ]
insertion_sites.sort(reverse=True)
print(len(insertion_sites), "insertions found:")
# Writing results to file
c = 0
resultsfile = open(basename+".sites.csv","w")
resultsfile.write("Motif,Rotation,Score,Start1,End1,Start2,End2\n")
for site in insertion_sites:
if site.score > 10:
c+=1
string = "FOUND with score %d:\t\t possible insertion of motif "% site.score + site.atlas_id
if site.rotation:
string += " (reversed)"
string += " at positions"
print(string, site.loop.subsequence(), '*'.join([str(x) for x in site.position]))
resultsfile.write(site.atlas_id+','+str(bool(site.rotation))+",%d"%site.score+',')
positions = [','.join([str(y) for y in x]) for x in site.position]
if len(positions)==1:
positions.append("-,-")
resultsfile.write(','.join(positions)+'\n')
if c< len(insertion_sites):
print("... and %d more with score(s) below 10."% (len(insertion_sites)-c))
resultsfile.close()
#ifndef COMPONENT_H
#define COMPONENT_H
#include <string>
class Component
{
public:
Component();
Component(std::string& cons_seq, uint k);
private:
std::string _cons_seq;
uint k;
};
istream& operator>>(istream& is, Component& m);
ostream& operator<<(ostream& os, const Component& m);
#endif
\ No newline at end of file
#include "Motif.h"
\ No newline at end of file
#ifndef MOTIF_H
#define MOTIF_H
#include <vector>
#include <string>
#include "Component.h"
class Motif
{
public:
Motif();
Motif(std::string filename);
~Motif();
std::vector<Component>& getComponents() const;
Component& getComponent(uint k) const;
std::string name;
private:
std::vector<Component> _comps;
};
istream& operator>>(istream& is, Motif& m);
ostream& operator<<(ostream& os, const Motif& m);
#endif
\ No newline at end of file
#include "RNA.h"
RNA::RNA() {}
RNA::~RNA() {}
RNA::RNA(std::string seq) : _seq(seq) { }
#ifndef RNA_H
#define RNA_H
#include <string>
class RNA {
public:
RNA();
RNA(std::string);
~RNA();
uint length() const;
std::string str() const;
// char seq(uint k) const;
// bool isConsensus() const;
// bool containsPseudoBases() const;
private:
std::string _seq;
// bool _coding;
// bool _consensus;
// bool _containsPseudoNTs;
};
inline uint RNA::length() const { return _seq.length(); }
inline std::string RNA::str() const { return _seq; }
#endif
\ No newline at end of file
#include "Motif.h"
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include "RNA.h"
using namespace std;
namespace bpo = boost::program_options;
namespace bf = boost::filesystem;
bool checkMotifFolder(bf::path & folder)
{
if (not(bf::is_directory(folder) and bf::exists(folder))) return false;
bf::directory_iterator end_itr;
uint Ndesc = 0;
for (bf::directory_iterator itr(folder); itr != end_itr; ++itr)
{
if (itr->path().leaf().string().find(string(".desc")) != std::string::npos)
Ndesc++;
}
cout << "Found " << Ndesc << " .desc files in " << folder.string() << endl;
if (Ndesc > 0)
return true;
return false;
}
int parseMotifs(bf::path & folder)
{
bf::directory_iterator end_itr;
for (bf::directory_iterator itr(folder); itr != end_itr; ++itr)
{
if (itr->path().leaf().string().find(string(".desc")) != std::string::npos)
{
}
}
}
int main(int argc, char** argv)
{
bf::path currentFolder(bf::current_path());
bf::path motifFolderPath(currentFolder); // By default, searching here...
bpo::options_description desc("Options");
bpo::variables_map options_map;
RNA querySequence;
desc.add_options()
("help", "Print this help message")
("seq,s", bpo::value<string>()->required(), "RNA sequence to find motives in.")
("motifs,m", bpo::value<bf::path>(), "Path to folder of DESC files describing the motifs to be used")
;
bpo::store(bpo::parse_command_line(argc, argv, desc), options_map);
bpo::notify(options_map);
if (options_map.count("help")) {
cout << desc << endl;
return EXIT_SUCCESS;
}
if (options_map.count("motifs")) {
motifFolderPath = options_map["motifs"].as<bf::path>();
if (not(checkMotifFolder(motifFolderPath))) { return EXIT_FAILURE; }
}
if (options_map.count("seq")) {
querySequence = RNA(options_map["seq"].as<string>());
}
cout << "Working with sequence " << querySequence.str() << " (length " << querySequence.length() << ")." << endl;
return EXIT_SUCCESS;
}