Skip to main content

BuildParams

Struct BuildParams 

Source
pub struct BuildParams {
Show 17 fields pub input: GraphInput, pub seqs: Vec<String>, pub lists: Vec<String>, pub dirs: Vec<String>, pub k: u16, pub minimizer_len: u16, pub cutoff: Option<u32>, pub color: bool, pub compress_buckets: bool, pub skip_unreadable: bool, pub output_prefix: String, pub work_dir: String, pub vertex_partitions: usize, pub lmtig_buckets: usize, pub gmtig_buckets: usize, pub threads: usize, pub max_memory_gb: Option<usize>,
}
Expand description

Configuration shared by partitioning and graph construction phases.

Bucket and partition counts must be powers of two. The public fields support programmatic construction, while BuildParams::validate enforces the cross-field invariants expected by the production pipeline.

Fields§

§input: GraphInput

Whether inputs are sequencing reads or references.

§seqs: Vec<String>

Explicit sequence file paths.

§lists: Vec<String>

Files containing one input path per line.

§dirs: Vec<String>

Directories whose regular files are used as inputs.

§k: u16

K-mer length. Must be odd and no greater than crate::MAX_K.

§minimizer_len: u16

Minimizer length used for weak-super-k-mer partitioning.

§cutoff: Option<u32>

Optional edge-frequency cutoff; input-class defaults apply when absent.

§color: bool

Whether to construct and emit positional colors.

§compress_buckets: bool

Whether weak-super-k-mer buckets use LZ4 block compression.

On by default. Colored builds compress regardless; for uncolored ones this cuts write volume on a 150k reference build from 1167.7 GB to 439 GB and peak RSS by about a quarter, at no measurable cost in wall time across five interleaved pairs at 64 threads.

§skip_unreadable: bool

Whether an input that fails to parse is skipped instead of aborting.

A skipped source retains its position in the input list, so colored source assignments are unaffected. Records read before the failure are retained, so a file that fails part-way through contributes its prefix.

§output_prefix: String

Prefix for final graph files.

§work_dir: String

Directory for external-memory intermediates.

§vertex_partitions: usize

Number of blocked discontinuity-graph vertex partitions.

§lmtig_buckets: usize

Logical local-unitig bucket count.

§gmtig_buckets: usize

Logical maximal-unitig coordinate bucket count.

§threads: usize

Maximum worker count requested for each phase.

§max_memory_gb: Option<usize>

Optional soft memory budget in GiB.

The budget controls replicated phase state and is not a hard RSS limit.

Implementations§

Source§

impl BuildParams

Source

pub fn new(input: GraphInput, output_prefix: String) -> Self

Constructs parameters with Cuttlefish-compatible defaults.

Source

pub fn cutoff(&self) -> u32

Returns the explicit cutoff or the input-class default.

Source

pub fn max_memory_bytes(&self) -> Option<usize>

Returns the soft memory budget in bytes, if configured.

Source

pub fn partition_workers(&self, input_files: usize) -> usize

Returns the partition worker count after input and memory bounds.

Source

pub fn local_workers(&self) -> usize

Returns the memory-bounded local-contraction worker count.

Source

pub fn post_local_workers(&self) -> usize

Returns the memory-bounded discontinuity/collation worker count.

Source

pub fn validate(&self) -> Result<(), ParamError>

Validates input, graph dimensions, and resource parameters.

Trait Implementations§

Source§

impl Clone for BuildParams

Source§

fn clone(&self) -> BuildParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildParams

Source§

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

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

impl Eq for BuildParams

Source§

impl PartialEq for BuildParams

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BuildParams

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compares self with key and returns true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.