Use when a task needs to compute GC content (fraction of G/C bases) for one or more DNA sequences, with optional FASTA parsing and input validation. Triggers on: bioinformatics, sequence, dna, gc-content, text-processing.
Compute GC content (fraction of G/C bases) for one or more DNA sequences, with optional FASTA parsing and input validation.
Run via Python CLI:
python scripts/compute_gc_content.py --help
Provide sequences in one of these ways:
--sequence SEQUENCE
--input INPUT
Input parsing and validation controls:
--format {raw,fasta}
--strict
--ignore-ambiguous
Output control:
stdout:
stderr:
Example stdout (JSON) for:
python scripts/compute_gc_content.py --sequence ACGTNNGCGC --output json
{ "results": [ { "header": null, "sequence_index": 0, "length": 10, "gc_fraction": 0.6 } ], "summary": { "records": 1, "total_length": 10, "mean_gc_fraction": 0.6 } }
Use when:
Do not use when: