#bioinformatics #rna #secondary-structure

bin+lib consalifold

Consensus Secondary Structure Predictor Engaging Structural Alignment-based Error Correction

18 releases

Uses old Rust 2015

0.1.17 Feb 26, 2023
0.1.15 Dec 27, 2022
0.1.14 Nov 23, 2022
0.1.12 Apr 23, 2022
0.1.0 Jul 13, 2020

#26 in Biology

Download history 5/week @ 2023-06-05 3/week @ 2023-06-12 22/week @ 2023-06-19 7/week @ 2023-06-26 29/week @ 2023-07-03 15/week @ 2023-07-10 13/week @ 2023-07-17 5/week @ 2023-07-24 4/week @ 2023-07-31 1/week @ 2023-08-07 19/week @ 2023-08-14 36/week @ 2023-08-28 21/week @ 2023-09-04 2/week @ 2023-09-11 3/week @ 2023-09-18

62 downloads per month

MIT license


Python 2.5K SLoC // 0.0% comments Rust 742 SLoC Shell 10 SLoC

Consensus Secondary Structure Predictor Engaging Structural Alignment-based Error Correction


This project is written mainly in Rust, a systems programming language. You need to install Rust components, i.e., rustc (the Rust compiler), cargo (the Rust package manager), and the Rust standard library. Visit the Rust website to see more about Rust. You can install Rust components with the following one line:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

The above installation is done by Rustup, and Rustup enables to easily switch a compiler in use. As ConsAlifold's dependencies, you need to install ViennaRNA and LocARNA-P (if you wish to use instead of ConsProb). You can install ConsAlifold as follows:

# AVX, SSE, and MMX enabled for rustc
# Another example: RUSTFLAGS='--emit asm -C target-feature=+avx2 -C target-feature=+ssse3 -C target-feature=+mmx -C target-feature=+fma'
RUSTFLAGS='--emit asm -C target-feature=+avx -C target-feature=+ssse3 -C target-feature=+mmx' \
  cargo install consalifold

Check if you have installed ConsAlifold properly as follows:

# Its available command options will be displayed.

You can run ConsAlifold with a prepared test RNA alignment:

git clone https://github.com/heartsh/consalifold \
  && cd consalifold
cargo test --release
# The below command requires Gnuplot (http://www.gnuplot.info)
# Benchmark results will be found at "./target/criterion/report/index.html"
cargo bench

By the following Python script, you can reproduce the figures shown in the paper describing ConsAlifold's principle:

cd scripts
# Please install python packages required to this reproduction.
# Saved figures will appear at the "../assets/images" directory.

Docker Playground

I offer my Docker-based playground for RNA software and its instruction to replay my computational experiments easily.

Method Digest

RNAalifold folds each RNA sequence alignment, minimizing the average free energy of a predicted consensus secondary structure. Based on posterior column base-pairing probabilities on RNA consensus secondary structures, PETfold and CentroidAlifold fold each RNA sequence alignment. PETfold and CentroidAlifold correct potential errors in each input sequence alignment utilizing posterior nucleotide base-pairing probabilities on RNA secondary structures. To achieve better alignment error correction than PETfold and CentroidAlifold, I developed ConsAlifold implemented in this repository. ConsAlifold folds each RNA sequence alignment correcting its potential errors with average probabilistic consistency.




Copyright (c) 2018 Heartsh
Licensed under the MIT license.


~1.5M SLoC