Scikit bio alignment

From XuShuwenn/RedAct · View interactive version

Scikit bio alignment is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Calculate local alignment scores for DNA sequences using Smith-Waterman algorithm with scikit-bio.

How to use this skill

Skill file

DNA Sequence Alignment Score

When to Use

Input Format

File /root/input.txt with two DNA sequences (one per line)

Scoring Scheme

Use affine-gap local alignment: apply gap opening and gap extension separately. Do not collapse them into a single gap penalty or substitute library defaults.

Algorithm

Smith-Waterman for local alignment:

Output Format

To /root/output.txt:

Alignment score: X

Output is a non-negative integer for Smith-Waterman local alignment because scores can reset to 0.

Using scikit-bio

from skbio import Sequence
from skbio.alignment import local_pairwise_align


Keep the exact scoring model. If a scikit-bio call would not preserve separate gap opening and extension costs cleanly, implement the affine-gap Smith-Waterman score explicitly instead of approximating it.

# Align sequences with scoring

Tips

Execution Protocol

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.