Server logic for pedigree browser module handling focal animal selection (typed, pasted or uploaded, or set by clicking a diagram node), pedigree processing, filtering (focal trim and the Display Unknown IDs filter), the Diagram tab (edge style, names, twin connectors, PNG export), the twin/zygosity sidecar upload, and data export.
Value
A list of reactive values:
pedigree- Filtered pedigree for display (respects trim/unknown settings)analysisPedigree- The pedigree the other tabs analyze (focal-animal trim applied, no Display Unknown IDs filter, which affects only the table);appServeruses it, notpedigree, as the shared current pedigreeprocessedPedigree- Full pedigree with population, pedNum, gen columnsfocalAnimals- Character vector of focal animal IDsnAnimals- Count of animals in filtered pedigreepopulationCount- Count of animals marked as populationisReady- Logical indicating if pedigree data is ready. With no studbook loaded,isReady()andnAnimals()halt with a silentreqerror instead of returningFALSEand 0twinRelations- The validated twin/zygosity sidecar (NULLif none uploaded or invalid). It is validated against the filteredpedigree(focal trim applied, unknown IDs hidden); one id outside that pedigree fails the validation, an error notification is shown and the whole sidecar becomesNULL. Unlike the Diagram tab's own rendering, this is the raw, ungated reactive – not filtered by the "Show Twin Connectors" toggle – so callers outside this module (e.g.appServer) see the validated data regardless of that toggle's state (BL-N Slice 3).
Details
This module processes the studbook by:
Adding a
populationcolumn viasetPopulation()Adding a
pedNumcolumn viafindPedigreeNumber()Ensuring a
gencolumn exists viafindGeneration()Optionally trimming to the ancestors and descendants of focal animals via
trimPedigree()andgetDescendantPedigree()
See also
modPedigreeUI for the UI component
setPopulation for population marking
trimPedigree for pedigree trimming
findPedigreeNumber for pedigree numbering
findGeneration for generation calculation
Other Shiny modules:
modBreedingGroupsServer(),
modBreedingGroupsUI(),
modCrossCenterIdentityServer(),
modCrossCenterIdentityUI(),
modDeidentifiedExportServer(),
modDeidentifiedExportUI(),
modGeneticDiversityServer(),
modGeneticDiversityUI(),
modGeneticValueServer(),
modGeneticValueUI(),
modGvAndBgDescServer(),
modGvAndBgDescUI(),
modInputServer(),
modInputUI(),
modMarkerGeneticsServer(),
modMarkerGeneticsUI(),
modMatePairServer(),
modMatePairUI(),
modORIPReportingServer(),
modORIPReportingUI(),
modPedigreeUI(),
modPotentialParentsServer(),
modPotentialParentsUI(),
modPyramidServer(),
modPyramidUI(),
modSnapshotTrendsServer(),
modSnapshotTrendsUI(),
modSummaryStatsServer(),
modSummaryStatsUI()
