Skip to main content

Module bioinformatics

Module bioinformatics 

Source
Expand description

SIMD-Accelerated Bioinformatics Engine.

Production-quality sequence alignment with hardware dispatch:

  • Smith-Waterman local alignment (affine gap penalties)
  • Needleman-Wunsch global alignment
  • BLOSUM62 / nucleotide substitution matrices
  • K-mer frequency analysis + MinHash sketching
  • FASTA record validation
  • Tanimoto metabolite fingerprint similarity

qualia:alignNucleotideSequencealign_nucleotide() qualia:alignProteinSequencealign_protein() qualia:computeKmerFrequencykmer_frequencies() qualia:validateFastaRecordvalidate_fasta_record() qualia:computeMetaboliteSimilaritytanimoto_similarity()

Structs§

AlignmentResult
Full alignment result with traceback and statistics.
AlignmentScore
Lightweight backward-compatible score wrapper.
FastaRecord
GapPenalty
Affine gap penalty model (BLAST defaults: open=-11, extend=-1).
NucleotideMatrix
Nucleotide substitution scores.
PhyloMerge
One agglomeration event in a UPGMA tree: the two child cluster ids merged, the node height, and the id assigned to the new (parent) cluster. Leaves are 0..n; internal nodes are numbered n..2n-1 in merge order, so the last record’s merged_id is the root.

Enums§

SequenceAlphabet

Constants§

MAX_PHYLO_TAXA
Maximum number of taxa (leaves) a single bounded UPGMA build admits. Bounding the taxon count keeps the working distance matrix on the stack — zero heap.

Functions§

align_nucleotide
DNA/RNA Smith-Waterman with BLAST nucleotide defaults.
align_protein
Protein Smith-Waterman with BLOSUM62.
align_sequences
Backward-compatible entry point returning the legacy AlignmentScore.
blosum62_score
BLOSUM62 score for two amino acid bytes. Unknown residues → -4.
build_upgma_tree
Build a UPGMA (Unweighted Pair Group Method with Arithmetic Mean) phylogenetic tree from a flattened n×n symmetric distance matrix (distances[i*n + j]).
calculate_isoelectric_point
Estimates the Isoelectric Point (pI) of a protein sequence using the Henderson-Hasselbalch equation and basic pKa values.
dice_similarity
Dice coefficient between two binary fingerprints.
jaccard_similarity
Jaccard similarity (0.0–1.0) between two MinHash sketches.
kmer_frequencies
Counts all k-mer occurrences; returns (kmer_fnv1a_hash, count) sorted by hash.
minhash_sketch
MinHash sketch: the sketch_size smallest k-mer hashes.
needleman_wunsch
Needleman-Wunsch global alignment with linear gap penalty.
predict_peptide_cleavage
Predicts cleavage sites for Trypsin (cleaves after K or R, unless followed by P). Writes the indices of cleavage into the caller-provided out_indices buffer. Returns the number of cleavage sites found.
smith_waterman
Smith-Waterman local alignment with affine gap penalties. Allocates O(m×n) DP tables — caller should respect MAX_SEQ_LEN.
tanimoto_similarity
Tanimoto (Jaccard) coefficient between two Morgan fingerprints encoded as u64 bitmasks. Multiple words can represent a full extended fingerprint.
translate_dna_to_protein
Translates a DNA sequence into an amino acid sequence using the standard genetic code. Writes directly into the caller-provided out buffer to avoid allocation. Returns the number of amino acids written.
validate_fasta_record
Validates and classifies a FASTA record.