BreedBase Example

Khaled Al-Shamaa



Linking data management systems to analytics is an important step in breeding digitalization. Breeders can use this R package to Query the Breeding Management System database (using BrAPI calls) and help them to retrieve their experiments data directly into R statistical analyzing environment.

Well, because Breedbase supports the BrAPI standard, most of the QBMS functionalities work smoothly with minor changes. For example, you need to give special attention to the set_qbms_config parameters (check the example below). Currently, some functions are not supported when working with BreedBase, like get_program_studies, get_germplasm_data, and list_trials filtered by year!


Breedbase is a comprehensive breeding management and analysis software. It can be used to design field layouts, collect phenotypic information using tablets, support the collection of genotyping samples in a field, store large amounts of high density genotypic information, and provide Genomic Selection related analyses and predictions.


The Breeding API (BrAPI) project is an effort to enable interoperability among plant breeding databases. BrAPI is a standardized RESTful web service API specification for communicating plant breeding data. This community driven standard is free to be used by anyone interested in plant breeding data management.



You can find a set of Breedbase based servers available for several crops and accessible with no authentication required are listed at the BrAPI website on the following page under the group of Boyce Thompson Institute (BTI), discovery and innovation in the life sciences:


# load the QBMS library

# Cassava BreedBase server
                time_out = 300, no_auth = TRUE, engine = "breedbase")

# list supported crops in the current bms server

# select a crop by name

# list all breeding programs in the selected crop

# select a breeding program by name

# list all studies/trials in the selected program

# select a specific study/trial by name

# get observation variable ontology in the selected study/trial

# list all environments/locations information in the selected study/trial

# select a specific environment/location by name

# another option, select a specific study by location name (first match)
# studies <- list_studies()
# set_study(studies[studies$locationName == "Abuja", "studyName"][1])

# retrieve general information, data, and germplasm list 
# of the selected environment/location
info <- get_study_info()
data <- get_study_data()
germplasm <- get_germplasm_list()

# retrieve multi-environment trial data of the selected study/trial
MET <- get_trial_data()

Troubleshooting the installation

  1. If the installation of QBMS generates errors saying that some of the existing packages cannot be removed, you can try to quit any R session, and try to start R in administrator (Windows) or SUDO mode (Linux/Ubuntu) then try installing again.

  2. If you get an error related to packages built under a current version of R, and updating your packages doesn’t help, you can consider overriding the error with the following code. Note: This might help you install QBMS but may result in other problems. If possible, it’s best to resolve the errors rather than ignoring them.


remotes::install_github("icarda-git/QBMS", upgrade = "always")