Skip to main content

EbwtParams

Struct EbwtParams 

Source
pub struct EbwtParams {
Show 25 fields pub len: u64, pub bwt_len: u64, pub sz: u64, pub bwt_sz: u64, pub line_rate: i32, pub orig_off_rate: i32, pub off_rate: i32, pub off_mask: u64, pub ftab_chars: i32, pub eftab_len: u32, pub eftab_sz: u32, pub ftab_len: u64, pub ftab_sz: u64, pub offs_len: u64, pub offs_sz: u64, pub line_sz: u32, pub side_sz: u32, pub side_bwt_sz: u32, pub side_bwt_len: u32, pub num_sides: u64, pub num_lines: u64, pub ebwt_tot_len: u64, pub ebwt_tot_sz: u64, pub color: bool, pub entire_reverse: bool,
}
Expand description

Parameters describing an FM-index structure

This corresponds to the EbwtParams class in the original C++ code. All fields match the C++ implementation for binary compatibility.

Fields§

§len: u64

Length of reference sequence

§bwt_len: u64

BWT length (len + 1 for terminating symbol)

§sz: u64

Size in 32-bit words (len+3)/4

§bwt_sz: u64

BWT size in 32-bit words (len/4 + 1)

§line_rate: i32

Log2 of line size (for side calculation)

§orig_off_rate: i32

Original offset rate (from constructor)

§off_rate: i32

Suffix array sample rate (log2)

§off_mask: u64

Mask for offset calculations

§ftab_chars: i32

Number of characters in ftab

§eftab_len: u32

Extended ftab length (ftabChars*2)

§eftab_sz: u32

Extended ftab size in bytes

§ftab_len: u64

Ftab length (1 << (ftabChars*2)) + 1

§ftab_sz: u64

Ftab size in bytes

§offs_len: u64

Offsets array length

§offs_sz: u64

Offsets array size in bytes

§line_sz: u32

Line size (1 << lineRate)

§side_sz: u32

Size of each side in bytes

§side_bwt_sz: u32

Size of BWT portion in each side

§side_bwt_len: u32

Length of BWT portion in each side

§num_sides: u64

Number of sides in the index

§num_lines: u64

Number of lines

§ebwt_tot_len: u64

Total ebwt length

§ebwt_tot_sz: u64

Total ebwt size in bytes

§color: bool

Colorspace mode (not used in DNA mode)

§entire_reverse: bool

Entire reverse mode

Implementations§

Source§

impl EbwtParams

Source

pub fn new(ref_len: u64) -> Self

Create default parameters for a given reference length

Source

pub fn with_options( ref_len: u64, line_rate: i32, off_rate: i32, ftab_chars: i32, color: bool, entire_reverse: bool, ) -> Self

Create parameters with specific options (matches C++ EbwtParams::init)

Source

pub fn set_off_rate(&mut self, off_rate: i32)

Set a new suffix-array sampling rate (matches C++ setOffRate)

Source

pub fn side_size(&self) -> u32

Get size of a side in bytes

Source

pub fn pos_to_side(&self, pos: u64) -> u64

Calculate which side a BWT position is on

Source

pub fn is_valid(&self) -> bool

Check if parameters are valid (matches C++ repOk)

Source

pub fn total_size(&self) -> u64

Get total size in bytes

Trait Implementations§

Source§

impl Clone for EbwtParams

Source§

fn clone(&self) -> EbwtParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EbwtParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EbwtParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for EbwtParams

Source§

fn eq(&self, other: &EbwtParams) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for EbwtParams

Source§

impl StructuralPartialEq for EbwtParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.