Description
Calculate a supplied coding-sequence offset modulo three.
Sequence formats distinguish coordinate origins, included endpoints, allele separators and identifier grammars. A genomic interbase position differs from a base number, and a parsed optional-field value may still violate its declared type. Local token checks preserve representation without validating a complete file, sequence, reference assembly or biological interpretation.
Calculate a supplied coding-sequence offset modulo three.
When to use this tool
Use CDS Frame Offset when you already have basesBeforeFeature and need to calculate a supplied coding-sequence offset modulo three.
How to use the tool and how it works
- Enter basesBeforeFeature. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read codonOffsetZeroBased, basesToNextBoundary. Use the output convention below.
Require basesBeforeFeature a nonnegative safe integer; return offset=basesBeforeFeature%3 and basesToNextBoundary=(3-offset)%3.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| basesBeforeFeature | Bases Before Feature | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| codonOffsetZeroBased | basesBeforeFeature modulo three; not automatically a GTF phase field. | Required. Safe integer. |
| basesToNextBoundary | Zero when already aligned, otherwise one or two bases. | Required. Safe integer. |
{
"input": {
"basesBeforeFeature": 7
},
"output": {
"codonOffsetZeroBased": 1,
"basesToNextBoundary": 2
}
} Limitations and assumptions
- Already aligned positions return zero advance. This does not infer a reading frame, translate a sequence or implement every GFF/GTF phase and strand convention.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the complete applicable file specification and a full format validator for conformance. Verify reference assembly, sequence bounds, annotation and database context before interpreting local fields or coordinate transformations.
References
Similar or alternative tools
- BED Zero To Start
Convert a nonempty zero-based half-open BED interval to one-based endpoints.
- Genomic Insertion Interbase Coordinate
Crosswalk a supplied left-base insertion position to an interbase coordinate.