| Title: | Generate Pedigrees for Index Case Based on US Census Data |
|---|---|
| Description: | A series of functions to generate a pedigree around a given person with a known genetic mutation, based on US census data. Pedigree will also track mutation status of all members. Pedigree is built down to children, back to grandparents, and out to cousins. There is also a function to generate pedigrees without genetic mutations. |
| Authors: | Katelyn Queen [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-8070-3042>), Kevin Abuhanna [aut] (ORCID: <https://orcid.org/0000-0003-0994-7658>), Paul Spellman [aut, cph] (ORCID: <https://orcid.org/0000-0002-4810-0022>) |
| Maintainer: | Katelyn Queen <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-06-17 09:23:45 UTC |
| Source: | https://github.com/katelynqueen98/generateindexpedigree |
Function to simulate pedigree of index case to first cousins and back to grandparents; Genetic mutation of index is permeated through pedigree, and if the family members are told about mutation and if they uptake genetic testing is tracked
GenerateIndexPedigree( age, sex, keep_future_children = TRUE, variant = "None", denovo_rate = 2e-06, is_denovo = NA, tell_family_prob = 0.7, tell_children_prob = 0.8, uptake_test_prob = 0.45, verbose = FALSE )GenerateIndexPedigree( age, sex, keep_future_children = TRUE, variant = "None", denovo_rate = 2e-06, is_denovo = NA, tell_family_prob = 0.7, tell_children_prob = 0.8, uptake_test_prob = 0.45, verbose = FALSE )
age |
numeric, age of index case |
sex |
character, index case sex; either "M" or "F" |
keep_future_children |
logical, whether to keep (TRUE) or remove (FALSE) children not yet born; default is TRUE |
variant |
character, name of variant; default is "None" for unaffected index |
denovo_rate |
numeric, between 0 and 1; rate of denovo mutation in given variant; default is 1/500000 or 2x10^(-6) |
is_denovo |
logical, index mutation is de novo (TRUE) or inherited (FALSE); NA indicates denovo status is unknown and will be simulated; default is NA |
tell_family_prob |
numeric, between 0 and 1; probability that an index case tells their family about their mutation; default is 0.70 |
tell_children_prob |
numeric, between 0 and 1; probability that an index case tells their children about their mutation, assumed this is <= tell_family_prob; default is 0.80 |
uptake_test_prob |
numeric, between 0 and 1; probability that a family member who is told about index mutation will get a genetic test; default is 0.45 |
verbose |
logical, whether to print messages during function; default is FALSE |
This function simulates pedigrees of individuals with a genetic mutation of interest, tracking family structure, variant permeation, and uptake of genetic testing. Family sizes are based on appropriate US census data, and due to correlation between number of children within pedigrees, this starts with assigning overall pedigree size to small, average, or large.
Children for each adult are generated using the SimulateChildren function.
a data frame representing the family, where each row represents a person and columns represent attributes:
numeric, person age
character, person sex; either "M" or "F"
character, person's relationship to index
character, which family member person is child of; NA for grandparents
logical, NA/True whether mutation is de novo; only possible to be true for index and parent
character, person's variant status; either NA or same as parameter
character, Yes/No, whether person was informed of index case
character, Yes/No, on whether person chose to receive genetic health screening
Katelyn Queen [email protected]
Schweizer and Guzzo. Distributions of Age at First Birth, 1960-2018 (2020); https://www.bgsu.edu/ncfmr/resources/data/family-profiles/schweizer-guzzo-distribution-age-first-birth-fp-20-11.html
Khandwala, Zhang, Lu, and Eisenberg. The age of fathers in the USA is rising: an analysis of 168 867 480 births from 1972 to 2015, Human Reproduction, Volume 32, Issue 10, October 2017, Pages 2110–2116, https://doi.org/10.1093/humrep/dex267
GenerateIndexPedigree(age = 35, variant = "BRCA1", sex = "M", is_denovo = NA)GenerateIndexPedigree(age = 35, variant = "BRCA1", sex = "M", is_denovo = NA)
Function to simulate pedigree of given individual to first cousins and back to grandparents
GeneratePedigree(age, sex, keep_future_children = TRUE)GeneratePedigree(age, sex, keep_future_children = TRUE)
age |
numeric, age of index case |
sex |
character, patient sex; either "M" or "F" |
keep_future_children |
logical, whether to keep (TRUE) or remove (FALSE) children not yet born; default is TRUE |
This function simulates pedigrees of individuals given age and sex. Family sizes are based on appropriate US census data, and due to correlation between number of children within pedigrees, this starts with assigning overall pedigree size to small, average, or large.
Children for each adult are generated using the SimulateChildren function.
a data frame representing the family, where each row represents a person and columns represent attributes:
numeric, person age
character, person sex; either "M" or "F"
character, person's relationship to index
character, which family member person is child of; NA for grandparents
Katelyn Queen [email protected]
Schweizer and Guzzo. Distributions of Age at First Birth, 1960-2018 (2020); https://www.bgsu.edu/ncfmr/resources/data/family-profiles/schweizer-guzzo-distribution-age-first-birth-fp-20-11.html
Khandwala, Zhang, Lu, and Eisenberg. The age of fathers in the USA is rising: an analysis of 168 867 480 births from 1972 to 2015, Human Reproduction, Volume 32, Issue 10, October 2017, Pages 2110–2116, https://doi.org/10.1093/humrep/dex267
GeneratePedigree(age = 35, sex = "M")GeneratePedigree(age = 35, sex = "M")
Function to simulate number and ages of children given age of mother or father
SimulateChildren( mother_age, father_age = NA, pedigree_size = "Average", variant = "None", has_children = FALSE, known_child_age = NA, current_year = 2026 )SimulateChildren( mother_age, father_age = NA, pedigree_size = "Average", variant = "None", has_children = FALSE, known_child_age = NA, current_year = 2026 )
mother_age |
numeric, age of mother |
father_age |
numeric, age of father, if known; only required if simulating children based on father; default is NA |
pedigree_size |
character, one of "Small", "Average", or "Large"; indicates average size of family in pedigree; default is "Average" |
variant |
character, name of variant for index case; default is "None" for unaffected index |
has_children |
logical, represents whether is known if parent has children; default is FALSE |
known_child_age |
numeric, age of known child; only used if has_children is TRUE |
current_year |
numeric, year to age individuals to; default is 2026 |
This function generates children given parental ages, pedigree size, variant status, and current year has_children and known_child_age are for generating past generations where we know there is at least one child of age X. If father_age given, calls .GenerateChildrenFromFather
a dataframe representing the children of indicated parent, where each row represents a person and columns represent attributes:
numeric, person age
character, person sex; either "M" or "F"
character, person's variant status; either NA or same as parameter
character, denotes which father child came from; accounts for complex family structures
Katelyn Queen [email protected]
Guzzo KB. New Partners, More Kids: Multiple-Partner Fertility in the United States. Ann Am Acad Pol Soc Sci. 2014 Jul;654(1):66-86. doi: 10.1177/0002716214525571.
Monte and Knop, United States Census Bureau. Men's Fertility and Fatherhood: 2014 (2019); https://www.census.gov/content/dam/Census/library/publications/2019/demo/P70-162.pdf
Pew Research Center. The Modern American Family (2023); https://www.pewresearch.org/social-trends/2023/09/14/the-modern-american-family/
Schwartz, Doren, and Li, The Springer Series on Demographic Methods and Population Analysis, vol 51 (2020), DOI: 10.1007/978-3-030-48519-1_10
Schweizer. 30 Years of Change in Men's Entry into Fatherhood, 1987-2017 (2019); https://www.bgsu.edu/ncfmr/resources/data/family-profiles/schweizer-years-change-mens-entry-fatherhood-fp-19-28.html
Schweizer and Guzzo. Distributions of Age at First Birth, 1960-2018 (2020); https://www.bgsu.edu/ncfmr/resources/data/family-profiles/schweizer-guzzo-distribution-age-first-birth-fp-20-11.html
United States Census Bureau. Annual Social and Economic Supplements; https://www.census.gov/data/datasets/time-series/demo/cps/cps-asec.html
SimulateChildren(mother_age = 35, pedigree_size = "Small", variant = "BRCA1")SimulateChildren(mother_age = 35, pedigree_size = "Small", variant = "BRCA1")