Description
Convert a nonempty zero-based half-open BED interval to one-based endpoints.
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.
Convert a nonempty zero-based half-open BED interval to one-based endpoints.
When to use this tool
Use BED Zero To Start when you already have bedStart, bedEndExclusive and need to convert a nonempty zero-based half-open BED interval to one-based endpoints.
How to use the tool and how it works
- Enter bedStart, bedEndExclusive. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read oneBasedStart, oneBasedEndInclusive, length. Use the output convention below.
Require safe whole bedStart>=0 and bedEndExclusive>=bedStart+1; return start+1, end unchanged as inclusive end, and end-start length.1
BED starts are zero-based and its end coordinate is excluded. Converting the start by one preserves the interval length when expressing the same nonempty interval with one-based inclusive endpoints.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| bedStart | Bed Start | Required. Safe integer; minimum 0. |
| bedEndExclusive | Excluded BED end, required greater than bedStart; numerically equal to one-based inclusive end. | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| oneBasedStart | One Based Start | Required. Safe integer. |
| oneBasedEndInclusive | One Based End Inclusive | Required. Safe integer. |
| length | Length | Required. Safe integer. |
{
"input": {
"bedStart": 99,
"bedEndExclusive": 120
},
"output": {
"oneBasedStart": 100,
"oneBasedEndInclusive": 120,
"length": 21
}
} Limitations and assumptions
- This rejects empty intervals. No chromosome, assembly, feature strand, contig bounds or full BED record is verified.
- 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
-
Calculation and input contract: bioinformatics/bed-zero-to-start — tool.io
-
Genome Browser: BED format — UCSC Genome Browser
Similar or alternative tools
- Genomic Insertion Interbase Coordinate
Crosswalk a supplied left-base insertion position to an interbase coordinate.
- CDS Frame Offset
Calculate a supplied coding-sequence offset modulo three.