Minimal Mental Model

Environment-style API

PolyGenius groups functionality into analysis environments:

  • generate
  • compute
  • evaluate
  • associate
  • visualize

Each environment contains task-specific functions, so discovery follows analysis intent instead of internal implementation details.

Core objects at a glance

  • PolyGeniusModel: one PRS model (variants, weights, provenance metadata)
  • GenotypeInfo: one genotype resource descriptor (where the data lives and how to read it)
  • PolyGeniusData: one cohort container coupling genotypes, models, and derived results

Data flow in one picture

generate creates models, compute applies them to cohort genotypes, evaluate compares model behavior, associate tests hypotheses, and visualize summarizes outputs for interpretation/reporting.

What Chapter 3 will build

In one compact tutorial you will:

  1. Load a local GRCh37 GWAS table.
  2. Generate one model with clumping+thresholding (pval = 5e-8).
  3. Build a PolyGeniusData object with matching GRCh37 genotype data.
  4. Compute scores and population structure.
  5. Associate scores with a simulated phenotype.
  6. Visualize score distribution, PCA embedding (PC1/PC2), and association summary.