All raw binary files are little-endian, headerless, and contiguous. Integer indices and element offsets are zero based.
## Shared sample order
The following matrices must use exactly the same sample order:
1. GRM;
2. common design matrix;
3. phenotype matrix;
4. extra-covariate matrix.
When supplied, `--grm-id` is checked for the expected number of nonempty rows. Domain adapters remain responsible for verifying the actual identifiers and order.
## GRM
`--grm-bin` uses the GCTA lower-triangle packed `float32` layout:
```text
G[0,0],
G[1,0], G[1,1],
G[2,0], G[2,1], G[2,2], ...
```
For `n` samples, the exact file size is `4 * n * (n + 1) / 2` bytes.
## Common design
`--base-x` is a row-major `float64` matrix with shape
```text
n_samples × n_base_covariates
```
It must already contain every common fixed effect, including an intercept if required. SpectraREML does not add or standardize columns.
## Phenotypes
`--phenotypes` is a row-major `float64` matrix with shape
```text
n_phenotype_rows × n_samples
```
Each task selects one row through `phenotype_row`.
## Extra fixed-effect covariates
`--extra-covariates` is an optional row-major `float32` matrix with shape
```text
n_extra_covariate_rows × n_samples
```
Only rows referenced by at least one task are read and rotated. The file may be omitted when the row count and all task-specific counts are zero.
## Task table
`--tasks` is a UTF-8 tab-separated file with exactly four columns: