Skip to content

Main content

Genomic Left Closed Right Open Length Term Tool

Zero-based half-open interval length with -1 as the no-last-position sentinel for an empty interval.

Loading tool…

Description

Return length and last included position of a half-open interval.

Genome annotations depend on coordinate origin, endpoint inclusion, strand and reading-phase conventions. A local offset or phase token can be handled precisely while a complete transcript, reference identity and biological reading frame remain separate validation questions.

Return length and last included position of a half-open interval.

When to use this tool

Use Genomic Left Closed Right Open Length Term when checking the stated genomic coordinate, annotation phase or attribute-value convention.

How to use the tool and how it works

  1. Enter start, end. 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 length, lastIncluded, empty. Inspect empty before interpreting the associated values.

Return length and last included position of a half-open interval. Require whole 0 <= start <= end; length = end-start, empty tests equality, lastIncluded = end-1 or -1 when empty.1

BED uses a zero-based start and an excluded end; block starts are relative to the enclosing chromosome start. The complete record has additional constraints.2

Input fieldMeaning and unitsAccepted input
startStartRequired. Safe integer; minimum 0.
endEndRequired. Safe integer.
Output fieldInterpretationReturned shape
lengthLengthRequired. Safe integer.
lastIncludedend-1, or -1 sentinel for an empty half-open interval.Required. Safe integer.
emptyEmptyRequired. Boolean.
json
{
  "input": {
    "start": 100,
    "end": 150
  },
  "output": {
    "length": 50,
    "lastIncluded": 149,
    "empty": false
  }
}

Limitations and assumptions

  • No chromosome bounds or reference identity are checked; the empty last-position sentinel is not a real genomic coordinate.
  • 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 intended complete BED/GFF/GTF format, reference assembly and transcript model to validate full annotations and biological meaning.

References

  1. Calculation and input contract: bioinformatics/genomic-left-closed-right-open-length-term — tool.io

  2. Genome Browser data file formats: BED — UCSC Genome Browser

Similar or alternative tools