Show HN: PAlignPrims – C++ library for sequence alignment beyond bioinformatics
github.comPAlignPrims, short for Pairwise Alignment Primitives, is a C++23 header-only library that provides the building blocks for assembling pairwise sequence aligners. I created PAlignPrims because I fell in love with the idea of sequence alignments after learning about them from a bioinformatics textbook. PAlignPrims is my attempt at generalizing alignments beyond bioinformatics, providing a framework for experimenting with and building aligners for other domains.
I've done my best to make PAlignPrims flexible and configurable. Sequences can hold arbitrary element types, scoring is defined by user logic instead of fixed substitution matrices, and alignment behavior is controlled by swappable graphs and backtracking algorithms. The library exposes low-level control over algorithm choice, memory allocation, data layout, and safety checks, letting users trade safety for performance or vice versa.
If anyone seeing this is playing around with alignments or using them in some non-traditional way, I'd be curious to hear about what you're working on. There are features I wanted to add to PAlignPrims but haven't been able to because of life events. Extending to support multithreaded and GPU-assisted alignments were two big features. Fingers crossed I'll be able to look at these in the next few years.
Full disclosure: I'm neither a bioinformatician, nor an expert in sequence alignment, nor an expert in C++23. 0% vibe coded.
No comments yet.