Skip to content

Count-aware simulator and simulation smoke test #49

@m-murphy

Description

@m-murphy

Parent

#45

What to build

Add count-aware simulation so users and tests can generate per-allele read count vectors from true within-host strain allele allocations, dropout probability, and noise rate—mirroring the count Poisson observation model in #48.

Expose R functions (extend or parallel existing simulate_observed_allele / simulate_observed_genotype) that return integer count vectors per locus rather than binary presence/absence. Parameters should align with count-model semantics (dropout on present alleles, Poisson noise on absent alleles, signal proportional to depth and support size).

Add a simulation smoke test: generate count data from known COI and error parameters → load with count aggregation → run short MCMC with observation_model = "counts" → completes without error. Qualitative recovery check optional (no strict stochastic tolerances).

Acceptance criteria

  • R simulator generates per-allele read counts consistent with count observation model emissions
  • Simulator documented in roxygen; exported or usable from test harness
  • R testthat: simulated counts have expected shape and non-negative integers
  • End-to-end smoke test: simulate → load (count mode) → run_mcmc(observation_model = "counts") passes with minimal burnin/samples
  • Test skipped on CRAN if needed for runtime (consistent with test-mcmc.R)

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions