Genetic Tools for Colony Management
Adds an NA value for all animals without a relative
Add back single parents trimmed pedigree
Add genotype data to pedigree file
addIdRecords Adds Ego records added having NAs for parent IDs
Add parents
Forms a dataframe with Id, Sex, and current Age given a list of Ids an...
Eliminates partial parentage situations by adding unique placeholder I...
Calculates the count of each allele in the provided vector.
Assign parent alleles randomly
Calculates a, the number of an individual's alleles that are rare in...
Calculate animal ages.
Calculates founder Equivalents
Calculates Founder Equivalents and Founder Genome Equivalents
Calculates Founder Genome Equivalents
Calculates genome uniqueness for each ID that is part of the populatio...
Calculates Allelic Retention
Calculates the sex ratio (number of non-males / number of males) given...
checkChangedColsLst examines list for non-empty fields
checkErrorLst examines list for non-empty fields
Check genotype file
Check parent ages to be at least minParentAge
Examines column names, cols for required column names
Combines two vectors of alleles by randomly selecting one allele or th...
Choose date based on earlier flag.
Converts the ancestry information to a standardized code
Converts date columns formatted as characters to be of type datetime
Converts the fromCenter information to a standardized code
Converts pairwise kinship values to a relationship category descriptor...
Converts sex indicator for an individual to a standardized codes.
Converts status indicators to a Standardized code
Sets sex for animals listed as either a sire or dam.
Count first-order relatives.
Counts the number of occurrences of each kinship value seen for a pair...
Count the number of loops in a pedigree tree.
Creates an Excel workbook with worksheets.
Creates a folder with CSV files containing example pedigrees and ID li...
Create a pedigree tree (PedTree).
Makes a list object of kinship matrices from simulated pedigrees of po...
Makes a list object containing kinship summary statistics using the li...
dataframe2string converts a data.frame object to a character vector
Forms breeding group(s) with an effort to match a specified sex ratio
Filters a kinship matrix to include only the egos listed in 'ids'
Filters kinship values from a long-format kinship table based on the s...
Filters a genetic value report down to only the specified animals
Filters kinship to remove rows with kinship values less than the speci...
Determines the generation number for each id.
Find loops in a pedigree tree
Finds the number of total offspring for each animal in the provided pe...
Determines the generation number for each id.
fixColumnNames changes original column names and into standardized nam...
Gene drop simulation based on the provided pedigree information
Returns a one element character string with correct punctuation for a ...
Returns the elapsed time since start_time.
Recursively create a character vector of ancestors for an individual I...
Forms a list of animal Ids and animals related to them
getChangedColsTab skeleton of list of errors
getConfigFileName returns the configuration file name appropriate for ...
Age in years using the provided birthdate.
Returns a character vector with an file name having the date prepended...
Converts columns of dates in text form to Date object columns
Get demographic data
Creates a empty errorLst object
getErrorTab skeleton of list of errors
Get pedigree based on list of focal animals
Get genotypes from file
Get Genetic Value Genotype data structure for reportGV function.
Get the population of interest for the Genetic Value analysis.
getIdsWithOneParent extracts IDs of animals pedigree without either a ...
Get the superset of columns that can be in a pedigree file.
Get the direct ancestors of selected animals
Get the direct ancestors of selected animals
Get Logo file name
Get offspring to corresponding animal IDs provided
Get parents to corresponding animal IDs provided
Get the direct ancestors of selected animals from supplied pedigree.
Get pedigree from file
Get the maximum age of live animals in the pedigree.
Get possible column names for a studbook.
Get the lists of portential parents for all individuals born in the co...
Provides list of potential sires
Gets pedigree to ancestors of provided group leaving uninformative anc...
Get the age distribution for the pedigree
Creates a pyramid plot of the pedigree provided.
Get required column names for a studbook.
Get site information
Gets tokens from character vector of lines
getVersion Get the version number of nprcgenekeepr
Add animals to an existing breeding group or forms groups:
hasBothParents checks to see if both parents are identified.
Check for genotype data in dataframe
Convert internal column names to display or header names.
Returns TRUE if the string is a valid date.
Reformats a kinship matrix into a long-format table.
Generates a kinship matrix.
Forms kValue matrix from list of kinship matrices
Extracts a dataframe with a row for each kinship coeficient in the kin...
Make a CEPH-style pedigree for each id
Write copy of nprcgenekeepr::examplePedigree into a file
Convenience function to make the initial groupMembers animal list
Convenience function to make the initial grpNum list
Make relation classes table from kin dataframe.
Makes a simulated pedigree using representative sires and dams
Map IDs to Obfuscated IDs
Calculates the mean kinship for each animal in a kinship matrix
Genetic Management Functions
Genetic Tools for Colony Management
obfucateDate adds a random number of days bounded by plus and minus ma...
obfucateId creates a vector of ID aliases of specified length
obfuscatePed takes a pedigree object and creates aliases for all IDs a...
Finds the total number of offspring for each animal in the pedigree
print.summary.nprcgenekeepr print.summary.nprcgenekeeprGV
Quality Control for the Studbook or pedigree
Ranks animals based on genetic value.
Remove automatically generated IDs from pedigree
Remove duplicate records from pedigree
removeEarlyDates removes dates before a specified year
Removes potential sires from list of Ids
Remove uninformative founders.
removeUnknownAnimals Removes unknown animals added to pedigree that se...
Generates a genetic value report for a provided pedigree.
Allows running shiny application with `nprcgenekeepr::runGeneKeepR()...
Write copy of dataframes to either CSV, TXT, or Excel file.
Work around for unit tests using sample() among various versions of R
Sets the exit date, if there is no exit column in the table
Population designation function
Summary statistics for imputed kinship values
summary.nprcgenekeeprErr Summary function for class nprcgenekeeprErr
Force dataframe columns to character
Trim pedigree to ancestors of provided group by removing uninformative...
Get integer within a range
Provides genetic tools for colony management and is a derivation of the work in Amanda Vinson and Michael J Raboin (2015) <https://pmc.ncbi.nlm.nih.gov/articles/PMC4671785/> "A Practical Approach for Designing Breeding Groups to Maximize Genetic Diversity in a Large Colony of Captive Rhesus Macaques ('Macaca' 'mulatto')". It provides a 'Shiny' application with an exposed API. The application supports five groups of functions: (1) Quality control of studbooks contained in text files or 'Excel' workbooks and of pedigrees within 'LabKey' Electronic Health Records (EHR); (2) Creation of pedigrees from a list of animals using the 'LabKey' EHR integration; (3) Creation and display of an age by sex pyramid plot of the living animals within the designated pedigree; (4) Generation of genetic value analysis reports; and (5) Creation of potential breeding groups with and without proscribed sex ratios and defined maximum kinships.
Useful links