Skip to main content

Crate cuttlefish_rs

Crate cuttlefish_rs 

Source
Expand description

External-memory compacted de Bruijn graph construction.

This crate implements the Rust Cuttlefish 3 pipeline. The production path intentionally follows the phase ordering of the C++ implementation:

  1. partition parses sequences and emits weak super-k-mers into atlas buckets.
  2. subgraph constructs and contracts each local de Bruijn subgraph.
  3. discontinuity contracts and expands the external discontinuity graph, then collates local unitigs into maximal unitigs.
  4. color stores deduplicated source sets and positional color runs.

Intermediate formats are private to this implementation. Their compact layouts, ordering, and bucket fanouts are performance-sensitive; changing them requires both topology tests and matched scale benchmarks.

Modules§

bgzf
Parallel decompression of block-structured (BGZF) gzip input.
buckets
External weak-super-k-mer bucket storage.
color
Positional colors and the external color repository.
colored
End-to-end colored graph construction.
discontinuity
External discontinuity-graph contraction, expansion, and unitig collation.
dna
hash
input
FASTA/FASTQ input discovery and zero-copy fragment parsing.
kmer
Packed canonical k-mer primitives.
minimizer
params
Build configuration and phase-local resource planning.
partition
Weak-super-k-mer partitioning and bucket emission.
state
Compact vertex state and colored-coordinate representations.
subgraph
Local subgraph construction and contraction.
uncolored
End-to-end uncolored graph construction.

Enums§

GraphInput
Semantic class of sequence input.
Side
Side of a canonical k-mer vertex.

Constants§

DEFAULT_ATLAS_COUNT
Number of atlases in the C++-compatible default partition layout.
DEFAULT_CUTOFF_READS
Default edge-frequency cutoff for sequencing-read input.
DEFAULT_CUTOFF_REFS
Default edge-frequency cutoff for reference-sequence input.
DEFAULT_GMTIG_BUCKETS
Default number of maximal-unitig coordinate buckets.
DEFAULT_GRAPHS_PER_ATLAS
Number of subgraphs buffered by each atlas.
DEFAULT_K
Default k-mer length used by the CLI.
DEFAULT_LMTIG_BUCKETS
Default number of local-unitig buckets.
DEFAULT_MINIMIZER_LEN
Default minimizer length used to partition k-mers.
DEFAULT_SUBGRAPH_COUNT
Total number of local subgraphs in the default partition layout.
DEFAULT_VERTEX_PARTITIONS
Number of vertex partitions in the external discontinuity graph.
MAX_K
Largest k-mer length supported by the packed two-word representation.
MAX_MINIMIZER_LEN
Largest supported minimizer length.

Functions§

configure_global_parallelism
Configures the process-wide Rayon pool for code paths that use it.
default_threads
Returns the default worker count, matching Cuttlefish’s quarter-machine policy.
default_work_dir
Returns the platform temporary directory used for intermediate files.