Server logic for the Potential Parents module. On button press, it calls
getPotentialParents against the current pedigree, flattens the
result into a sortable table, and exposes it for CSV download. The surface
degrades gracefully when no pedigree is loaded, when the pedigree lacks the
fromCenter colony-origin field, or when no in-colony animal has an
unknown parent.
modPotentialParentsServer(
id,
pedigree = NULL,
minSireAge = NULL,
minDamAge = NULL,
gestationTable = NULL,
gestationDefault = NULL
)A list of reactive expressions:
potentialParents - the raw getPotentialParents result
(or NULL).
tableData - the flattened results data.frame.
gestationDefault - the species-keyed default gestation window
(days) used to prefill the maximum-gestational-period input.
character vector of length 1. Module namespace identifier.
reactive returning the current pedigree data.frame.
minimum age in years for a male to be proposed as a sire.
May be a plain numeric, NULL, or a reactive returning either.
NULL (the default) uses the species- and sex-specific breeding-age
table default via getPotentialParents.
minimum age in years for a female to be proposed as a dam.
Same forms and default as minSireAge, applied to females.
optional species-to-gestation lookup passed to
getSpeciesGestation when defaulting the gestation window;
NULL (the default) uses the bundled speciesGestation
table. Supplied at boot from the user-configurable species overrides,
so a colony's CSV values drive the prefill default.
optional integer fallback (days) for a pedigree whose
species is absent from gestationTable, passed through to the
gestation prefill; NULL (the default) keeps the built-in 210.
Supplied at boot from the user-configurable species overrides.
modPotentialParentsUI for the user interface.
getPotentialParents for the underlying computation.
Other Shiny modules:
modBreedingGroupsServer(),
modBreedingGroupsUI(),
modGeneticDiversityServer(),
modGeneticDiversityUI(),
modGeneticValueServer(),
modGeneticValueUI(),
modGvAndBgDescServer(),
modGvAndBgDescUI(),
modInputServer(),
modInputUI(),
modORIPReportingServer(),
modORIPReportingUI(),
modPedigreeServer(),
modPedigreeUI(),
modPotentialParentsUI(),
modPyramidServer(),
modPyramidUI(),
modSummaryStatsServer(),
modSummaryStatsUI()