Complete E1-v2 workflow: stage A ladder + control + gate, stage B variants + baseline
- Snakefile: modules -> plain include: (single namespace; fixed cross-module helper resolution), rule all with stage-A/stage-B target sets driven by flat --config stage_b_arch/budget/stride switches. - config/main.yaml: v2 run matrix (ladder 12-grid, control 1M cnn s4), store excludes (DCS spike-in, in-corpus escherichia trap reads), barcoding kit (SQK-RBK114-96 classified during dorado basecalls), removes v1 quota. - baseline_pipeline: CUDA branch streams per-chunk dorado emit-sam through minimap2 (-N 10, tags preserved) and samtools view into per-batch BAMs, merged with samtools cat; ROCm/slorado fallback kept. - ml_pipeline: label parquets -> signal stores (main / windows-ablation w4 / trap store) -> 12 ladder trainings + shuffled control -> custom_models test with the trap store (TP2) -> custom_models gate over the g11 runs; stage B adds windows ablation, holdout/core_clade(/bacillus_group) variants and the dorado-fast alignment baseline on the winner's identical test split. - scripts: bam2annotation now emits source_run (barcoded -> barcodeNN from the dorado tags, dataset fallback); new label_qc.py (TP1 capture counts) and baseline_eval.py. - custom_models submodule: bump to test_split.parquet export commit. - README: two-stage run instructions (dev dry-run vs runner GPU).
This commit is contained in:
+68
-20
@@ -1,28 +1,76 @@
|
||||
# Hardware: 'cuda' (host dorado) is the runner-system path. This box has no
|
||||
# usable GPU, so development/dry-runs stay on the torch-cpu env; the runner
|
||||
# executes the GPU trainings with:
|
||||
# snakemake ... --config torch_env=../envs/torch_cuda.yaml
|
||||
gpu_stack: "cuda" # 'cuda' or 'rocm'
|
||||
torch_env: "../envs/torch_cpu.yaml" # swap to ../envs/torch_cuda.yaml on the runner
|
||||
|
||||
tmp_dir: "/tmp"
|
||||
|
||||
seed : 0
|
||||
seed: 0
|
||||
|
||||
#gpu
|
||||
gpu_stack : 'cuda' #'cuda' or 'rocm'
|
||||
# basecalling / labelling (host dorado >= 2.0; conda env only adds minimap2/samtools)
|
||||
dorado_model_dir: "../dorado_models"
|
||||
hac_model_name: "dna_r10.4.1_e8.2_400bps_hac@v6.0.0" # probe labels / stores
|
||||
hac_benchmarks_file: "../reference/dorado_batchsize_files/rtx4060ti_16gb_hac6.benchmarks" # empty to disable
|
||||
hac_min_q: 9 # "" or 0 to disable
|
||||
fast_model_name: "dna_r10.4.1_e8.2_400bps_fast@v5.2.0" # v2 alignment baseline
|
||||
fast_benchmarks_file: "" # add path if available
|
||||
fast_min_q: 8 # "" or 0 to disable
|
||||
minimap_extra: "-N 10" # secondary alignments kept for label-QC visibility
|
||||
|
||||
# dorado
|
||||
dorado_model_dir : "../dorado_models"
|
||||
hac_model_name: "dna_r10.4.1_e8.2_400bps_hac@v6.0.0"
|
||||
hac_benchmarks_file: "../reference/dorado_batchsize_files/rtx4060ti_16gb_hac6.benchmarks" # add path if available
|
||||
hac_min_q: 9 # empty string or 0 to disable
|
||||
fast_model_name: "dna_r10.4.1_e8.2_400bps_fast@v5.2.0"
|
||||
fast_benchmarks_file: "" #add path if available
|
||||
fast_min_q: 8 # empty string or 0 to disable
|
||||
|
||||
|
||||
# squiqqle dataset
|
||||
# dataset wiring
|
||||
pod5_dataset: "nomiss_96BC_P2I_SUP_2026"
|
||||
pod5_dataset_size : 293
|
||||
pod5_stride : 12 # Use 1 in x pod5 files from the ONT NO-MISS dataset to reduce dataset size / compute requirements
|
||||
pod5_dataset_size: 293 # pod5 chunks in the ONT open-data set
|
||||
pod5_stride: 12 # pod5-level downsampling (1-in-x chunks)
|
||||
trap_dataset_size: 1717
|
||||
trap_pod5_stride: 72
|
||||
barcoding_kit:
|
||||
nomiss: "SQK-RBK114-96" # classification during basecaller -> per-read barcode tags
|
||||
trap: "" # public single-sample E. coli run, no barcoding
|
||||
|
||||
# custom ML
|
||||
torch_env : '../envs/torch_cpu.yaml'
|
||||
budget_tolerance : 0.1
|
||||
reads_per_genus : 5000
|
||||
# signal-store building (custom_models ExtractConfig)
|
||||
store_excludes:
|
||||
nomiss:
|
||||
refs: ["dcs"] # ONT DCS spike-in contig (would rack up no-class reads)
|
||||
genera: ["escherichia"] # in-corpus trap-genus reads (E. coli) -> TP1 positives only, never training data
|
||||
trap:
|
||||
refs: ["dcs"]
|
||||
genera: []
|
||||
max_windows_per_read: 4 # windows-ablation (A') store; headline store keeps 1
|
||||
|
||||
# probe / compute
|
||||
budget_tolerance: 0.1
|
||||
bootstrap_n: 10000
|
||||
gate_chance_tol: 1.5
|
||||
min_test_windows: 300 # v2 near-clade safety rule
|
||||
|
||||
# E1 v2 run matrix (E1_v2_eleven_taxa_redesign.md §4.1)
|
||||
ladder:
|
||||
arches: ["cnn", "linatt"]
|
||||
budgets: [1000000, 5000000, 20000000]
|
||||
strides: [4, 8]
|
||||
control: # v2: shuffled-label control = 1M cnn, s4, g11
|
||||
arch: "cnn"
|
||||
budget: 1000000
|
||||
stride: 4
|
||||
|
||||
# Stage B: leave empty until the Stage-A winner is picked from the ladder
|
||||
# reports, then rerun the workflow with e.g.
|
||||
# snakemake ... --config stage_b_arch=cnn stage_b_budget=5000000 stage_b_stride=4 \
|
||||
# windows_ablation=True holdout_runs=True core_clade=True
|
||||
stage_b_arch: ""
|
||||
stage_b_budget: ""
|
||||
stage_b_stride: ""
|
||||
windows_ablation: false
|
||||
windows_ablation_secondary_budget: "" # optional extra ablation row
|
||||
holdout_runs: false # barcode-level holdout robustness variant
|
||||
core_clade: false # 8-genera Pseudomonadota-only training (family-block diagnosis)
|
||||
bacillus_group: false # optional 3-genera Bacillota-only training
|
||||
|
||||
# genus lists as they appear in labels (lowercase, from the panel FASTA headers);
|
||||
# the 6-way Enterobacteriaceae block inside the core clade is the monopoliser probe
|
||||
core_clade_genera: [cronobacter, citrobacter, enterobacter, klebsiella, pseudomonas, salmonella, shigella, vibrio]
|
||||
bacillus_group_genera: [bacillus, listeria, staphylococcus]
|
||||
# trap genera present as references in the panel (TP1); Paenibacillus/Aeromonas deferred
|
||||
trap_genera: ["escherichia"]
|
||||
|
||||
Reference in New Issue
Block a user