Simulation (simulate)

June 6, 2026 ยท View on GitHub

Use graphld simulate to generate GWAS summary statistics from the GraphLD simulation model.

Basic Usage

uv run graphld simulate \
    output.sumstats \
    --num-samples 100000 \
    --heritability 0.5 \
    --component-variance 1,10 \
    --component-weight 0.01,0.001

Unlike the other graphld subcommands, simulate takes an output summary-statistics path as its positional argument rather than an input sumstats file.

Core Options

OptionDefaultDescription
-n, --num-samplesRequiredNumber of samples to simulate
-H, --heritability0.2Total trait heritability
--component-variance1.0Comma-separated mixture variances
--component-weight1.0Comma-separated mixture weights
--alpha-param-0.5Frequency-dependence parameter
--random-seedNoneRandom seed

Annotation-Dependent Simulation

The CLI currently exposes annotation loading options, but custom annotation link functions are only available through the Python API. Use graphld.run_simulate when you need annotation-dependent effect-size scaling.

OptionDescription
-a, --annot-dirAnnotation directory
--annotation-columnsAccepted by the parser, but custom annotation-dependent scaling currently requires the Python API
--annotation-dependent-polygenicityReserved for future support; currently raises NotImplementedError

The shared options from the CLI overview also apply.