QuantumAligner

Script: quantumaligner.sh Package: aligner Class: QuantumAligner.java

Aligns a query sequence to a reference using QuantumAligner. The sequences can be any characters, but N is a special case. Outputs the identity, rstart, and rstop positions. Optionally prints a state space exploration map. This map can be fed to visualizealignment.sh to make an image.

Basic Usage

quantumaligner.sh <query> <ref>
quantumaligner.sh <query> <ref> <map>
quantumaligner.sh <query> <ref> <map> <iterations>

QuantumAligner performs sequence alignment using sparse matrix exploration with IntList activeList and nextList tracking only positions within adaptive bandwidth. Uses dual long arrays prev[rLen+1] and curr[rLen+1] achieving O(n) space complexity while avoiding traceback operations through mathematical constraint solving.

Parameters

QuantumAligner uses positional arguments rather than named parameters. All parameters are optional except query and reference sequences.

Input Parameters

query
A literal nucleotide sequence or fasta file. The query sequence to be aligned to the reference. Can handle any characters, with special handling for 'N' bases.
ref
A literal nucleotide sequence or fasta file. The reference sequence to align against. Maximum length is limited to 2Mbp due to 21 position bits encoding.
map
Optional output text file for matrix score space visualization. Contains the state space exploration map that can be fed to visualizealignment.sh to generate alignment visualization images. Set to null for benchmarking with no visualization output.
iterations
Optional integer for benchmarking multiple iterations. Allows running the alignment multiple times for performance testing and timing analysis.

Examples

Basic Alignment

quantumaligner.sh ATCGATCGATCG ATCGATCGATCG

Aligns two identical sequences, should return 100% identity.

File-Based Alignment

quantumaligner.sh query.fasta reference.fasta

Aligns sequences from FASTA files.

Alignment with Visualization

quantumaligner.sh query.fasta reference.fasta alignment_map.txt

Performs alignment and outputs visualization map to alignment_map.txt for later visualization.

Benchmarking

quantumaligner.sh ATCGATCGATCG ATCGATCGATCG null 1000

Runs alignment 1000 times for benchmarking without generating visualization output.

Algorithm Details

QuantumAligner implements sparse matrix alignment using decideBandwidth() method and active position tracking through IntList structures with quantum teleportation features for handling long deletions:

Core Implementation Features

Bandwidth Calculation Algorithm

Scoring System Implementation

Bridge Construction Mechanism

Bit Field Architecture

Performance Optimization Features

Identity Calculation Process

Visualization Integration

Technical Implementation

Sequence Processing

Memory Architecture

Performance Characteristics

Output Format

Support

For questions and support: