QBMS
This R package assists breeders in linking data systems with their analytic pipelines, a crucial step in digitizing breeding processes.
https://github.com/icarda/qbms
Category: Consumption
Sub Category: Agriculture and Nutrition
Last synced: about 17 hours ago
JSON representation
Repository metadata
R package to query Breeding Management System (BMS) database
- Host: GitHub
- URL: https://github.com/icarda/qbms
- Owner: icarda
- License: gpl-3.0
- Created: 2020-08-11T13:49:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-08-04T13:49:19.000Z (6 months ago)
- Last Synced: 2026-01-15T15:38:13.260Z (20 days ago)
- Language: R
- Homepage: https://icarda.github.io/QBMS/
- Size: 6.99 MB
- Stars: 10
- Watchers: 1
- Forks: 5
- Open Issues: 4
- Releases: 3
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
README.md
QBMS
Overview
This R package assists breeders in linking data systems with their analytic pipelines, a crucial step in digitizing breeding processes. It supports querying and retrieving phenotypic and genotypic data from systems like EBS, BMS, BreedBase, GIGWA, and Germinate (using BrAPI calls). Extra helper functions support environmental data sources, including TerraClimate and FAO HWSDv2 soil database.
Author and Maintainer: Khaled Al-Shamaa <k.el-shamaa (at) cgiar (dot) org>
Contributor: Mariano Omar CRIMI <m.crimi (at) cgiar (dot) org>
Contributor: Zakaria Kehel <z.kehel (at) cgiar (dot) org>
Contributor: Johan Aparicio <j.aparicio (at) cgiar (dot) org>
Copyright Holder: International Center for Agricultural Research in the Dry Areas (ICARDA)
BrAPI
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.
Supported Data Sources
- BMS:
vignette("bms_example"). - EBS:
vignette("ebs_example"). - Breedbase:
vignette("breedbase_example"). - GIGWA:
vignette("gigwa_example"). - Germinate:
vignette("germinate_example").
Extra sub-systems supported:
- TerraClimate:
vignette("terraclimate_example").- HWSD v2.0:
vignette("hwsd2_example").
Installation
install.packages("QBMS")
Development version
To get a bug fix or to use a feature from the development version, you can install the development version of QBMS from GitHub.
if (!require("remotes")) install.packages("remotes")
remotes::install_github("icarda/QBMS")
Getting Started
Once you successfully install the QBMS R package, you can load it as a library and set up your remote server configuration (e.g., EBS, BMS, BreedBase, or GIGWA) by simply copying and pasting the login page URL from your web browser.
# load the QBMS library
library(QBMS)
# config your BMS connection (by providing your BMS login page URL)
set_qbms_config("https://bms.icarda.org/ibpworkbench/controller/auth/login")
To start querying and retrieving data from your remote server, you have to login using the same credentials for that server’s GUI/web interface. Please note that you can call the login function(s) with no parameters (interactive mode), where you will get a popup window to insert your username and password (highly advised as one of the best security practices). Although, for automatic analysis pipeline(s) or server services, you can still provide the required username and password as login function parameters (i.e., batch mode).
# login using your account (interactive mode)
login_bms()
# or pass your username and password as parameters (batch mode)
login_bms("username", "password")
You should be careful when sharing your batch mode code to avoid leaking your credential in public or not authorized spaces.
Supporting Multiple Provider Connectors
You can switch between an ongoing QBMS connection and another server/database connection by using get_qbms_connection() and set_qbms_connection() functions, as shown in the following example (i.e., if there is a need to switch forth and back during the same session):
# configure QBMS to connect the phenotypics server
set_qbms_config("https://bms.icarda.org/ibpworkbench/controller/auth/login")
# login and retrieve data from the phenotypic server
# save current connection (phenotypic server)
con1 <- get_qbms_connection()
# configure QBMS to connect the genotypic server
set_qbms_config("https://gigwa.southgreen.fr/gigwa/", engine = "gigwa", no_auth = TRUE)
# retrieve data from the genotypic server
# save current connection (before switch)
con2 <- get_qbms_connection()
# load the saved phenotypic server connection
set_qbms_connection(con1)
# continue retrieving data from the phenotypic server
A detailed example is available in the documentation of the
get_qbms_connection()andset_qbms_connection()functions.
Also, you can find a more elegant solution developed by Francisco Agosto-Perez from the Breeding Informatics team within the Innovation Lab For Crop Improvement at Cornell University available here:
https://github.com/agostof/BrAPI-Provider/
Error and Debugging
If you get unexpected results or weird behavior and want to dig deep and investigate what went wrong, you can get a copy of the internal QBMS variables by calling the debug_qbms() function.
dump <- debug_qbms()
dump$config
# $crop
# [1] "maize"
#
# $server
# [1] "https://bms.icarda.org"
#
# $path
# [1] "bmsapi"
#
# $page_size
# [1] 1000
#
# $time_out
# [1] 120
#
# $base_url
# [1] "https://bms.icarda.org/bmsapi"
#
# $engine
# [1] "bms"
names(dump$state)
# [1] "token" "program_db_id" "trial_db_id" "study_db_id" "user"
# [6] "expires_in" "errors" ...
dump$state$token
# [1] "username:1666907125029:a312bb036cc8d9cc302bee1f0981e5ab"
Troubleshooting the Installation
-
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.
-
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.
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = TRUE)
remotes::install_github("icarda/QBMS", upgrade = "always")
- If you get an error related to list or set runs in GIGWA (i.e.,
gigwa_list_runs()andgigwa_set_run()functions), you can try to ensure that your R session system locale is using UTF-8 character set encoding. You may consider overwriting your system locale with the following command to resolve this issue:
Sys.setlocale("LC_ALL", "English_United States.utf8")
- If the
get_terraclimate()function takes a long time to run and the progress bar stays at 0%, it might be due to using an outdated version of the R language. Make sure you're using the latest version. For more details, please refer to this GitHub issue.
References
-
Peter Selby et al., BrAPI-an application programming interface for plant breeding applications, Bioinformatics, Volume 35, Issue 20, 15 October 2019, Pages 4147–4155, https://doi.org/10.1093/bioinformatics/btz190
-
The Breeding API (2022, December 15). BrAPI Compatible Software list. Retrieved from https://brapi.org/compatibleSoftware
-
Excellence in Breeding Toolbox (2023, February 1). Query Breeding Management Systems (QBMS) R package. Retrieved from https://excellenceinbreeding.org/toolbox/tools/query-breeding-management-systems-qbms-r-package
-
CGSpace (2023, February 23). Query Breeding Management Systems (QBMS) R package. Retrieved from https://cgspace.cgiar.org/handle/10568/128828
-
MELSpace (2023, February 23). Query Breeding Management Systems (QBMS) R package. Retrieved from https://repo.mel.cgiar.org/handle/20.500.11766/68139
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software in your work, please cite it using the metadata below."
title: "QBMS: Query the Breeding Management System(s)"
version: "2.0.0"
# doi: "10.32614/CRAN.package.QBMS"
doi: 10.5281/zenodo.10791626
authors:
- family-names: Al‑Shamaa
given-names: Khaled
affiliation: ICARDA
orcid: https://orcid.org/0000-0002-7668-3798
- family-names: Crimi
given-names: Mariano Omar
affiliation: IBP
- family-names: Kehel
given-names: Zakaria
affiliation: ICARDA
orcid: https://orcid.org/0000-0002-1625-043X
- family-names: Aparicio
given-names: Johan
affiliation: CIAT
orcid: https://orcid.org/0000-0003-3580-5354
date-released: "2025-08-02"
repository-code: https://github.com/icarda-git/QBMS
url: https://icarda-git.github.io/QBMS/
license: GPL‑3.0
Owner metadata
- Name: International Center for Agricultural Research in the Dry Areas (ICARDA)
- Login: icarda
- Email: icarda-comms@cgiar.org
- Kind: organization
- Description: Advancing agricultural science and innovation to improve the livelihoods and resilience of communities in dry areas across the globe.
- Website: https://www.icarda.org
- Location: Lebanon
- Twitter: ICARDA
- Company:
- Icon url: https://avatars.githubusercontent.com/u/47319866?v=4
- Repositories: 1
- Last ynced at: 2025-06-25T11:21:04.337Z
- Profile URL: https://github.com/icarda
GitHub Events
Total
- Push event: 14
Last Year
- Push event: 14
Committers metadata
Last synced: 23 days ago
Total Commits: 424
Total Committers: 4
Avg Commits per committer: 106.0
Development Distribution Score (DDS): 0.021
Commits in past year: 69
Committers in past year: 1
Avg Commits per committer in past year: 69.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Khaled Al-Shamaa | k****a@g****m | 415 |
| AparicioJohan | 4****n | 7 |
| icarda-git | 4****t | 1 |
| Nick | 5****o | 1 |
Issue and Pull Request metadata
Last synced: 5 months ago
Total issues: 0
Total pull requests: 0
Average time to close issues: N/A
Average time to close pull requests: N/A
Total issue authors: 0
Total pull request authors: 0
Average comments per issue: 0
Average comments per pull request: 0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 302 last-month
- Total docker downloads: 21,613
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 8
- Total maintainers: 1
cran.r-project.org: QBMS
Query the Breeding Management System(s)
- Homepage: https://icarda.github.io/QBMS/
- Documentation: http://cran.r-project.org/web/packages/QBMS/QBMS.pdf
- Licenses: GPL (≥ 3)
- Latest release: 2.0.0 (published 6 months ago)
- Last Synced: 2026-01-05T04:47:38.298Z (about 1 month ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 302 Last month
- Docker Downloads: 21,613
-
Rankings:
- Docker downloads count: 0.58%
- Forks count: 12.184%
- Stargazers count: 20.592%
- Average: 21.018%
- Dependent repos count: 23.784%
- Dependent packages count: 28.644%
- Downloads: 40.321%
- Maintainers (1)
Dependencies
- R >= 3.1.0 depends
- httr * imports
- jsonlite * imports
- ncdf4 * imports
- stats * imports
- tcltk * imports
- utils * imports
- knitr * suggests
- rmarkdown * suggests
Score: 14.020415186758488