Getting Started#
Basic Installation#
Python installation requirements#
Python 3.8.0+
is an installation requirement. To download Python, see the Python website.
Python package dependencies#
In addition to a base installation of Python, PyBrOpS relies on several dependencies. They are:
numpy-1.22.2+
(for matrix storage and algebra)pandas-1.4.1+
(for data frames)scipy-1.8.0+
(for miscellaneous numerical routines)matplotlib-3.5.1+
(for graphics)pymoo-0.6.0+
(for genetic algorithms)cyvcf2-0.30.14+
(for reading VCFs)h5py-3.6.0+
(for HDF5 file support)
The following additional packages are also required for the developmental installation of PyBrOpS:
pytest-7.0.1+
(for unit testing)pytest-datadir-1.3.1+
(for unit testing)setuptools
(for package building)wheel
(for package building)
Release version installation#
PyBrOpS is available on pip
and can be installed using the pip
command.
$ pip install pybrops
Basic Programming Knowledge Prerequisites#
PyBrOpS makes several programming knowledge assumptions of the user. Below is a table of these knowledge prerequisites and a link to a refresher course if you need to understand the basics.
Knowledge Prerequisite |
Importance |
Refresher Course |
---|---|---|
The Python Programming Language |
Essential |
|
NumPy arrays |
Essential |
|
Pandas DataFrames |
Essential |
|
PyMOO genetic algorithms |
Optional |
See PyMOO.org to learn how to create custom algorithms in PyMOO’s framework. |
Using PyBrOpS#
If you desire to start making your own breeding simulations immediately and want to see complete, working simulation scripts, see the examples.
If you desire to gain a more in-depth knowledge about how PyBrOpS works before embarking on creating your own simulation scripts, see the fundamentals to understand PyBrOpS’s design philosophy, followed by the standard usage section.
Advanced Installation#
The following sections detail advanced installation instructions for developing on Linux systems or working with the developmental version of PyBrOpS.
Linux installation requirements#
On Linux, you will need to install Python developmental headers in addition to Python 3.8.0+
. Even though PyBrOpS is written in pure Python, some of its dependencies require compilation.
Below are the commands for installing Python developmental headers:
Linux Distro |
Command |
---|---|
Fedora |
|
Ubuntu |
|
Developmental version installation#
To install the developmental version, first clone
the repository:
$ git clone https://github.com/rzshrote/pybrops.git
It is a best practice to create a virtual environment where PyBrOpS dependencies can be installed. To do this, you can use the Makefile
:
$ make install-devel
Alternatively, this may be done manually using the following commands:
$ python3 -m venv env
$ . env/bin/activate
$ python3 -m pip install --editable .
Next, you must activate the virtual environment using either the .
command (for sh
) or the source
command (for bash
):
$ . env/bin/activate
or
$ source env/bin/activate
Now that the virtual environment is activated, you can access pybrops
through the python3
command-line interface prompt and through script execution.