Skip to content

Main content

CDS Frame Offset

Compute zero-based codon offset from an explicit spliced-CDS base count, distinct from a GFF phase field.

Loading tool…

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

  1. Enter basesBeforeFeature. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
basesBeforeFeatureBases Before FeatureRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
codonOffsetZeroBasedbasesBeforeFeature modulo three; not automatically a GTF phase field.Required. Safe integer.
basesToNextBoundaryZero when already aligned, otherwise one or two bases.Required. Safe integer.
json
{
  "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

  1. Calculation and input contract: bioinformatics/cds-frame-offset — tool.io

Similar or alternative tools