How ai-for-genome-interpretation-lab/pyreml works
pyreml fits linear mixed models by building fixed- and random-effect designs, estimating covariance parameters with REML, and exposing fitted estimates and predictions. The main workflow runs through MixedModel, which coordinates Gaussian components, structured variance solving, and optimization. Separate genetic helpers prepare pedigree data and relationship matrices that users can supply as covariance inputs. The README also documents multivariate, random-regression, heteroscedastic, factor-analytic, spatial, and unobserved-level prediction capabilities. These are represented at their documented runtime entry points; unsampled internals and uncertain call links are omitted.
Main entry points: MixedModel.py MixedModel · GaussianComponents.py Random and residual · Optimizer.py OptiMix · Variance.py Variance structure
Components 15
Model specification
- MixedModel
pyreml/MixedModel.py - Random and residual
pyreml/GaussianComponents.py - Model designs
pyreml/MixedModel.py
Covariance and solving
- Variance structure
pyreml/Variance.py - Likelihood solves
pyreml/Variance.py
Estimation and results
- OptiMix
pyreml/Optimizer.py - Fit statistics
pyreml/MixedModel.py - Effect prediction
pyreml/GaussianComponents.py
Genetic utilities
- Pedigree preparation
pyreml/kinships.py - Relationship matrices
pyreml/kinships.py - Larix dataset
pyreml/larix.py
Other components
- Analyst
- Observation data
- Patsy formulas
- PyTorch
Connections 24
- Analyst → MixedModel: specifies model
- Observation data → MixedModel: provides data
- MixedModel → Model designs: builds designs
- Model designs → Patsy formulas: builds formula matrices
- MixedModel → Random and residual: uses effects
- Random and residual → Patsy formulas: builds formula matrices
- MixedModel → Variance structure: builds decomposition
- Random and residual → Variance structure: supplies covariance blocks
- Variance structure → Likelihood solves: provides structure
- MixedModel → OptiMix: runs fitting
- OptiMix → MixedModel: evaluates loss
- MixedModel → Likelihood solves: evaluates likelihood
- Likelihood solves → PyTorch: uses tensor operations
- OptiMix → PyTorch: uses optimizers
- MixedModel → Fit statistics: computes estimates
- MixedModel → Random and residual: dispatches effect results
- Analyst → Pedigree preparation: prepares pedigree
- Pedigree preparation → Relationship matrices: computes matrices
- Analyst → Relationship matrices: requests genomic matrix
- Relationship matrices → Random and residual: supplies covariance
- Analyst → Larix dataset: loads example data
- Random and residual → Effect prediction: predicts new levels
- Fit statistics → Analyst: returns results
- Effect prediction → Analyst: returns predictions