Learn / Inside the pipeline / 09 · roll-up

From accessions to a species number

Species get one recollection interval, but the evidence lives in accessions. The roll-up: for each accession (restricted to those with at least two distinct test years, so a single lucky test can never drive a species result), take its longest year meeting the threshold across any storage. The species interval is the maximum across its accessions — the best demonstrated survival anywhere in the species.

Maximum is an optimistic choice, so the workflow immediately qualifies it with support counts: supporting_accessions = how many accessions independently reached that same interval, and support_fraction = supporting ÷ total. A species interval backed by 4 of 6 accessions is a recommendation; backed by 1 of 9, it's a lead.

Ties between accessions break deterministically — higher baseline first, then accession ID — so reruns give identical answers. Determinism in tie-breaks sounds pedantic until two runs of your own pipeline disagree in a publication table.

Build it yourself
library(dplyr)

# acc_max: one row per accession = longest year >= threshold across ANY storage
acc_max <- collapsed %>%
  left_join(baselines, by = c("Family", "TaxonName", "AcquisitionNum")) %>%
  group_by(Family, TaxonName, AcquisitionNum, baseline_viab, threshold) %>%
  filter(n_distinct(YearsDifference) >= 2) %>%      # >=2 distinct test years
  summarise(acc_interval = {
    ok <- YearsDifference[PctGermin >= threshold]
    if (length(ok)) max(ok) else NA_real_
  }, .groups = "drop")

species <- acc_max %>%
  group_by(Family, TaxonName) %>%
  mutate(species_interval = max(acc_interval, na.rm = TRUE)) %>%
  summarise(
    recollection_interval_years = first(species_interval),
    supporting_accessions = sum(acc_interval >= species_interval, na.rm = TRUE),
    total_accessions      = n_distinct(AcquisitionNum),
    support_fraction      = supporting_accessions / total_accessions,
    .groups = "drop")
The math behind this step: Accessions to species: the maximum, qualified
Observed vs supported: two independent confidence checksR5 vs R18: detecting seeds that freezing hurts