Skip to content

Commit

Permalink
init: LinearFold-C
Browse files Browse the repository at this point in the history
  • Loading branch information
abentu0101 committed Mar 14, 2018
0 parents commit b1b9b16
Show file tree
Hide file tree
Showing 7 changed files with 2,659 additions and 0 deletions.
23 changes: 23 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,23 @@
#cmake_minimum_required(VERSION 3.6)
project(fastcky)

if($ENV{CXX})
set(CMAKE_CXX_COMPILER $ENV{CXX} CACHE FILEPATH "CXX Compiler")
endif()
if($ENV{CC})
set(CMAKE_CC_COMPILER $ENV{CC} CACHE FILEPATH "CC Compiler")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lprofiler")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ltcmalloc -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")

set(BEAMCKYPAR_SOURCE
beamckypar.cpp
beamckypar.h
fastcky_w.h
utility.h
cxxopts.hpp)

add_executable(linearfold ${BEAMCKYPAR_SOURCE})
36 changes: 36 additions & 0 deletions README.md
@@ -0,0 +1,36 @@
RNA Sequence Parser for Structure Prediction
============================================

The source code of the LinearFold project, a linear-time RNA secondary structure prediction algorithm.

### Linear-Time Prediction for RNA Secondary Structures

Paper:
LinearFold: Linear-Time Prediction of RNA Secondary Structures
Dezhong Deng, Kai Zhao, David Hendrix, David Mathews, Liang Huang
doi: https://doi.org/10.1101/263509

#### To Compile
LinearFold can be compiled with ```cmake``` with following commands:

```
mkdir build
cd build
cmake ..
make linearfold
```

Note that there are two external libraries stated in ```CMakeLists.txt``` file:

1. ```-lprofiler``` is from Google Performance Tools, and is used to profile the parser, which is turned __off__ by default.
2. ```-ltcmalloc``` is also from Google Performance Tools, which replaces the default ```malloc``` from ```glibc``` and can bring ~5% speedup.


#### To Run
The LinearFold parser can be run with:
```
linearfold sequence_file [beam_size]
```

The default beam_size is infinite.

0 comments on commit b1b9b16

Please sign in to comment.