Git Product home page Git Product logo

bits's Introduction

Overview

This repository contains the source code for the BITS (Binary Interval Search) algorithm developed in the Quinlan laboratory at the University of Virginia.

Installation

BITS installation requires the GNU Scientific Library (GSL) as well as NVidia GPU drivers and libraries. Below is a step-by-step tutorial for how to install the necessary drivers, SDK and libraries to run BITS on an NVidia CUDA GPU. If you have questions, email me.

Install the GNU Scientific Libraries (GSL).

  • This is typically quite simple, as one can use package managers.
    • e.g., for OS X using Homebrew: brew install gsl
    • e.g., for Ubuntu: apt-get install gsl

Download and install the CUDA toolkit.

Download and install the CUDA drivers for you system.

Download and install the CUDA SDK.

Download and install the cudapp library at: http://code.google.com/p/cudpp/. Once downloaded, do

cd cudpp_src_2.0
cmake .
make

*Important*: Take note of the path to which you placed cudpp, as you will need this when we update the BITS Makefile.

Update your PATH (rec. you save in .bash_profile for permanence) as follows

export PATH=/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH

Clone the BITS repository

git clone git://github.com/arq5x/bits.git

Navigate into the bits directory

cd bits
Edit the defs.cuda file in accordance with your configuration.
  • Edit the PLATFORM environment variable.
    • if OSX, set PLATFORM=darwin
    • if Linux, set PLATFORM=linux
    • if Windows, sorry this is unsupported.
  • Edit the SDK_PATH environment variable.
    • This is the installation path that you should have taken note of in step #4.
    • e.g., for OS X, this should be: SDK_PATH=/Developer/GPUComputing/
  • Edit the SDK_PATH environment variable.
    • This is the path to which you downloaded and compiled cudpp in step #5.
  • EDIT the CUDA_LIB environment variable.
    • If OS X, this should be: /usr/local/cuda/lib
    • If Linux, this should be: /usr/local/cuda/lib64

At this point, you should be ready to compile BITS

make

Now, you can test both the sequential and CUDA versions of the tools by running the bits_tests scripts. Also, this shell script demonstrates how to run each of the BITS tools

sh bits_tests

If all works well, you should see the following

sh bits_tests
bits_count
72534
bits_count_cuda
72534
bits_count_per_interval
72534
bits_count_per_interval_cuda
72534
bits_enumerate
72534
bits_enumerate_cuda
72534
bits_test
O:72534 E:1124.853000   sd:33.680585    p:0.000999
bits_test_cuda
O:72534 E:1124.081000   sd:36.552024    p:0.000999

Usage

If you want to run the BITS CUDA Monte Carlo simulation tool for a single pairwise comparison of two BED files, run the following, where -n is the number of MC iterations and -g is the name and size of each chromosome:

bin/bits_test_cuda -a a.bed -b b.bed -g chrom.sizes -n 1000

If you want to run the BITS CUDA Monte Carlo simulation tool for a _many_ pairwise comparison of multiple BED files, just create a shell script that loops over every pairwise set of files and calls the program as above. For example:

for file1 in `cat file_list.txt`
do
    for file2 in `cat file_list.txt`
    do
        bin/bits_test_cuda -a $file1 -b $file2 -g chrom.sizes -n 1000
    done
done

Trouble Shooting

OS X: If you get the "no CUDA-capable device is detected" after installing the drivers, try turning off "Automatic graphics switching." Go to launchpad/System Preferences/Energy Saver and uncheck Automatic graphics switching. Thanks to Stéphane Plaisance for this fix.

bits's People

Contributors

ryanlayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bits's Issues

install without cuda

Although the paper and readme mention requiring CUDA, is it possible to compile on a system without CUDA available to enable purely sequential use?

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.