Giter VIP home page Giter VIP logo

lumberjack's Introduction

Lumberjack: Cutting planes for the 1-Dollo Phylogeny problem using CryptoMiniSat.

Contents

  1. Getting started
  2. Usage instructions

Getting started

Lumberjack is written in C++11. The repository is organized as follows:

Folder Description
src source code for Lumberjack
data input data for Lumberjack

Dependencies

Lumberjack can be compiled with CMake (>= 2.8) and has the following dependencies:

Compiling code

Here we walk through how to build the executables using CMake. First, navigate to a directory in which you would like to download Lumberjack. Then perform the following steps:

# Download repository
git clone https://github.com/elkebir-group/Lumberjack.git

# Enter downloaded RECAP folder
cd Lumberjack/

# Make new build directory and enter it
mkdir build
cd ./build/

# Use cmake to compile executables. 
# OPTIONAL: set SAT_ROOT in CMakeLists.txt if CryptoMiniSat not detected.
cmake ..
make

Usage instructions

Here we describe how to run the Lumberjack executable.

I/O format

Lumberjack takes as input a file containing a binary matrix, where rows correspond to clones (or taxa) and columns correspond to mutations (or characters). An example of such a file can be found in the data folder here.

The first line of the file should give the number of rows in the matrix.

25 #taxa

On the second line, we indicate the number of columns in the matrix.

25 #characters

The following lines each contain one row of the matrix. Matrix enteries should be separated by a space. One indicates that the mutation is present in the clone, and zero indicates it is absent. The current code does not allow for false negatives or false positives.

0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1
0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0

Lumberjack Executable

Running Lumberjack

This executable requires as input a filepath to the matrix file described above as well as a path to an outputfile. These are specified using the flags -i and -o, respectively.

# An example of how to run Lumberjack
./build/lumberjack -i ./data/m25_n25_s1_k1_loss0.1.B -o ./results/m25_n25_s1_k1_loss0.1.out

There are additional input options that can be specified.

-t specifies the number of threads to use (default: 1).

Note that the function responsible for adding cuttingplanes is CuttingPlane::separate(), which is based on constraints 11-14 from SPhyr used to ensure that the solution does not contain one of the forbidden submatrices given in Definition 7 of the same paper.

Lumberjack output

The executable prints the number of SAT iteractions along with the number of constraints introduced after each iteration to std::cerr. If a solution is found, the solution matrix is printed to the output filepath in the same format as the input matrix file. Note that the solution matrix will likely not be binary since enteries that were gained and then lossed will be indicated with a 2.

lumberjack's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.