Git Product home page Git Product logo

seqalign_pathing's Introduction

Sequence Alignment With A* Example

This is an example of using A* path finding to accelerate a dynamic programming algorithm, in this case the sequence alignment problem, which Levenshtein distance is a specific instance of.

Unlike the standard Levenshtein distance algorithm, this runs in something like O(n * e^2) time where n is the input length and e is the edit distance. It does this by using a heuristic like A* to explore only promising states along the diagonal of the grid and not the whole O(n^2) grid.

It is substantially faster for large files with few edits than the naive O(n^2) dynamic programming algorithm it is based on, but is still much slower than specialized and highly optimized global sequence alignment programs like Edlib. The difference is I wrote this in two hours and it's 150 lines of code including tests, debugging routines and examples.

It is written in Rust and contains two example programs:

  • seqalign: Reads to FASTA format genetic sequence files and prints the alignment distance.
  • seqalign_plain: Reads two plain text files and prints the alignment distance.

seqalign_pathing's People

Contributors

trishume avatar

Watchers

James Cloos 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.