Workflow¶
BSReadSim generates sequencing reads through a workflow that mirrors the key biological and technical stages of an experiment. It first prepares a diploid genome, then applies assay-specific fragment sampling. Bisulfite modes additionally construct site-specific methylation probabilities, draw methylation states, and apply bisulfite conversion. Finally, it adds base qualities and sequencing errors before exporting reads as FASTQ or origin-annotated BAM.
From reference genome to sequencing reads¶
Five stages of read simulation¶
| Stage | Description |
|---|---|
| Genome | Resolve two haplotypes from the reference genome, optionally incorporating VCF variants or de novo mutations. |
| Methylome | For bisulfite modes, prepare methylation probabilities using beta distributions and any provided measured or allele-specific profiles. |
| Fragmentation | Generate physical DNA fragments across whole-genome, restriction-fragment, or targeted domains using uniform or profile-based sampling. |
| Sequencing | Sequence fragments according to the selected assay protocol, then assign base qualities and introduce sequencing errors. |
| Output | Output reads as FASTQ or annotated BAM, with a provenance manifest. |
The order matters because variants can change cytosine contexts, methylatable sites, RRBS cut sites, and fragment opportunities. Each upstream layer is therefore resolved before the next one.
Six supported sequencing assays¶
BSReadSim supports three bisulfite assays (WGBS, RRBS, and TBS) and three non-bisulfite assays (WGS, WES, and TS), spanning whole-genome and region-enrichment protocols. The figure below summarizes the experimental strategies used in the three bisulfite assays.
See Tutorials for runnable examples, Customize for model options, and Other assays for non-bisulfite workflows.