Coder Social home page Coder Social logo

fastdna's Introduction

FastDNA 4:1 encoder

The fastdna program can encode DNA ASCII files into binary files that are one quarter of the original file, or decode them back. The raw inputs are ASCII files that contain only the bases (characters) 'A', 'C', 'G', or 'T'. The encoded files (.2b extension) are binary files, which each base encoded with a unique two-bit combination.

The program has various options to control its speed. Use ./fastdna -h to list all these options.

Building it

The program is designed for x86-64 architectures, ideally with the BMI2 instruction set. To build it on such an architecture, simply type make. You may want to override the compiler choice using CXX, e.g., make CXX=clang++-12.

Testing it

The script runtests.sh will go through a set of simple combinations of inputs and parameters. If all the tests pass, you won't see any error messages.

Measuring it

Evaluating the full performance potential of fastdna requires large inputs sizes (in the order of GBs.). But because the contents of the input file don't affect performance, you can generate a random input for benchmarking. One easy way to generate a random file (say, of size 1TB), might be:

tr -dc 'ACGT' < /dev/urandom | head -c 1T > inputfile

Rebuilding the document

The document cal.pdf can be built from the source markdown file cal.Rmd. It requires R with a few packages, as well as the cal.csv data file with the results of the experiment. Both cal.csv and cal.pdf can be built from scratch using make once the prerequisites have been met.

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.