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: GraphInputWhether 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: u16K-mer length. Must be odd and no greater than crate::MAX_K.
minimizer_len: u16Minimizer length used for weak-super-k-mer partitioning.
cutoff: Option<u32>Optional edge-frequency cutoff; input-class defaults apply when absent.
color: boolWhether to construct and emit positional colors.
compress_buckets: boolWhether 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: boolWhether 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: StringPrefix for final graph files.
work_dir: StringDirectory for external-memory intermediates.
vertex_partitions: usizeNumber of blocked discontinuity-graph vertex partitions.
lmtig_buckets: usizeLogical local-unitig bucket count.
gmtig_buckets: usizeLogical maximal-unitig coordinate bucket count.
threads: usizeMaximum 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
impl BuildParams
Sourcepub fn new(input: GraphInput, output_prefix: String) -> Self
pub fn new(input: GraphInput, output_prefix: String) -> Self
Constructs parameters with Cuttlefish-compatible defaults.
Sourcepub fn max_memory_bytes(&self) -> Option<usize>
pub fn max_memory_bytes(&self) -> Option<usize>
Returns the soft memory budget in bytes, if configured.
Sourcepub fn partition_workers(&self, input_files: usize) -> usize
pub fn partition_workers(&self, input_files: usize) -> usize
Returns the partition worker count after input and memory bounds.
Sourcepub fn local_workers(&self) -> usize
pub fn local_workers(&self) -> usize
Returns the memory-bounded local-contraction worker count.
Sourcepub fn post_local_workers(&self) -> usize
pub fn post_local_workers(&self) -> usize
Returns the memory-bounded discontinuity/collation worker count.
Sourcepub fn validate(&self) -> Result<(), ParamError>
pub fn validate(&self) -> Result<(), ParamError>
Validates input, graph dimensions, and resource parameters.
Trait Implementations§
Source§impl Clone for BuildParams
impl Clone for BuildParams
Source§fn clone(&self) -> BuildParams
fn clone(&self) -> BuildParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildParams
impl Debug for BuildParams
impl Eq for BuildParams
Source§impl PartialEq for BuildParams
impl PartialEq for BuildParams
impl StructuralPartialEq for BuildParams
Auto Trait Implementations§
impl Freeze for BuildParams
impl RefUnwindSafe for BuildParams
impl Send for BuildParams
impl Sync for BuildParams
impl Unpin for BuildParams
impl UnsafeUnpin for BuildParams
impl UnwindSafe for BuildParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self with key and returns true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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