
This constraint is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.
Constraint contributors
dguo8412
Enforce GC content within specified range.
This constraint function calculates the percentage of guanine (G) and cytosine
(C) nucleotides in DNA or RNA sequences and evaluates whether it falls within
a specified acceptable range. GC content is a fundamental sequence property
that affects DNA stability, melting temperature, gene expression patterns,
and technical considerations like PCR amplification efficiency.
API Reference
Configuration for GC content constraint.This class defines configuration parameters for evaluating the GC content
in DNA or RNA sequences. This penalty scales linearly with deviation from the
acceptable range.
number
required
Minimum acceptable GC content percentage (0-100)
number
required
Maximum acceptable GC content percentage (0-100)
ReturnsConstraintOutput
One result per sequence. A score of 0.0 indicates
GC content is within the acceptable range [min_gc, max_gc]. Higher
scores indicate greater deviation from the acceptable range, with
penalties scaling linearly with the deviation distance. The metadata
field carries gc_content.Usage
Evaluating GC content constraint:python