BedRecord
Mojo struct 🡭
BedRecord
Section titled “BedRecord”@memory_onlystruct BedRecordSingle BED feature (owned). Coordinates are 0-based, half-open.
Fields
Section titled “Fields”- Chrom (
BString) - ChromStart (
UInt64) - ChromEnd (
UInt64) - Name (
Optional[BString]) - Score (
Optional[Int]) - Strand (
Optional[Strand]) - ThickStart (
Optional[UInt64]) - ThickEnd (
Optional[UInt64]) - ItemRgb (
Optional[ItemRgb]) - BlockSizes (
Optional[List[UInt64]]) - BlockStarts (
Optional[List[UInt64]]) - NumFields (
Int)
Implemented traits
Section titled “Implemented traits”AnyType, Copyable, ImplicitlyDestructible, Movable, Writable
Methods
Section titled “Methods”def chrom(ref self) -> StringArgs:
- self (
Self)
Returns:
String
start_position
Section titled “start_position”def start_position(self) -> Position1-based start of the feature (aligned with noodles_core; BED chromStart → start+1).
Args:
- self (
Self)
Returns:
Position
end_position
Section titled “end_position”def end_position(self) -> Optional[Position]1-based end position (ChromEnd). None for zero-length BED records (ChromEnd == 0).
Args:
- self (
Self)
Returns:
Optional
interval
Section titled “interval”def interval(self) -> Optional[Interval]Feature extent as 1-based closed [ChromStart+1, ChromEnd]. Returns None for zero-length BED records (ChromEnd == 0). BED 0-based half-open [s, e) → 1-based closed [s+1, e].
Args:
- self (
Self)
Returns:
Optional
thick_interval
Section titled “thick_interval”def thick_interval(ref self) -> Optional[Interval]Thick (coding) extent if fields 7–8 present; else None (1-based closed).
Args:
- self (
Self)
Returns:
Optional
def name(ref self) -> Optional[String]Args:
- self (
Self)
Returns:
Optional
item_rgb
Section titled “item_rgb”def item_rgb(ref self) -> Optional[ItemRgb]Args:
- self (
Self)
Returns:
Optional
block_sizes
Section titled “block_sizes”def block_sizes(ref self) -> Optional[List[UInt64]]Args:
- self (
Self)
Returns:
Optional
block_starts
Section titled “block_starts”def block_starts(ref self) -> Optional[List[UInt64]]Args:
- self (
Self)
Returns:
Optional
write_to
Section titled “write_to”def write_to[w: Writer](ref self, mut writer: w)Write this record as one TAB-delimited line (same column count as parsed).
Parameters:
- w (
Writer)
Args:
- self (
Self) - writer (
w)