Submitting Author Name: Joash Joshua Ayo
Submitting Author Github Handle: @josh45-source
Repository: https://github.com/josh45-source/brapiR2
Version submitted: 0.1.0
Submission type: Standard
Editor: @robitalec
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
- Paste the full DESCRIPTION file inside a code block below:
Package: brapiR2
Title: A Tidyverse-Native Client for the BrAPI v2 (Breeding API) Specification
Version: 0.1.0
Authors@R:
person("Joash Joshua", "Ayo", , "joashjoshua789@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0009-0007-1642-0172"))
Description: Provides pipe-friendly, stateless access to every endpoint in the
Breeding API (BrAPI) v2.1 specification. Covers all four BrAPI modules
Core, Germplasm, Phenotyping, and Genotyping returning tidy tibbles ready
for analysis. Features include automatic pagination, async search handling,
response caching, parallel batch fetching, and convenience functions for
genomic selection workflows (e.g. dosage matrix extraction). Designed for
plant breeders and bioinformaticians who need programmatic access to
BreedBase, BMS, EBS, GIGWA, Germinate, and any BrAPI-compliant server.
License: MIT + file LICENSE
URL: https://github.com/josh45-source/brapiR2,
https://josh45-source.github.io/brapiR2/
BugReports: https://github.com/josh45-source/brapiR2/issues
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
Depends:
R (>= 4.1.0)
RoxygenNote: 7.3.3
Imports:
cli (>= 3.6.0),
dplyr (>= 1.1.0),
glue (>= 1.6.0),
httr2 (>= 1.0.0),
jsonlite (>= 1.8.0),
purrr (>= 1.0.0),
rlang (>= 1.1.0),
tibble (>= 3.2.0),
tidyr (>= 1.3.0),
tidyselect (>= 1.2.0)
Suggests:
AGHmatrix,
BGLR,
furrr (>= 0.3.0),
future (>= 1.33.0),
httptest2,
knitr,
lme4,
metan,
rappdirs,
rmarkdown,
rrBLUP,
sommer,
testthat (>= 3.0.0),
withr
Config/testthat/edition: 3
VignetteBuilder: knitr
Scope
-
Please indicate which category or categories from our package fit policies this package falls under:
-
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
brapiR2 is a data retrieval package providing programmatic access to plant breeding databases via the Breeding API (BrAPI) v2.1 specification. It retrieves phenotypic trial data, genotypic variant data, germplasm records, and pedigree information from BrAPI-compliant servers (BreedBase, BMS, EBS, GIGWA, Germinate) and returns them as tidy tibbles ready for analysis in R.
- Who is the target audience and what are scientific applications of this package?
The target audience is plant breeders, quantitative geneticists, and bioinformaticians who need programmatic, reproducible access to breeding databases. BrAPI is adopted by CGIAR centers (CIMMYT, IRRI, CIP, ICRISAT), national breeding programs, and private breeding companies worldwide.
Scientific applications include:
-
Pulling phenotypic trial data for spatial analysis and multi-environment modelling
-
Extracting genotypic data as dosage matrices for genomic prediction (rrBLUP, BGLR, sommer)
-
Batch retrieval of germplasm pedigree information for genetic studies
-
Building reproducible data access pipelines, replacing manual web portal downloads
-
Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?
Yes. QBMS (on CRAN, ~9,400 downloads) is the primary existing R client for BrAPI. brapiR2 differs in design philosophy and scope:
| Feature |
brapiR2 |
QBMS |
| Design |
Stateless, functional, pipe-friendly |
Stateful, menu-driven (set_program() > set_trial() > set_study()) |
| BrAPI v2 coverage |
Full spec — all four modules |
Partial (phenotyping focus) |
| Genotyping endpoints |
Native variants, call sets, allele matrices, dosage extraction |
Limited (via GIGWA wrapper) |
| Return type |
Always tibbles |
Mixed lists / data frames |
| Caching |
Built-in, configurable TTL |
None |
| Parallel fetching |
Via furrr |
Sequential |
The two packages are complementary rather than competing: QBMS is well suited to interactive exploration, while brapiR2 targets reproducible scripting and pipeline building where composable, side-effect-free functions matter. Genotyping module coverage is the strongest differentiator.
There was also an older brapi package by CIP-RIU on GitHub targeting BrAPI v1, which appears unmaintained.
Yes. brapiR2 accesses only plant breeding data (phenotypic measurements, genotypic markers, germplasm records). No human subjects data is involved. Authentication credentials are held in explicit connection objects passed as function arguments; they are never stored globally, written to disk, or logged.
- If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or
@tag the editor you contacted.
Pre-submission inquiry: #782 - confirmed in scope by @maurolepore.
- Explain reasons for any
pkgcheck items which your package is unable to pass.
All required pkgcheck items pass (latest run on commit b1037238: package name available, contributing file, roxygen2, URL and BugReports fields, HTML vignette, all functions have examples, website present, CI present, coverage 98.1%, R CMD check clean).
The remaining 👀 item is "Some goodpractice linters failed". For transparency, these are:
- Cyclocomplexity ≥ 15 -
fetch_allele_matrix_pages (18) and brapi_get_dosage_matrix (16). These handle multi-page allele-matrix retrieval and genotype-string-to-dosage conversion across phased, unphased, and missing call formats respectively. I am happy to refactor them further if reviewers prefer.
- lintr (42 items) - predominantly stylistic
toString() versus paste(collapse = ) (16), paste() versus paste0() for collapsing (16), plus a small number of <<- uses in cache handling and file.path() suggestions. Straightforward to address on request.
- Duplicated
@param documentation - partially addressed via an @inheritParams template for the shared con argument; some duplication remains across module files.
- Unused internal functions / spelling - I will audit and clean these up.
Unused Suggests - AGHmatrix, BGLR, lme4, metan, rrBLUP, and sommer are declared but show no function calls under static analysis, because the vignettes using them are eval = FALSE (they demonstrate downstream genomic selection workflows against a user's own server data). They are listed so readers know what to install to run the vignette code. Happy to drop them and move that guidance into vignette prose if reviewers prefer.
Glad to address any or all of the above during review, I did not want to make further stylistic changes unilaterally before a reviewer had seen the code.
Technical checks
Confirm each of the following by checking the box.
This package:
On the ToS point specifically: the BrAPI specification is published under a Creative Commons Attribution licence and the BrAPI community explicitly encourages third-party client development. brapiR2 has been submitted to the BrAPI compatible software registry at brapi.org. Integration tests run against the public BrAPI test server at https://test-server.brapi.org, which is provided by the BrAPI project for exactly this purpose, and are guarded by skip_on_cran() and skip_if_offline().
Use of Generative AI
Claude Code (Anthropic's AI coding assistant) was used as a development aid throughout. Specifically:
- Code scaffolding - initial function structures, roxygen2 skeletons, and test file templates, which were then reviewed and iteratively refined against the live BrAPI test server.
- Debugging - diagnosing issues surfaced by
devtools::check() and integration testing (non-ASCII characters, missing import directives, test expectations for cli output, a cli string-interpolation bug in brapi_fetch_parallel()).
- CI/CD - GitHub Actions workflow files.
Verification: devtools::check() passes with 0 errors and 0 warnings; 231 tests pass (117 integration tests against the live test server, 114 mocked tests using local_mocked_bindings()), giving 98.1% coverage; all function outputs were manually reviewed against live server responses. The package architecture, API design decisions (stateless connection objects, tibble-only returns, one function per BrAPI endpoint, transparent pagination), and domain logic were directed by me.
The design history, architectural rationale, and the role of AI tooling are documented in DESIGN.md, added at the request of the editorial board during pre-submission. Full development history: https://github.com/josh45-source/brapiR2/commits/main
Publication options
Note: in the pre-submission inquiry I indicated an intention to submit to CRAN after review. I am no longer planning to do so in the near term, and would prefer to focus on the rOpenSci review and on maintaining the package on GitHub / R-universe. If that changes I will raise it with the handling editor rather than submitting during review.
Code of conduct
Submitting Author Name: Joash Joshua Ayo
Submitting Author Github Handle: @josh45-source
Repository: https://github.com/josh45-source/brapiR2
Version submitted: 0.1.0
Submission type: Standard
Editor: @robitalec
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
Scope
Please indicate which category or categories from our package fit policies this package falls under:
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
brapiR2 is a data retrieval package providing programmatic access to plant breeding databases via the Breeding API (BrAPI) v2.1 specification. It retrieves phenotypic trial data, genotypic variant data, germplasm records, and pedigree information from BrAPI-compliant servers (BreedBase, BMS, EBS, GIGWA, Germinate) and returns them as tidy tibbles ready for analysis in R.
The target audience is plant breeders, quantitative geneticists, and bioinformaticians who need programmatic, reproducible access to breeding databases. BrAPI is adopted by CGIAR centers (CIMMYT, IRRI, CIP, ICRISAT), national breeding programs, and private breeding companies worldwide.
Scientific applications include:
Pulling phenotypic trial data for spatial analysis and multi-environment modelling
Extracting genotypic data as dosage matrices for genomic prediction (rrBLUP, BGLR, sommer)
Batch retrieval of germplasm pedigree information for genetic studies
Building reproducible data access pipelines, replacing manual web portal downloads
Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?
Yes. QBMS (on CRAN, ~9,400 downloads) is the primary existing R client for BrAPI. brapiR2 differs in design philosophy and scope:
set_program()>set_trial()>set_study())The two packages are complementary rather than competing: QBMS is well suited to interactive exploration, while brapiR2 targets reproducible scripting and pipeline building where composable, side-effect-free functions matter. Genotyping module coverage is the strongest differentiator.
There was also an older
brapipackage by CIP-RIU on GitHub targeting BrAPI v1, which appears unmaintained.Yes. brapiR2 accesses only plant breeding data (phenotypic measurements, genotypic markers, germplasm records). No human subjects data is involved. Authentication credentials are held in explicit connection objects passed as function arguments; they are never stored globally, written to disk, or logged.
@tagthe editor you contacted.Pre-submission inquiry: #782 - confirmed in scope by @maurolepore.
pkgcheckitems which your package is unable to pass.All required pkgcheck items pass (latest run on commit
b1037238: package name available, contributing file, roxygen2, URL and BugReports fields, HTML vignette, all functions have examples, website present, CI present, coverage 98.1%,R CMD checkclean).The remaining 👀 item is "Some goodpractice linters failed". For transparency, these are:
fetch_allele_matrix_pages(18) andbrapi_get_dosage_matrix(16). These handle multi-page allele-matrix retrieval and genotype-string-to-dosage conversion across phased, unphased, and missing call formats respectively. I am happy to refactor them further if reviewers prefer.toString()versuspaste(collapse = )(16),paste()versuspaste0()for collapsing (16), plus a small number of<<-uses in cache handling andfile.path()suggestions. Straightforward to address on request.@paramdocumentation - partially addressed via an@inheritParamstemplate for the sharedconargument; some duplication remains across module files.Unused Suggests - AGHmatrix, BGLR, lme4, metan, rrBLUP, and sommer are declared but show no function calls under static analysis, because the vignettes using them are eval = FALSE (they demonstrate downstream genomic selection workflows against a user's own server data). They are listed so readers know what to install to run the vignette code. Happy to drop them and move that guidance into vignette prose if reviewers prefer.
Glad to address any or all of the above during review, I did not want to make further stylistic changes unilaterally before a reviewer had seen the code.
Technical checks
Confirm each of the following by checking the box.
This package:
On the ToS point specifically: the BrAPI specification is published under a Creative Commons Attribution licence and the BrAPI community explicitly encourages third-party client development. brapiR2 has been submitted to the BrAPI compatible software registry at brapi.org. Integration tests run against the public BrAPI test server at https://test-server.brapi.org, which is provided by the BrAPI project for exactly this purpose, and are guarded by
skip_on_cran()andskip_if_offline().Use of Generative AI
Claude Code (Anthropic's AI coding assistant) was used as a development aid throughout. Specifically:
devtools::check()and integration testing (non-ASCII characters, missing import directives, test expectations for cli output, a cli string-interpolation bug inbrapi_fetch_parallel()).Verification:
devtools::check()passes with 0 errors and 0 warnings; 231 tests pass (117 integration tests against the live test server, 114 mocked tests usinglocal_mocked_bindings()), giving 98.1% coverage; all function outputs were manually reviewed against live server responses. The package architecture, API design decisions (stateless connection objects, tibble-only returns, one function per BrAPI endpoint, transparent pagination), and domain logic were directed by me.The design history, architectural rationale, and the role of AI tooling are documented in DESIGN.md, added at the request of the editorial board during pre-submission. Full development history: https://github.com/josh45-source/brapiR2/commits/main
Publication options
Note: in the pre-submission inquiry I indicated an intention to submit to CRAN after review. I am no longer planning to do so in the near term, and would prefer to focus on the rOpenSci review and on maintaining the package on GitHub / R-universe. If that changes I will raise it with the handling editor rather than submitting during review.
Code of conduct