How mikolmogorov/flye works
Project Type and Purpose
• Project Type: A command-line, pipeline-style de-novo genome assembler.
• Purpose: Takes raw long sequencing reads (PacBio or ONT), constructs a repeat graph, assembles contigs, polishes them, and recovers short plasmids.
High-Level Components
– Parses user arguments via main.py
– Loads configuration via flye/config/configurator.py
– Invokes sub-modules in sequence
A. “Assembly Stage”
• Python entry: flye/assembly/assemble.py
• Core C++ binary: src/assemble/main_assemble.cpp
• Subcomponents: repeat_graph builder (flye/assembly/repeat_graph.py), scaffolder
B. “Repeat Graph & Traversal”
• Python modules: flye/repeat_graph/*.py
• C++ (optional): src/repeat_graph/main_repeat.cpp and helpers
C. “Contig Extension (Contigger)”
• Python not used—pure C++: src/contigger/main_contigger.cpp
D. “Polishing Stage”
• Python: flye/polishing/polish.py
• C++ binary: src/polishing/main_polisher.cpp
E. “Short Plasmid Recovery”
• Python: flye/short_plasmids/*.py
F. “Trestle Haplotype Resolver”
• Python: flye/trestle/trestle.py
Third-Party Libraries
Externally bundled libs under a “Third-Party Engines” area:
• minimap2 (lib/minimap2) – invoked for read alignment
• samtools / htslib (lib/samtools-1.9) – for BAM/CRAM I/O
• libcuckoo, interval_tree, lemon – data structures and algorithms
Data Flow & Artifacts
• raw_reads.fq
• corrected_reads.fasta
• repeat_graph.gfa
• draft_contigs.fasta
• polished_contigs.fasta
• plasmids.fasta
Important Architectural Patterns
• Orchestration Layer (Python) vs. Compute Layer (C++ executables)
• Modular pipeline: each stage is independently invoked and can be debugged/tested
• Configuration injection: bin_cfg files → py_cfg → assembler parameters
Technologies & Frameworks
• Python 3 (entry points, orchestration, config)
• C++17 (algorithmic cores)
• Makefiles for C++ builds (src/Makefile)
• setup.py / BioConda packaging
Be Detailed
– Show that bin/flye is a thin wrapper that invokes Python’s main entry point.
[User Terminal]
↓
[bin/flye script]
↓
[Python Orchestrator: flye/main.py]
├─> [Configurator: flye/config]
├─> [Assembly Module]
│ • flye/assembly/*.py
│ • calls src/assemble/main_assemble
│ • uses minimap2, lemon, interval_tree
├─> [Repeat Graph Module]
│ • flye/repeat_graph/*.py
│ • calls src/repeat_graph/main_repeat
├─> [Contigger Module]
│ • calls src/contigger/main_contigger
├─> [Polisher Module]
│ • flye/polishing/*.py
│ • calls src/polishing/main_polisher
├─> [Short Plasmids Module]
│ • flye/short_plasmids/*.py
└─> [Trestle Module]
• flye/trestle/*.py