Skip to content

Pre-submission inquiry: brapiR2 - BrAPI v2 client for plant breeding databases #782

Description

@josh45-source

Submitting Author Name: Joash Joshua Ayo
Submitting Author Github Handle: @josh45-source
Repository: https://github.com/josh45-source/brapiR2
Submission type: Pre-submission
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"))
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
BugReports: https://github.com/josh45-source/brapiR2/issues
Depends:
    R (>= 4.1.0)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
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: 
    furrr (>= 0.3.0),
    future (>= 1.33.0),
    httptest2,
    knitr,
    rappdirs,
    rmarkdown,
    testthat (>= 3.0.0),
    withr
Config/testthat/edition: 3
VignetteBuilder: knitr

Scope

  • Please indicate which category or categories from our package fit policies or statistical package categories this package falls under. (Please check one or more appropriate boxes below):

    *Data Lifecycle Packages

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • translation

    *Statistical Packages

    • Bayesian and Monte Carlo Routines
    • Dimensionality Reduction, Clustering, and Unsupervised Learning
    • Machine Learning
    • Regression and Supervised Learning
    • Exploratory Data Analysis (EDA) and Summary Statistics
    • Spatial Analyses
    • Time Series Analyses
    • Probability Distributions
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:

brapiR2 is a data retrieval package that provides 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.

N/A — this is not a statistical package.

  • 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, national breeding programs, and private breeding companies worldwide.

Scientific applications include

  • Pulling phenotypic trial data for spatial analysis and multi-environment modeling

  • 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 4 modules Partial (phenotyping focus)
Genotyping endpoints Native variants, callsets, allele matrices, dosage extraction Limited (via GIGWA wrapper)
Return type Always tibbles Mixed lists/dataframes
Caching Built-in with configurable TTL None
Parallel fetching Via furrr Sequential

brapiR2 complements QBMS - QBMS is excellent for interactive exploration, while brapiR2 targets reproducible scripting and pipeline building. The 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 handled via explicit connection objects and are never stored globally or logged.

  • Any other questions or issues we should be aware of?

  • The package has 117 integration tests against the public BrAPI test server at https://test-server.brapi.org (guarded by skip_on_cran() and skip_if_offline())

  • 3 vignettes: getting started, genomic selection pipeline, multi-environment analysis

  • pkgdown documentation site: https://josh45-source.github.io/brapiR2/

  • GitHub Actions CI across macOS, Windows, and Ubuntu with multiple R versions

  • Built with httr2 (not httr), fully stateless (no global state or side effects)

  • The BrAPI specification is open source (CC-BY license) and explicitly encourages client development

  • brapiR2 has been submitted to the BrAPI compatible software registry at brapi.org

  • Not yet on CRAN intending to submit after rOpenSci review

Use of Generative AI

  • Generative AI tools were used to produce some of the material in this submission.

Claude Code (Anthropic's AI coding assistant) was used as a development aid throughout the package creation process. Specifically

  • Code scaffolding - Claude Code generated initial function structures, roxygen2 documentation skeletons, and test file templates, which were then reviewed, tested against the live BrAPI test server, and iteratively refined.
  • Debugging - Claude Code helped diagnose and fix issues found during devtools::check() and integration testing (e.g., non-ASCII characters, import directives, test expectations for cli output).
  • CI/CD setup - GitHub Actions workflow files were generated with Claude Code assistance.

All generated code was verified through: (1) devtools::check() passing with 0 errors and 0 warnings, (2) 117 integration tests passing against the live BrAPI test server, and (3) manual review of all function outputs. The package architecture, API design decisions (stateless connection objects, tibble-only returns, BrAPI module organization), and scientific domain logic were directed by the author.

The full development history is visible in the git log: https://github.com/josh45-source/brapiR2/commits/main

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions