Skip to content

FastqBatch

Mojo struct 🡭

@memory_only
struct FastqBatch

AnyType, Copyable, GpuMovableBatch, ImplicitlyDestructible, Movable, Sized, Writable

fn __init__(out self, batch_size: Int = 4096, avg_record_size: Int = 150, quality_offset: UInt8 = UInt8(33))

Args:

  • batch_size (Int)
  • avg_record_size (Int)
  • quality_offset (UInt8)
  • self (Self)

Returns:

Self

fn __init__(out self, records: List[FastqRecord], avg_record_size: Int = 150, quality_offset: UInt8 = UInt8(33))

Args:

  • records (List[FastqRecord])
  • avg_record_size (Int)
  • quality_offset (UInt8)
  • self (Self)

Returns:

Self

Raises:

fn add(mut self, record: FastqRecord)

Args:

  • self (Self)
  • record (FastqRecord)
fn add[origin: MutOrigin](mut self, record: FastqView[origin])

Parameters:

  • origin (MutOrigin)

Args:

  • self (Self)
  • record (FastqView[origin])
fn to_device(self, ctx: DeviceContext) -> DeviceFastqBatch

Args:

  • self (Self)
  • ctx (DeviceContext)

Returns:

DeviceFastqBatch

Raises:

fn stage(self, ctx: DeviceContext) -> StagedFastqBatch

Args:

  • self (Self)
  • ctx (DeviceContext)

Returns:

StagedFastqBatch

Raises:

fn num_records(self) -> Int

Args:

  • self (Self)

Returns:

Int

fn seq_len(self) -> Int

Args:

  • self (Self)

Returns:

Int

fn quality_offset(self) -> UInt8

Args:

  • self (Self)

Returns:

UInt8

fn __len__(self) -> Int

Args:

  • self (Self)

Returns:

Int

fn __repr__(self) -> String

Args:

  • self (Self)

Returns:

String

fn get_record(self, index: Int) -> FastqRecord

Args:

  • self (Self)
  • index (Int)

Returns:

FastqRecord

Raises:

fn get_ref(self, index: Int) -> FastqView[origin_of(self)]

Args:

  • self (Self)
  • index (Int)

Returns:

FastqView[origin_of(self)]

Raises:

fn to_records(self) -> List[FastqRecord]

Args:

  • self (Self)

Returns:

List[FastqRecord]

Raises:

fn write_to(self, mut w: T)

Args:

  • self (Self)
  • w (T)

Raises: