# DNA/RNA Base Composition & GC Fraction Calculator

> DNA/RNA Base Composition & GC Fraction Calculator is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.006001/call, status unknown (last checked 2026-10-21).

Counts nucleotide bases and ambiguity characters in a DNA or RNA sequence and calculates the GC fraction on called (non-ambiguous) bases only.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/biology-dna-rna-composition?utm_source=zero.xyz
- Price: $0.006001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dna-rna-base-composition-gc-fraction-calculator-d3a4972e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qjt3H46bR5dxBqs4t3Afh

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 dna-rna-base-composition-gc-fraction-calculator-d3a4972e -d '<json body>'
```

Example prompt: Can you count the bases and calculate the GC fraction for this DNA sequence: ATGCATGCNNNATGC? Mark it as synthetic data and use the DNA alphabet.

## When to prefer this

Use this endpoint when you need a fast, auditable, paid-per-call nucleotide base count and GC fraction for a single DNA or RNA sequence up to 4000 characters. It is strict about alphabet purity (no mixed DNA/RNA), making it reliable for validation pipelines. Prefer it over general-purpose LLM computation when you need a verifiable receipt digest and deterministic count rather than an approximation.

## Known failure modes

- Mixed DNA and RNA alphabet — endpoint refuses sequences containing both DNA-only (T) and RNA-only (U) characters
- Sequence exceeds 4000 character limit — returns a validation error
- Invalid alphabet enum value — must be exactly 'DNA' or 'RNA'
- Invalid dataClass — must be 'public' or 'synthetic'
- Empty or missing sequence — required field validation failure
- Non-nucleotide characters that fall outside allowed alphabets may be counted as ambiguities or trigger rejection

## How this service works

Count DNA/RNA bases and ambiguities and calculate GC fraction on called bases only. Refuses mixed DNA/RNA alphabets; no sequence design or clinical inference.

## Output

Returns a structured result containing per-base counts (e.g. A, T/U, G, C), counts of ambiguous/unrecognized characters, total sequence length, and the GC fraction computed only over unambiguous called bases. Also includes offer ID, version, input digest, receipt digest, and the amount charged in base units.

## 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",
      "sequence",
      "alphabet"
     ],
     "properties": {
      "alphabet": {
       "enum": [
        "DNA",
        "RNA"
       ],
       "type": "string"
      },
      "sequence": {
       "type": "string",
       "maxLength": 4000
      },
      "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-dna-rna-composition"
       ],
       "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": [
        "6001"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dna-rna-base-composition-gc-fraction-calculator-d3a4972e/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)
