RobustOCS
Tools for solving robust optimal contribution selection problems in Python. All code and examples in RobustOCS are fully and freely available for all use under the MIT License.
Installation
The latest release can be installed from the PyPI repository using
pip install robustocs
Alternatively, it use the latest (potentially unstable) version from GitHub, use
git clone https://github.com/Foggalong/RobustOCS.git
pip install RobustOCS/
Either way, the package depends on Python 3.10+, using NumPy for linear algebra and SciPy for sparse matrix objects. As a solver it can either use Gurobi (commercial) via gurobipy or HiGHS (free software) via highspy.
Quick-start
Suppose we have a breeding cohort whose relationships are modelled some matrix $\Sigma$, and whose expected breeding values have mean $\bar{\boldsymbol\mu}$ and variance $\Omega$. If these are saved in files, finding the robust optimal contribution selection is as simple as opening Python and running
import robustocs as rocs
selection, objective, merit, coancestry = rocs.solveROCS(
sigma_filename="cohort-relationships.txt",
mu_filename="breeding-means.txt",
omega_filename="breeding-variances.txt",
sex_filename="cohort-sexes.txt",
method='robust', lam=0.5, kappa=1
)
where selection will be an array of optimal selections, objective is a score of the selection, merit the expected genetic merit, and coancestry the group co-ancestry.
Documentation
The GitHub wiki includes documentation which explains the usage and parameters in more detail, full rundowns of the key functions (including the quick-start's solveROCS), all alongside some worked examples using the more granular solver functions (the data for which is in examples/). This includes a realistic simulated example from Gregor Gorjanc and Ivan Pocrnić.
Metadata
Release files for robustocs 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robustocs-0.2.1.tar.gz | 10.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robustocs-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 MB
Release files / robustocs-0.2.1.tar.gz
| Download URL | robustocs-0.2.1.tar.gz |
|---|---|
| Size | 10.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
501bd62418c1d581df4bfb7f125ad5772fb9db0cef2d10b1a4b86b6bda8d3c11
|
|
BLAKE2b-256 checksum How to use checksums |
62f759530e1c6866a446869760177e82e04c7186108fd4fafcee639568ef46dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / robustocs-0.2.1-py3-none-any.whl
| Download URL | robustocs-0.2.1-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
203c3e4d80e051f1ada7bc651496c08f1ba7ae743a6ed49eb7a2e14171d0f93f
|
|
BLAKE2b-256 checksum How to use checksums |
4aa25b5db13466215b0141267748573aa59f5736a7398a5f61d70425b6dab5f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|