This repository contains the code accompanying the unpublished manuscript: "Look-ahead genomic mating optimizes the trade-off between genetic gain and inbreeding in family-based aquaculture breeding programs."
To reproduce the results reported in the study:
-
Directory setup
Place all scripts in the same directory.
-
Main script execution
Run the R simulation scripts:
Rscript Simulation_LAGM.r Rscript Simulation_LAGM_fixed.r
These scripts generate all outputs used in the paper. The raw genomic data must be downloaded manually from NCBI. The preprocessing pipeline that converts the raw sequence data into the format consumed by the simulation lives in the MNNDR repository.
-
LAGM implementation
The LAGM method is implemented in the
lagmRcppsubdirectory. Before running the simulations, install the package from GitHub:remotes::install_github("kzy599/LAGM", subdir = "lagmRcpp")
The default diversity level remains
"pair"with unchanged behavior. Fordiversity_level = "pop", the default is now joint selection, contribution and pairing optimization (pop_epsilon = 0.005), retaining the original gain/diversity normalization searches. Setpop_two_stage = TRUEto restore the legacy J-only search followed by Stage B (mate_allocation_pct); epsilon zero alone does not restore it. See the package documentation for examples, the bounded reward interpretation and reproducible validation. -
Dependencies
Before running any script, ensure that all required R libraries are available — they are loaded centrally via
utils.r— and that HiBLUP (used for EBV calculation) is installed and configured correctly.
If you encounter any issues or have questions about the code, please contact: kangziyi1998@163.com
