You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update docs for AlignedSequences, positive gap penalties, kalign-py CLI
- align_from_file now returns AlignedSequences, not list[str]
- gap penalties are positive values (not negative)
- document kalign-py CLI entry point
- document kalign.compare() function
- add benchmark instructions to README.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align sequences from a file, preserving sequence names.
377
394
378
395
**Parameters:**
379
-
-`input_file` (str): Path to input file
396
+
-`input_file` (str): Path to input file (FASTA, MSF, Clustal)
380
397
- Other parameters same as `align()`
381
398
382
399
**Returns:**
383
-
-`list of str`: Aligned sequences
400
+
-`AlignedSequences`: Named tuple with `.names` (list of str) and `.sequences` (list of str)
401
+
402
+
### `kalign.compare(reference_file, test_file)`
403
+
404
+
Score a test alignment against a reference alignment using the Sum-of-Pairs score.
405
+
406
+
**Parameters:**
407
+
-`reference_file` (str): Path to reference alignment
408
+
-`test_file` (str): Path to test alignment
409
+
410
+
**Returns:**
411
+
-`float`: SP score from 0.0 (no match) to 100.0 (identical)
412
+
413
+
### Command-line interface
414
+
415
+
Installing the Python package provides a `kalign-py` command that uses the Python bindings directly (the C binary is installed separately as `kalign`):
416
+
417
+
```bash
418
+
kalign-py -i sequences.fasta -o aligned.fasta --format fasta --type protein
The repository includes an automated benchmark suite that scores kalign against the BAliBASE reference alignments using both the C binary and the Python API. Results are tracked across commits via GitHub Actions.
297
+
298
+
```bash
299
+
# Run benchmarks locally (requires: pip install -e . and a CMake build)
300
+
make benchmark # full BAliBASE suite
301
+
make benchmark BENCH_MAX_CASES=5 # quick smoke test
0 commit comments