GeneSuite
Documentation / Standalone application

Convert between DMU and YAML

Import or export the supported ASCII pedigree linear-model subset, with explicit mappings and validation limits.

The development standalone frontend provides gsuite import-dmu. It translates a supported DMU 5.x linear-model specification into the existing YAML interface. The DMU driver file can reference other files, so keep its data, pedigree and parameter files available during conversion. A DMU executable is not required. Existing HPC installations do not gain the command until their frontend is updated; check gsuite --help for import-dmu.

The same frontend provides gsuite export-dmu for the reverse conversion. Both commands prepare files; neither invokes DMU.

Separate directives and data

The staged commands reuse the same DMU parser and data writer as the combined commands. Convert data once, then translate directives against its manifest:

gsuite convert-data model.yml --to dmu --output dmu-data
gsuite translate model.yml --to dmu --data-manifest dmu-data/manifest.json \
  --output dmu-directives

gsuite convert-data dmu-directives/model.DIR --from dmu --to gsuite \
  --output imported-data
gsuite translate dmu-directives/model.DIR --from dmu --to gsuite \
  --data-manifest imported-data/manifest.json --output imported.yml

DMU directive export writes model.DIR, parameters.txt and a translation receipt in a fresh directory. Data conversion writes tables, coding metadata and manifest.json, without directives. Directive translation reads control files and manifest metadata; it does not rescan the converted tables. Preserve those tables unchanged and validate the resulting model before running it.

The manifest binds input paths, trait/design/relationship definitions and the analysis task. Compatible covariance-value, solver and output edits can reuse the data. Changes to those bindings require another data conversion. Import uses the existing REAL4-compatible float32 interpretation by default; --real-precision float64 is explicit and must match between import stages.

DMU-to-YAML translation without a manifest produces a draft with placeholder data paths and data_ready: false. YAML-to-DMU translation requires the data manifest because factor coding and the missing threshold depend on the data. The existing import-dmu and export-dmu combined commands remain available.

Small deterministic tests compare staged round-trip predictions with independent mixed-model equations, including the original residual. This qualifies the supported conversion path against that reference, not a live DMU executable.

Convert and run

gsuite import-dmu /project/dmu/model.DIR --output /project/converted
gsuite run /project/converted/model.yml

The output directory must be fresh and its parent must exist. Conversion writes:

  • model.yml: the model, natural covariance matrices, execution and outputs.
  • observations.csv and any pedigree_N.csv files: converted input tables.
  • conversion.json: source/output hashes, variable mappings, missing-data counts, original execution controls and translation limits.

Edit execution settings in the YAML as usual. The default is one thread with PARDISO; --threads 8 --sparse-backend pardiso sets the generated requests. The normal gsuite validate, describe and run commands apply afterwards. Conversion checks the generated YAML and inputs; numerical convergence is established only by the subsequent fit. A successful import is not a DMU cross-software qualification.

DMU resolves relative filenames from its working directory. The importer uses the DIR file’s parent by default. If those locations differ, supply:

gsuite import-dmu /project/config/model.DIR \
  --base-directory /project/dmu-run --output /project/converted

Supported initial subset

DMU specification Translation
$ANALYSE task 1 REML with supplied starting covariances, or identity starts when omitted
Tasks 11 / 12 Supplied-covariance solve, using compiled sparse direct / PCG
$DATA ASCII (integers,reals,miss) One combined or two corresponding integer/real files
$VARIABLE Named columns, or generated I1/R1-style names when absent
$MODEL Single/multiple traits, trait-specific fixed classes, overall fixed regressions, independent or correlated random effects across traits
Repeated individual ID in distinct random factors Separate genetic and permanent-environment effects with the same incidence
Zero ABSORB lines Accepted with or without the historical zero lines
$VAR_STR N PED 1 ASCII ... Inbreeding-aware sire/dam pedigree relationship
Default random relationship Independent levels, with trait covariance supplied by $PRIOR
Inline or external $MODEL and $PRIOR Parsed and included in source provenance

Each random factor may occur at most once per trait. The same factor can occur across traits, including with different incidence columns. Covariance entries use factor-local, lower-triangular coordinates in trait order among the traits containing that factor. The residual block follows the last random factor. The importer transfers natural covariances directly. Supplied-covariance solves require every variance diagonal; omitted off-diagonal entries are zero.

DMU integer codes are normalized as integers. Zero classification codes mask the affected trait’s response. Real responses strictly below miss become missing; equality is retained. A missing required fixed covariate on an otherwise observed row is an import error requiring explicit data editing. Original numeric columns and separate masked response columns are retained in the converted CSV.

Data reals default to the documented DMU REAL*4 precision: values are rounded to float32 before writing decimal CSV. For a known double-input setup, --real-precision float64 retains double precision within the documented input range. Covariance parameters are read at double precision. The chosen setting is recorded, and data files are streamed rather than retained as Python tables.

DMU fixed classes use full indicator spaces. The generated YAML represents those spaces through an intercept and treatment contrasts; fixed coefficient references can differ. Compare fitted values and random effects for equivalence. Additional rank deficiencies remain errors in the existing YAML validator; factor merging or model-specific constraints need explicit preparation.

Features requiring further translation

The initial importer rejects nonzero NOCOV, observation weights, nested or random regressions, merged random factors within a trait, binary input, noninbred or phantom-parent pedigree methods, supplied inverse/genomic structures, heterogeneous residual structures, variance restrictions and nonlinear/MCMC directives. In particular, PED 2 is not changed into inbreeding-aware PED 1. An unsupported statistical directive prevents publication of a converted model.

DMU-specific solvers, scaling, preconditioners, stopping and printing controls are recorded separately. They do not select equivalent gsuite algorithms or convergence tolerances. The YAML requests fixed/random estimates, diagnostics and pedigree-based genetic predictions. DMU residual/solution file formats and uncertainty requests are not reproduced by this importer.

The focused tests cover conversion, source preservation, missingness, direct and PCG predictions against independent dense equations, and balanced one-way REML against analytic mean-square estimates. They do not establish agreement with every DMU release or an operational NAV model.

Syntax and input conventions follow the official DMU 5.6 guide. DMU 6 has revised driver keywords and requires a separate import profile.

Export a YAML model to DMU

gsuite export-dmu /project/model.yml --output /project/dmu-run

The output parent must exist and the destination must be fresh. Run DMU from the resulting directory so its relative filenames resolve correctly. Export creates:

  • model.DIR, data.txt and parameters.txt: complete ASCII model, data and natural covariance parameters (or REML starting values).
  • pedigree_NAME.txt: ordinary inbreeding-aware sire/dam pedigrees when used.
  • levels.csv and records.csv: deterministic integer-to-original-ID mappings and data-line-to-record mappings. Original string IDs can contain spaces.
  • conversion.json: source/output hashes, trait and channel ordering, random-factor mappings, input precision and translation qualifications.

The export supports the same statistical intersection as the importer: single/multiple traits, categorical fixed main effects, overall fixed numeric regressions, independent-level and ordinary pedigree random effects, including repeatability and correlated factors with separate incidence columns across traits. Channels are reordered into DMU trait order together with their covariance rows and columns. Pedigree sort ranks put parents before offspring.

Solve models select DMU task 11/method 9; REML models select task 1/method 1. REML requires every covariance block to be estimated without constraints. Partial estimation, covariance tying, FA/serial structures, weights, interactions, random regressions, genetic groups, metafounders, uncertainty requests and genomic/single-step models require further translation and are rejected. The original YAML model and inputs are unchanged.

DMU data are exported at documented REAL4 precision; covariance parameters retain double precision. The report gives the maximum rounding change. The exporter chooses two finite negative REAL4 values below all observed responses and required covariates for the missing threshold and missing sentinel. Input values outside that representable range are rejected. Missing responses stay trait-specific. YAML solver/thread/optimizer controls and post-fit truth evaluation are not translated into equivalent DMU controls. DMU solution and residual files are requested, independently of YAML output-table selection.

Numerical qualification

Focused export tests compare predictions and fitted values with independently assembled small mixed-model equations and compare variance estimates with an analytic balanced one-way REML reference. They also check ID recoding, covariance permutations, source preservation and export/import equivalence.

This first version follows the DMU 5.6 guide and existing benchmark conventions. The new converter has not yet been validated by running the exported files in DMU. Existing historical DMU benchmarks do not qualify this exporter. A live comparison must check DMU convergence, map SOL using levels.csv, compare fitted values on corresponding records, and compare PAROUT with fitted natural covariances. Fixed coefficients can differ under alternative contrasts. REML likelihood constants and optimizer stopping rules also require separate treatment.