8000 GitHub - tomsasani/hts-python: pythonic wrapper for htslib
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tomsasani/hts-python

 
 

Repository files navigation

hts-python

pythonic wrapper for htslib C-API using python cffi.

There is enough functionality for this to be useful, but it still needs a lot of work. Documentation Status Build Status codecov

Installation

  1. Install htslib using make install.
  2. pip or easy_install cffi.
  3. Run python setup.py install (--user) from this directory.

Development

This is a work in progress that relies on the hts library. All of the wrapped functions are included in hts/hts_concat.h and then available from python as, e.g. htslib.sam_read1

When C-functions not provided by the api are needed, they are added to hts_extra.c/.h.

One can run the tests with: python -c "import hts; hts.doctests()"

There is enough functionality for this to be quite useful but most of it is limited to getters, not setters, to, for example update an INFO field or modify the bam quality scores.

Things to work on:

  1. Make properties settable in hts.bam. Currently, they are read-only properties. At very least, it will be useful to have setters for seq, base_q, qname, tname, pos, strand, flag.

  2. Wrap B/VCF stuff? (in progress)

Why

Why use this when pysam exists? It's an experiment with python cffi and to provide a pythonic access to htslib.

About

pythonic wrapper for htslib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.1%
  • C 42.2%
  • Shell 0.7%
0