
Genetic-Health Trends Module - Server Function
Source:R/modSnapshotTrends.R
modSnapshotTrendsServer.RdGenetic-Health Trends Module - Server Function
Arguments
- id
character vector of length 1. Module namespace identifier.
- snapshotSource
reactive returning
list(ped, geneticValue, guIter, guThresh)from the most recent Genetic Value Analysis run (seemodGeneticValueServer'ssnapshotSourcereturn element), or erroring (shinyreq()semantics) before any run has happened.
Value
A list with reactive components:
history- the current validated snapshot history (orNULLbefore any upload or generation).deltas- the current delta comparison (seecalcSnapshotDeltas), keyed off the sidebar's rule/from/ to selectors.isReady- logical: is a non-empty history loaded.
The generated snapshot's membershipRule is auto-derived from
snapshotSource()$ped$population (issue #167 Slice 4, S760 owner
decision): "focalPopulation" when the analyzed pedigree's
population column excludes any animal, "wholePedigree" otherwise
– truthful by construction from what reportGV() actually
analyzed, never a user-set dropdown that could contradict the data and
hit createColonySnapshot's stop(). The delta
comparison keeps a user-facing rule selector, populated from the
uploaded/generated history's own membershipRule values.
A checkSnapshotHistory violation on a malformed history
upload surfaces as a notification (module-contract rule 5: this is not
the same seam as inter-module malleability – the specific violation is
shown, not disguised as "no data yet") and leaves the current history
unchanged.
See also
modSnapshotTrendsUI for the user interface.
Other Shiny modules:
modBreedingGroupsServer(),
modBreedingGroupsUI(),
modCrossCenterIdentityServer(),
modCrossCenterIdentityUI(),
modDeidentifiedExportServer(),
modDeidentifiedExportUI(),
modGeneticDiversityServer(),
modGeneticDiversityUI(),
modGeneticValueServer(),
modGeneticValueUI(),
modGvAndBgDescServer(),
modGvAndBgDescUI(),
modInputServer(),
modInputUI(),
modMarkerGeneticsServer(),
modMarkerGeneticsUI(),
modMatePairServer(),
modMatePairUI(),
modORIPReportingServer(),
modORIPReportingUI(),
modPedigreeServer(),
modPedigreeUI(),
modPotentialParentsServer(),
modPotentialParentsUI(),
modPyramidServer(),
modPyramidUI(),
modSnapshotTrendsUI(),
modSummaryStatsServer(),
modSummaryStatsUI()