Skip to main content

Generate DNA

Generate random DNA sequences.

Endpoint

GET /api/genetics/dna/random

Query Parameters

ParameterTypeDefaultDescription
lengthint100Sequence length (bp)
gc_contentfloat-Target GC content (0.0-1.0)

Response

{
"sequence": "ATGCGATCGATCGATCGATC...",
"length": 100,
"gc_content": 0.52,
"base_counts": {
"A": 25,
"T": 23,
"G": 26,
"C": 26
}
}

Example

# Generate 1000bp sequence
curl "http://localhost:8000/api/genetics/dna/random?length=1000"

# Generate with specific GC content
curl "http://localhost:8000/api/genetics/dna/random?length=500&gc_content=0.6"

Performance

LengthTime
1,000 bpUnder 10ms
100,000 bp~50ms
1,000,000 bp~500ms
10,000,000 bp~5s (parallel C++)