dhtslib 0.6.0

D bindings for htslib


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

dhtslib

Overview

D bindings and convenience wrappers for htslib

Installation

Add dhtslib as a dependency to dub.json:

    "dependencies": {
        "dhtslib": "~>0.5.0",

(version number 0.5.0 is example but current as of today)

Usage

Convenience Wrappers

Object-oriented, idomatic(ish) D wrappers are available for:

  • BGZF compressed files (dhtslib.bgzf)
  • FASTA indexes (dhtslib.faidx)
  • SAM/BAM/CRAM files and streams (dhtslib.sam)
  • Tabix-indexed files (dhtslib.tabix)
  • VCF/BCF files (dhtslib.vcf)

For example, this provides access to BGZF files by line as a consumable InputRange. Or, for BAM files, the ability to query for a range (e.g. "chr1:1000000-2000000") and obtain an InputRange over the BAM records.

htslib API

Direct bindings to htslib C API are available as submodules under dhtslib.htslib. Naming remains the same as the original .h include files. For example, import dhtslib.htslib.faidx for direct access to the C function calls. The current compatible versions are 1.7-1.9.

Currently implemented fully or partially:

  • bgzf
  • faidx
  • hts
  • hts_log
  • kstring
  • regidx
  • sam
  • tbx
  • thread_pool (untested)
  • vcf

Missing (so far):

  • Some CRAM specific functions, although much CRAM functionality works with sam_ functions
  • hfile
  • kbitset, kfunc, khash, klist, knetfile, kseq, ksort (mostly used internally anyway)
  • syncedbcfreader
  • vcf_sweep
  • vcfutils

Bugs and Warnings

Do not call htslog htslog_* from a destructor, as it is potentialy allocating via toStringz

Authors:
  • James S. Blachly, MD
Dependencies:
none
Versions:
0.6.0 2019-Mar-09
0.5.3 2019-Jan-22
0.5.1 2019-Jan-19
0.5.0 2019-Jan-19
0.4.0 2018-Aug-25
Show all 17 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 6 downloads this month

  • 31 downloads total

Score:
0.0
Short URL:
dhtslib.dub.pm