[BioD](https://github.com/biod/BioD) is a fast and memory efficient bioinformatics library written in the [D programming language](http://dlang.org).
[BioD](https://github.com/biod/BioD) is a fast and memory efficient bioinformatics library written in the [D programming language](http://www.dlang.org)
whose aim is to:
BioD aims to:
* Provide a platform for developing high-performance computational biology applications using the [D programming language](http://www.dlang.org) through
- Automatic parallelization of tasks where possible
- Avoiding unnecessary memory allocations
* Provide a platform for writing high-performance bioinformatics applications in D. BioD achieves this by:
- automatic parallelization of tasks where possible for example reading and writing BAM files
- reducing the GC overhead by avoiding unnecessary memory allocations
* Offer support for manipulating common biological data formats
## Why BioD?
## Why D?
BioD leverages on [D programming language](http://www.dlang.org)
features to develop high performance bioinformatics tools
(e.g. [sambamba](https://github.com/biod/sambamba)). The D programming
language is both a low and high-level hybrid object orientated and
functional (OOP/FP) programming language with templating/generic
features are far easier than that of C++.
D is a language that suits parallel programming because of guarantees
the compiler provides. D is both a low-level language and a high-level
hybrid OOP/FP language. There is no other programming language that
matches those features. Also, D templating/generics is far easier that
that of C++ or, say, Scala.
## D programming language resources
That is not to say that D is an easy language. A powerful toolbox will
be complicated. If you want to do everything with a hammer, maybe
better choose Java instead ;).
For more information about D find Andrei Alexandrecu's D book. It is a
classic. Ali Çehreli's book also is recommended.
*[Programming in D](http://ddili.org/ders/d.en/index.html) is online by Ali Çehreli.
*[The D Programming Language](https://www.amazon.com/D-Programming-Language-Andrei-Alexandrescu/dp/0321635361) by Andrei Alexandrecu (great book, slightly out of date)
*[The D Cookbook](https://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217) by Adam D. Ruppe
## Current development
Our current focus is to provide a bamreader and bamwriter that is
really fast and easy to use. We believe the BAM format is here to stay
for the foreseeable future in pipelines. With D we have an good way to
write performance parsers, particularly with three typical scenarios:
Our aim is to provide a set of D modules to manipulate and work with
biological datasets. BioD provides modules for manipulating high
throughput data formats by provifing fast and easy to use native BAM
file reader and writer with ability to iterate a BAM file a read at a
time,a nucleotide at a time (pileup) or via a sliding window.
1. Go through a BAM file a read at a time
2. Go through a BAM file a nucleotide at a time (pileup)
3. Go through a BAM file with a sliding window
## Install
The sliding window is a derivation of the first - a read at a time or
a nucleotide at a time.
The current default is to provide the path to the checked out repo to
the D-compiler. For example,
At this point this functionality is mostly in BioD, but not in an
intuitive way. We are building up this functionality and will give
examples (WIP).
DFLAGS = -wi -I. -IBioD -g
# Install
## Build environment
The current default is to provide the path to the checked out repo to the D-compiler. For example
in sambamba we use
After installing ldc and dub
DFLAGS = -wi -I. -IBioD -g
dub
dub test
It is possible to create a recent build container with the