# Pairwise DNA Sequence Comparison (Needleman-Wunsch)

> Pairwise DNA Sequence Comparison (Needleman-Wunsch) is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.035013/call, status unknown (last checked 2026-11-02).

Globally aligns two DNA sequences (up to 400 bases each) using Needleman-Wunsch scoring and returns aligned strings, percent identity, and gap counts.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/compute/biology/pairwise-sequence-comparison?utm_source=zero.xyz
- Price: $0.035013/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pairwise-dna-sequence-comparison-needleman-wunsch-d3b59396
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MzpHF9lwDVptuxmFb4Pby

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pairwise-dna-sequence-comparison-needleman-wunsch-d3b59396 -d '<json body>'
```

Example prompt: Can you globally align these two DNA sequences and tell me their percent identity and gap count? Left: ATCGATCGATCG... Right: ATCGATCGTTCG... — treat them as synthetic data.

## When to prefer this

Choose this endpoint when you need a deterministic, fixed-scoring global Needleman-Wunsch alignment for two short DNA sequences (≤400 bases each) and require aligned strings with identity and gap statistics. Prefer it over local alignment (Smith-Waterman) when you want end-to-end global coverage. It does not infer pathogenicity or functional consequences, so it is appropriate for pure structural sequence comparison tasks on public or synthetic data.

## Known failure modes

- Sequence exceeds 400-base limit — request rejected with validation error
- Invalid characters in sequence string (non-ACGT) — schema validation failure
- Unsupported dataClass value — enum validation error
- Network or payment failure — no alignment returned, receipt may still be issued
- Empty or missing left/right field — required-field validation error

## How this service works

Globally align two DNA sequences of up to 400 bases using fixed Needleman-Wunsch scores; report aligned strings, identity and gaps. No pathogenicity inference. New modular adapter: retained result recovery for 24 hours, minimal receipt metadata for 90 days. Existing live route unchanged.

## Output

Returns the two aligned sequence strings (with gap characters inserted), percent sequence identity, total gap count, and an alignment score computed via fixed Needleman-Wunsch parameters. Results are retained for retrieval for 24 hours; minimal receipt metadata is kept for 90 days.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "left": {
   "type": "string",
   "maxLength": 400
  },
  "right": {
   "type": "string",
   "maxLength": 400
  },
  "dataClass": {
   "enum": [
    "public",
    "synthetic"
   ],
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pairwise-dna-sequence-comparison-needleman-wunsch-d3b59396/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.mahastrategies.com](https://www.zero.xyz/host/www.mahastrategies.com/llms.txt)
