Code Monkey home page Code Monkey logo

description-extractor's Introduction

HGVS variant description extractor

Unambiguous sequence variant descriptions are important in reporting the outcome of clinical diagnostic DNA tests. The standard nomenclature of the Human Genome Variation Society (HGVS) describes the observed variant sequence relative to a given reference sequence. We propose an efficient algorithm for the extraction of HGVS descriptions from two sequences with three main requirements in mind: minimizing the length of the resulting descriptions, minimizing the computation time, and keeping the unambiguous descriptions biologically meaningful.

This algorithm is able to compute the HGVS descriptions of complete chromosomes or other large DNA strings in a reasonable amount of computation time and its resulting descriptions are relatively small. Additional applications include updating of gene variant database contents and reference sequence liftovers.

>>> from extractor import describe_dna
>>> print describe_dna('TAACAATGGAAC', 'TAAACAATTGAA')
[3dup;8G>T;12del]

Implementation

The core algorithm is implemented in C++ with a Python wrapper providing a developer friendly interface.

Installation

Python package

You need SWIG installed. Then:

pip install description-extractor

C++ library only

Run make.

Optionally set the __debug__ flag to trace the algorithm.

For direct use within a C/C++ environment just #include "extractor.h" and add extractor.cc to your project's source files.

Testing

There are some unit tests for the Python interface. After installing the Python package, run them using pytest:

pip install pytest
python setup.py develop
py.test

Alternatively, use tox to automatically run the tests on all supported versions of Python:

pip install tox
tox

description-extractor's People

Contributors

jkvis avatar jfjlaros avatar martijnvermaat avatar

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.