# Pairwise DNA Sequence Alignment (Needleman-Wunsch)

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

Globally aligns two DNA sequences of up to 400 bases using Needleman-Wunsch scoring, returning aligned strings, percent identity, and gap statistics.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/biology-pairwise-sequence-comparison?utm_source=zero.xyz
- Price: $0.018001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pairwise-dna-sequence-alignment-needleman-wunsch-1fe3e883
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b1z3XOvFDfw_Iki32lhZ-

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-alignment-needleman-wunsch-1fe3e883 -d '<json body>'
```

Example prompt: Align these two DNA sequences for me using global Needleman-Wunsch alignment and tell me the percent identity and gap counts — left sequence: ATGCGTACGTTAG, right sequence: ATGCGAACGTTAG — treat this as public data.

## When to prefer this

Choose this endpoint when you need a deterministic, reproducible global pairwise alignment of two short-to-medium DNA sequences (up to 400 bases) with standard Needleman-Wunsch scoring and explicit identity/gap output. Prefer it over local alignment tools (like BLAST-style endpoints) when you need end-to-end global alignment rather than best local match, and when sequences are short enough to fit the 400-base limit.

## Known failure modes

- Sequence longer than 400 bases returns a validation error
- Non-nucleotide characters in sequences cause rejection
- Missing required fields (left, right, dataClass) return schema validation error
- Invalid dataClass value (not 'public' or 'synthetic') causes error
- Payment failure via x402 protocol results in no response

## 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.

## Output

Returns aligned versions of both input sequences showing inserted gaps, the percent sequence identity between them, and total gap statistics — all computed via fixed Needleman-Wunsch scoring. No pathogenicity or clinical inference is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "dataClass",
      "left",
      "right"
     ],
     "properties": {
      "left": {
       "type": "string",
       "maxLength": 400
      },
      "right": {
       "type": "string",
       "maxLength": 400
      },
      "dataClass": {
       "enum": [
        "public",
        "synthetic"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "version",
      "offerId",
      "amountBaseUnits",
      "inputDigest",
      "result",
      "boundaries",
      "receiptDigest"
     ],
     "properties": {
      "result": {
       "type": "object"
      },
      "offerId": {
       "enum": [
        "biology-pairwise-sequence-comparison"
       ],
       "type": "string"
      },
      "version": {
       "enum": [
        "maha-microproducts/0.1"
       ],
       "type": "string"
      },
      "boundaries": {
       "type": "array",
       "maxItems": 128,
       "minItems": 0
      },
      "inputDigest": {
       "type": "string",
       "maxLength": 71
      },
      "receiptDigest": {
       "type": "string",
       "maxLength": 71
      },
      "amountBaseUnits": {
       "enum": [
        "18001"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pairwise-dna-sequence-alignment-needleman-wunsch-1fe3e883/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)
