Reads an uploaded long-format marker genotype file (D1 format: id,
locus, allele1, allele2), validates and pivots it
(checkMarkerGenotypeFile, buildMarkerGenotypeMatrix),
estimates marker-based kinship independent of pedigree
(markerKinship), and surfaces a per-animal comparison of
pedigree-based mean kinship (indivMeanKin, already computed
upstream and passed in via kinshipMatrix) alongside the new
marker-based mean kinship (markerMeanKin) – an independent check
on the pedigree-implied relatedness, not a replacement for it. A second
tab surfaces the heterozygosity diagnostic: per-animal observed
heterozygosity (markerObservedHeterozygosity) alongside
population-level expected heterozygosity
(markerExpectedHeterozygosity). A third tab surfaces the
Mendelian-exclusion parentage diagnostic
(markerParentageExclusion): the pedigree's recorded
dam/sire cross-referenced against the uploaded genotypes, flagging any
recorded parent the genotype evidence contradicts. A fourth tab, "Cross-
Center", surfaces a between-population differentiation statistic
(markerFst) between the first uploaded file (implicitly
"Center A") and a second, independently uploaded Center B genotype file
– a population-level, two-dataset comparison, unrelated to the
per-animal cross-center identity linking of
resolveCrossCenterIds (Slice 4).
Arguments
- id
character vector of length 1. Module namespace identifier.
- kinshipMatrix
reactive returning the full pedigree-based kinship matrix (row and column names are animal IDs), or
NULLwhile upstream analysis has not yet been run.- pedigree
reactive returning the current pedigree data frame (columns
id,sire,dam), orNULLwhile upstream analysis has not yet been run.
Value
A list with eight reactive elements: markerGenotype, the
raw uploaded genotype data frame (or NULL before upload);
markerKinshipMatrix, the marker-based id x id
kinship matrix (or NULL); comparisonTable, the per-animal
indivMeanKin/markerMeanKin comparison data frame (or
NULL); heterozygosityTable, the per-animal
ho/he heterozygosity data frame (he is the
population-wide mean expected heterozygosity, repeated per row) (or
NULL); exclusionTable, the
markerParentageExclusion flagged-pairs data frame (or
NULL before a genotype file and a pedigree are both available);
crossCenterGenotypeB, the raw uploaded Center B genotype data
frame (or NULL before upload); crossCenterTable, the
markerFst locus/fst data frame with a
trailing "Pooled" row (or NULL before both center files
are uploaded); and isReady, TRUE once
comparisonTable has a value.
Details
This module never touches the existing single-locus genotype path
(checkGenotypeFile/addGenotype/hasGenotype/
getGVGenotype/geneDrop) – the D1 long-format schema is a
new, sibling concern.
See also
Other Shiny modules:
modBreedingGroupsServer(),
modBreedingGroupsUI(),
modGeneticDiversityServer(),
modGeneticDiversityUI(),
modGeneticValueServer(),
modGeneticValueUI(),
modGvAndBgDescServer(),
modGvAndBgDescUI(),
modInputServer(),
modInputUI(),
modMarkerGeneticsUI(),
modORIPReportingServer(),
modORIPReportingUI(),
modPedigreeServer(),
modPedigreeUI(),
modPotentialParentsServer(),
modPotentialParentsUI(),
modPyramidServer(),
modPyramidUI(),
modSummaryStatsServer(),
modSummaryStatsUI()
