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
- Enter start, end. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| start | Start | Required. Safe integer; minimum 0. |
| end | End | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| length | Length | Required. Safe integer. |
| lastIncluded | end-1, or -1 sentinel for an empty half-open interval. | Required. Safe integer. |
| empty | Empty | Required. Boolean. |
{
"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
-
Calculation and input contract: bioinformatics/genomic-left-closed-right-open-length-term — tool.io
-
Genome Browser data file formats: BED — UCSC Genome Browser
Similar or alternative tools
- Phasing Block Span
Return a phasing-block span under an endpoint convention.
- Reverse Strand One Coordinate Transform
Reverse one zero-based sequence coordinate.