Calculate comprehensive assembly statistics including N50, L50, GC content, scaffold count, total length, and more. Essential for genome assembly quality assessment and comparative analysis.
| Metric | Value | Description |
|---|
You can use the stats API directly from the command line with curl:
curl -X POST https://bbmapservers.jgi.doe.gov/stats/api/stats \
-H "Content-Type: application/json" \
-d '{"sequence": ">scaffold1\nATCGATCG\n>scaffold2\nGCTAGCTA"}'
# Method 1: Read file into JSON
curl -X POST https://bbmapservers.jgi.doe.gov/stats/api/stats \
-H "Content-Type: application/json" \
-d "{\"sequence\": \"$(cat contigs.fa)\"}"
# Method 2: Use jq for proper JSON escaping
curl -X POST https://bbmapservers.jgi.doe.gov/stats/api/stats \
-H "Content-Type: application/json" \
-d "$(jq -n --arg seq "$(cat contigs.fa)" '{sequence: $seq}')"
{
"success": true,
"execution_time": 126,
"statistics": {
"scaffolds": 2,
"scaf_bp": 16,
"scaf_N50": 1,
"scaf_L50": 8,
"gc_avg": 50.0,
...
}
}
Note: The API accepts FASTA format sequences and returns detailed assembly statistics in JSON format.