Skip to content

FaiRecord

Mojo struct 🡭

@memory_only
struct FaiRecord

Single entry from a FASTA/FASTQ .fai index file.

Columns (TAB-delimited): 1. NAME – reference sequence name 2. LENGTH – total length of the reference (bases) 3. OFFSET – byte offset of the first base in the FASTA/FASTQ file 4. LINEBASES – number of bases per sequence line 5. LINEWIDTH – number of bytes per sequence line (including newline) 6. QUALOFFSET – (FASTQ only) byte offset of first quality character or None for FASTA 5-column indexes.

  • Name (BString)
  • Length (Int64)
  • Offset (Int64)
  • LineBases (Int64)
  • LineWidth (Int64)
  • QualOffset (Optional[Int64])

AnyType, Copyable, ImplicitlyDestructible, Movable, Sized, Writable

def name(ref self) -> String

Args:

  • self (Self)

Returns:

String

def length(self) -> Int64

Args:

  • self (Self)

Returns:

Int64

def offset(self) -> Int64

Args:

  • self (Self)

Returns:

Int64

def line_bases(self) -> Int64

Args:

  • self (Self)

Returns:

Int64

def line_width(self) -> Int64

Args:

  • self (Self)

Returns:

Int64

def qual_offset(self) -> Optional[Int64]

Args:

  • self (Self)

Returns:

Optional

def __len__(self) -> Int

Return the reference length as an Int.

Args:

  • self (Self)

Returns:

Int

def write_to[w: Writer](self, mut writer: w)

Write this record as a single .fai line.

Parameters:

  • w (Writer)

Args:

  • self (Self)
  • writer (w)