You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design and analysis of augmented plant breeding trials.
Augmented row-column designs (Piepho and Williams, 2016):
unreplicated entries plus replicated checks in rows, columns and
superimposed blocks. Row and column groups can be unequal, blocks can
hold any number of check plots, and checks are placed by a D-optimal
search (or covering Latin rectangles for regular layouts). Analyses can
use random blocks, random entries (BLUPs), or a 'SpATS' spatial model.
Augmented p-rep designs (Williams, Piepho and Whitaker, 2011):
multi-location, partially replicated trials in incomplete blocks where
pairs of entries share a block at most once. Choose the construction with
method: a flexible randomized "search", the paper's partial
alpha-array construction ("alpha"), or its augmented alpha(2)-array
construction ("alpha2"). augmented_prep_parameters() lists the
feasible settings, and every design reports its efficiency factor.
Resolvable row-column designs (Williams, John and Whitaker, 2006):
fully replicated trials with rows and columns within replicates,
optimized for row-column and spatial (linear variance) efficiency, with
latinized options; analyses with RC, LV + RC and AR + RC models by REML.
Analysis: ANOVA with degrees of freedom that are estimable from the
observed plots, plus adjusted entry means (BLUEs) with standard
errors, the mean SED and the 5% LSD. p-rep analyses fit replicates within
locations and can add a fixed or random (REML) genotype-by-location
interaction. A two-stage analysis (analyze_augmented_prep_two_stage())
handles heterogeneous error variances across locations and optional
spatial adjustment with 'SpATS'.
Field maps and 'Breedbase': a plot-level field book and upload files,
or save the design directly into a Breedbase breeding program and folder
through BrAPI with save_breedbase(), after checking the location and
accessions with breedbase_check(). After harvest, save the phenotypic
data by plot and trait name with save_breedbase_phenotypes() (sheet from
phenotype_template()), and the analysis results: first-stage plot values
as a trait of the field plots (save_breedbase_first_stage()) and
second-stage genotype means as a Breedbase analysis
(save_breedbase_analysis()).
agricolae designs: generate a design with the CRAN package agricolae,
convert and record trial information with prepare_breedbase_trial(),
then use the same save_breedbase() and phenotype_template() workflow.
Multi-environment tools: read 'Breedbase' phenotype files, run
Hartley's Fmax variance check, and group environments by GxE.
Tutorial: vignette("breedtools") walks through every design and
analysis with simulated data.
In R: help(package = "breedtools") lists every help page.
?augmented_row_column_design opens one page, and
example(augmented_row_column_design) runs its examples.
library(breedtools)
design_options(n_entries=100) # field dimensions and checks not yet known
design_options(108, design="augmented_row_column", n_checks=4, rows=12, cols=12)
design_options(42, design="resolvable", n_reps=3, cols=7)
Options report field size, checks, replication, plot counts, unused
positions and nominal error degrees of freedom. Augmented row-column
options expose rows_in_field, cols_in_field, rows_per_block,
cols_per_block, checks_per_block, method and n_candidates for an
explicit generator call. See ?design_options for selecting and generating
one. These are parameter options to check with the generator,
its summary and check_design().
Example
library(breedtools)
rc<- augmented_row_column_design(
treatments= sprintf("LINE_%03d", 1:108),
controls= c("CHECK_A", "CHECK_B", "CHECK_C", "CHECK_D"),
rows_in_field=12, cols_in_field=12,
rows_per_block=4, cols_per_block=4,
seed=2026
)
plot_augmented_row_column_design(rc)
field<-rc$designfield$yield<- rnorm(nrow(field), 60, 3) # your phenotypes herefit<- analyze_augmented_row_column_design(field, response="yield")
fit# ANOVA and top adjusted meansfit$adjusted_means# all entries ranked by adjusted mean
To see the full workflow, run vignette("breedtools"), or open the RStudio
script:
accessions<- c("G1", "G2", "G3", "CHECK_A") # existing Breedbase accession namesrandomized<-agricolae::design.rcbd(accessions, r=3, seed=2026)
trial<- prepare_breedbase_trial(
randomized, trial_name="RCBD_2026", year=2026,
location="Ibadan", program="Your breeding program",
description="RCBD with three complete blocks generated with agricolae",
checks="CHECK_A", prompt=FALSE
)
# Inspect the trial and plot payload without a connection.payload<- save_breedbase(trial, dry_run=TRUE)
# Check against your database, then save as a new trial.con<- breedbase_login("https://your-breedbase.org", "your_username")
save_breedbase(trial, con, dry_run=TRUE)
save_breedbase(trial, con)
prepare_breedbase_trial() records the required trial information once
and converts the field book. In an interactive RStudio session, it can ask
for missing name, year, location, program and description. Use
phenotype_template(trial) to make a field sheet with the recorded trial's
plot names. Preparation is offline; saving uses your existing connection.
The converter preserves the randomization. It recognizes CRD, RCBD, alpha,
lattice, augmented block, split-plot and strip-plot types. For a field book
alone, including agricolae::zigzag() output, supply design_type. For
multiple treatment factors, select the accession column explicitly, e.g.
accession = "genotype". Other factors and the main-plot/subplot hierarchy
remain in trial$book; the save function uploads individual plots.
See ?as_breedbase_design for column mapping and other design types.
The complete tour in scripts/validate_designs.R includes a second analyzed
trait added to existing analysis projects (A11), an independent single-stage
analysis (run A1-A6, then A12), and the full agricolae workflow (Part I).
Part H reads existing Breedbase trials and lets you choose "single",
"two_stage" or "both" through breedbase_analysis_route; multiple traits
are stored in the same analysis projects.
All functions
Each function has a help page with runnable examples: ?function_name,
then example(function_name). Functions that connect to Breedbase have
examples in \dontrun{}. To run them, you need a server and an account.
1. Choose a design
Function
What it does
design_options()
Suggests layouts for any design from the number of entries and the field size, if you know it
augmented_row_column_capacity()
Counts the entries and checks that fit in an augmented row-column field
augmented_row_column_layouts()
Lists the analyzable block layouts of an augmented row-column field
augmented_prep_parameters()
Lists feasible settings for the alpha and alpha(2) p-rep constructions