wgsim
Quick Start
- Command:
wgsim [options] <in.ref.fa> <out.read1.fq> <out.read2.fq> - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/wgsim - Full options: see references/help.md
When To Use This Tool
- Simulate paired-end short reads from a reference FASTA.
- Benchmark aligners, variant callers, or mapping/QC pipelines with controlled synthetic data.
- Stress-test workflows under chosen read lengths, insert sizes, mutation rates, and indel settings.
- Produce reproducible test read sets by fixing the random seed.
Common Patterns
# 1) Generate one million paired-end read pairs with a fixed seed
wgsim \
-N 1000000 \
-S 42 \
ref.fa \
sim_R1.fq \
sim_R2.fq
# 2) Simulate 150 bp reads with a 350 bp insert size
wgsim \
-1 150 \
-2 150 \
-d 350 \
-s 30 \
ref.fa \
sim_R1.fq \
sim_R2.fq
# 3) Increase mutation and indel rates for a tougher benchmark
wgsim \
-r 0.005 \
-R 0.20 \
-X 0.50 \
-e 0.01 \
ref.fa \
sim_R1.fq \
sim_R2.fq
Recommended Workflow
- Choose the reference FASTA and decide how many read pairs, what read lengths, and what insert-size distribution best match the target assay.
- Set mutation (
-r), indel (-R,-X), and sequencing error (-e) parameters explicitly instead of relying on remembered defaults. - Fix the random seed with
-Swhenever you need reproducible benchmarks. - Verify the emitted FASTQ pair count and use the simulated reads to evaluate alignment, calling, or QC behavior downstream.
Guardrails
- Input must be a valid FASTA reference file.
wgsimrequires two FASTQ output paths; it is a paired-end simulator.-henables haplotype mode, it is not a help flag.- GNU-style
--help/--versionprint usage with invalid-option noise; usereferences/help.mdor a no-argument invocation to inspect usage instead. - Reads with too many ambiguous bases are discarded according to
-A, so reference composition can affect realized output yield.