Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeCoBase

"DeCoBase: Real-Time Data Readout in DNA Storage System via Decoding-Coupled Basecalling" was submitted to Bioinformatics (August 2026).

Requirements

  • Linux
  • A C++17 compiler (GCC 9 or later; tested with GCC 13)

Dataset

The CIF dataset is available at the DeCoBase Dataset v1.0 release. It contains cycle-wise intensity data corresponding to the R1 read (151 cycles) from an Illumina MiSeq v3 paired-end sequencing run.

Download the dataset and place it under an L001 directory, so that the cycle folders sit directly beneath it:

L001/
├── C1.1/
│   ├── s_1_1101.cif
│   ├── s_1_1102.cif
│   └── ...
├── C2.1/
└── ...

The location of this directory is given by INTENSITY_ROOT in params.cfg (default: ../L001).

Build

g++ -std=c++17 -O2 -I. -o decobase *.cpp -lm

Run

./decobase -nc=151 -rsn=435000 -seed=1004
Option Meaning Default
-nc=<int> Number of sequencing cycles to process 151
-rsn=<int> Number of reads to sample 440000
-seed=<int> Random seed used for read sampling 1004
-tile-config=<path> Path to the tile list ../input/tiles.cfg
-params=<path> Path to the parameter file ../input/params.cfg
-flags=<path> Path to the feature-flag file ../input/flags.cfg

Configuration files

params.cfg

Numeric parameters and input/output paths.

Group Keys
Input / output paths INTENSITY_ROOT, PCHK_PATH, MESSAGE_PATH, INDEX_PATH, INDEX_PUNC_PATH, OUTPUT_PREFIX, SAVESUFFIX
HMM HMM_TRANS_PROB, HMM_GAP_OPEN, HMM_GAP_EXTEND, ALIGN_MAX_LEN
Decoding-aided dephasing correction PHASE1_WINDOW, PHASE1_THRESHOLD, PHASE2_WINDOW, PHASE2_RATIO1, PHASE2_RATIO2, EARLY_MARGIN, EXTENT_NUM, DECISION_CYCLE
Clustering TARGET_CLUSTER_SIZE, SMALL_CLUSTER_SIZE, EDIT_DIST_THRESHOLD, EDIT_PERIOD
Pruning HIGH_RELIABILITY_THRESHOLD, LOW_RELIABILITY_THRESHOLD, PRUNING_PERIOD
Chastity filtering CHASTITY_PURE_BASES

flags.cfg

Feature switches. Accepted values are 1 / true / on and 0 / false / off.

Key Default Effect
USE_MATRIX_CORRECTION on Apply the crosstalk matrix correction
USE_DEPHASING_CORRECTION on Apply the phasing / prephasing correction
USE_INDEL_CORRECTION on Enable Decoding-aided dephasing correction
USE_EDIT_CLUSTERING on Enable edit/Hammgng-distance clustering
USE_RELIABILITY_PRUNING on Drop low-reliability clusters periodically
USE_FILTERED_LLR on Use adpative LLR filtering when decoding
USE_REDECODE off Retry decoding for failed streams
USE_CHASTITY_FILTER off Apply the chastity filter

tiles.cfg

One line per tile:

lane,tile,matrix_path,phasing_path

matrix_path and phasing_path are optional. Omit them, leave them blank, or write auto to have DeCoBase estimate the crosstalk matrix and the phasing / prephasing rates from the data itself. All three forms below are equivalent:

1,1101,auto,auto
1,1101,,
1,1101

The two paths are independent, so you may supply one and estimate the other:

1,1101,estimated/s_1_1_1101_matrix.txt,auto

Pre-estimated crosstalk and phasing values

The estimated/ directory contains crosstalk matrices and phasing rates that DeCoBase estimated from the Illumina MiSeq v3 run described above, for all 38 tiles (11011119, 21012119).

estimated/
├── s_1_1_1101_matrix.txt
├── s_1_1_1101_phasing.txt
├── s_1_1_1102_matrix.txt
└── ...

To reuse them, point tiles.cfg at the files:

1,1101,estimated/s_1_1_1101_matrix.txt,estimated/s_1_1_1101_phasing.txt
1,1102,estimated/s_1_1_1102_matrix.txt,estimated/s_1_1_1102_phasing.txt

At startup each tile reports where its values came from:

Tile 1_1101: 712000 clusters (offset=0, mat=file, p=est)

mat=file / p=file means the values were loaded from disk; est means they were estimated in this run.

File formats, should you wish to supply your own:

  • Matrix — the 4x4 crosstalk matrix in row-major order, one value per line (16 lines). Lines starting with # are ignored. Note that only the first number on each line is read, so all four values of a row cannot share a line.
  • Phasing — a single line holding the phasing rate and the prephasing rate, separated by whitespace. Comments are not supported in this file.

Output

The run writes a CSV file named

<OUTPUT_PREFIX>throughput_<SAVESUFFIX>_RSN<rsn>_seed<seed>.csv

with one row per cycle:

Column Meaning
cycle Cycle index (1-based)
elapsed_sec Wall-clock time elapsed since the start of the run
zero_ber_stream_count Number of data frames recovered without bit errors up to this cycle
throughput_stream_per_sec Recovered frames per second
bit_err_cnt1, bit_err_cnt2 Residual bit-error counts for the two decoded messages

zero_ber_stream_count is the main result: it shows how many data frames had been fully recovered by each cycle, which is what makes the real-time readout behaviour visible.

The same rows are also echoed to stderr while the run proceeds.

Contact

E-mail: wldus8677@gmail.com
Homepage: CICL

About

Real-Time Data Readout in DNA Storage System via Decoding-Coupled Basecalling

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages