| Title: | Cancer Risk Prediction from Complex Family History and Other Data |
|---|---|
| Description: | A batch implementation of the CRISP2 (colorectal risk prediction version 2) colorectal cancer risk prediction model. This model predicts a person's future risk of colorectal cancer based on his or her family's complex history of colorectal cancer and (if available) any polygenic risk scores, lifestyle risk factors or genetic testing in the genes MLH1, MSH2, MSH6, PMS2 or MUTYH. |
| Authors: | James Dowty [aut, cre], Robert MacInnis [aut] |
| Maintainer: | James Dowty <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.1 |
| Built: | 2026-12-04 20:05:44 UTC |
| Source: | https://github.com/cran/riskpred |
This function implements the CRISP2 risk prediction model, which predicts a person's future risk of colorectal cancer based on his or her family's full history of colorectal cancer and (optionally) any lifestyle risk factors, polygenic risk scores or genetic testing in major colorectal cancer-susceptibility genes.
crisp2(dat, ncores = 1, monozyg = NULL, inc = NULL, OR = NULL, prev = NULL)crisp2(dat, ncores = 1, monozyg = NULL, inc = NULL, OR = NULL, prev = NULL)
dat |
A data frame with rows corresponding to people and columns corresponding to the following variables (other variables can be included but will be ignored):
The following columns can also be included in
|
ncores |
The number of cores to be used, with |
monozyg |
An optional list that can be used to specify genetically identical persons, such as monozygotic twins or monozygotic triplets. Each element of the list should be a vector containing the individual identifiers of a group of genetically identical persons, see Examples below. The order of the list and the orders within its elements do not affect the output of the function. |
inc |
A data frame specifying the age-, sex- and country-specific annual
colorectal cancer
incidences for the general population and for carriers of pathogenic variants
in the genes MLH1, MSH2, MSH6, PMS2 and MUTYH
(here, a carrier for MUTYH means a biallelic carrier).
If |
OR |
A data frame specifying the colorectal cancer odds ratios for
the lifestyle risk factors. If
A person's overall odds ratio is the product of the relevant odds ratios for
each (non-missing) risk factor, multiplied by a sex- and country-specific factor
that ensures the average odds ratio is |
prev |
A data frame specifying the joint prevalences for each possible
combination of the lifestyle risk factors (separately for each country and sex).
If
See crisp2_prev for an example of |
The allowed values for the geno variable in dat are the integers
between 1 and 9 (inclusive) or missing (NA).
If more than one of these codes applies to a given person
then select the first applicable code. These codes are interpreted as follows:
1 = MLH1 pathogenic variant (PV) carrier.
2 = MSH2 PV carrier.
3 = MSH6 PV carrier.
4 = PMS2 PV carrier.
5 = biallelic MUTYH PV carrier.
6 = monoallelic MUTYH PV carrier.
7 = mismatch repair gene PV non-carrier and MUTYH PV non-carrier.
8 = mismatch repair gene PV non-carrier and MUTYH PV carrier status unknown.
9 = mismatch repair gene PV carrier status unknown and MUTYH PV non-carrier.
NA = mismatch repair gene and MUTYH PV carrier statuses both unknown.
A data frame with rows corresponding to all counselees in dat
(those with counselee = 1) and the following columns:
family: the counselee's family.
indiv: the counselee's individual identifier.
age: the counselee's age.
future.age: the age to which future risks were calculated.
crc.prob.noscreen: the probability that the counselee will develop
colorectal cancer by future.age, given that he or she is
unaffected at the given age and is not undergoing screening for colorectal cancer.
This probability will be NA for
counselees who either: already have colorectal cancer (crc = 1);
have future.age smaller than age; or have future.age larger than
one plus the maximum age in inc, since these incidences are needed to calculate
the future risk. For example, if using the default incidences, whose maximum age is 79,
a woman who is aged 75 will have crc.prob.noscreen = NA unless
her future.age is one of 75, ..., 80. Here, 80 is allowed because the
annual incidence for a woman aged 79 is her probability of developing colorectal
cancer within the next year, given that she is currently unaffected.
crc.prob.fit: the probability the counselee will develop
colorectal cancer given that he or she adheres to screening guidelines recommending a
fecal immunochemical test (FIT or iFOBT) every 2 years, corresponding to a
51% reduction in the odds of colorectal cancer compared with no screening (PMID 29441568).
crc.prob.colonosc: the probability the counselee will develop
colorectal cancer given that he or she adheres to screening guidelines recommending
a colonoscopy every 10 years, corresponding to a 67% reduction in the odds of
colorectal cancer compared with no screening (PMID 29441568).
# Run CRISP2 on the sample data using the default options data("dat_sample") head(dat_sample) dat_toy <- dat_sample[dat_sample$family == "toy", ] out <- crisp2(dat_toy) # toy example that runs quickly #out <- crisp2(dat_sample) # full example out # Add identical twins and use parallel computing # Parallel computing is usually faster unless there are very few families # fot005 and fot007 are a pair of identical twins, and so are fzg005 and fzg006 mzyg <- c(list(c("fot005", "fot007")), list(c("fzg005", "fzg006"))) parallel::detectCores() # The number of cores available, but we use only 2 below out <- crisp2(dat_toy, monozyg=mzyg, ncores=2) # toy example #out <- crisp2(dat_sample, monozyg=mzyg, ncores=2) # full example out # Now suppose that all of the sample families are from the United Kingdom (UK) dat_UK <- dat_sample dat_UK$country <- "UK" # For the UK families, you could simply use the default incidences, # ORs and prevalences for one of the default countries, e.g. Australia. dat <- dat_UK dat$country <- "Aus" dat_toy <- dat[dat$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg) # toy example #out <- crisp2(dat, ncores=2, monozyg=mzyg) # full example out # Alternatively, you can create incidences, etc. for the UK as follows # Create incidences for the UK based on the default Australian rates # Use Australian incidences for major gene variant carriers and UK population rates data("crisp2_inc") head(crisp2_inc) keep <- grep("Aus", names(crisp2_inc), fixed=TRUE) inc_UK <- crisp2_inc[, keep] nm <- strsplit(names(inc_UK), ".", fixed=TRUE) newnm <- sapply(nm, function(x) paste0(x[1], ".UK.", x[3])) names(inc_UK) <- newnm # Country names now match the values of dat_UK$country head(inc_UK) # Note: row i corresponds to age i-1 # English incidences for colon and rectum combined from # https://www.the-iacr.net/en/ci5-2.0/dataviz/12/age_specific rawm <- c(0.01, 0.08, 0.62, 1.4, 1.9, 3.3, 6.9, 9.9, 13.3, 23, 45.4, 84.1, 148.9, 194.5, 282.7, 357.6) rawf <- c(0.01, 0.09, 1, 2.3, 2.9, 3.5, 7.2, 9.9, 12.7, 20.8, 36.1, 60.3, 89.9, 115.6, 171.9, 233) inc_UK$Pop.UK.M <- rep(rawm, each=5) / 10^5 inc_UK$Pop.UK.F <- rep(rawf, each=5) / 10^5 # No UK ORs or prevalences yet, so remove lifestyle risk factors before running dat <- dat_UK dat <- dat[, !names(dat) %in% c("height", "bmi", "smoking", "alcohol")] dat_toy <- dat[dat$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg, inc=inc_UK) # toy example #out <- crisp2(dat, ncores=2, monozyg=mzyg, inc=inc_UK) # full example out # Create UK ORs for the lifestyle risk factors based on the default ORs, # which are the same for Australia, Canada and USA data("crisp2_OR") head(crisp2_OR) all(crisp2_OR$OR[crisp2_OR$country=="Aus"] == crisp2_OR$OR[crisp2_OR$country=="Can"]) all(crisp2_OR$OR[crisp2_OR$country=="Aus"] == crisp2_OR$OR[crisp2_OR$country=="USA"]) OR_UK <- crisp2_OR[crisp2_OR$country == "Aus", ] OR_UK$country <- "UK" # Must match the values in dat_UK$country head(OR_UK) # Create UK prevalences for the lifestyle risk factors assuming uncorrelated risk factors # and given univariate prevalences for each risk factor data("crisp2_prev") head(crisp2_prev) values <- list(height = c("0-154", "155-159", "160-164", "165-169", "170-174", "175-179", "180-184", "185+"), bmi = c("0-24.9", "25-29.9", "30+"), smoking = c("Never", "Former", "Current"), alcohol = c("0", "0.1-4.9", "5.0-14.9", "15.0-29.9", "30+")) # Male univariate (i.e. marginal) prevalences pm <- list(height = c(0.001, 0.023, 0.056, 0.133, 0.235, 0.261, 0.187, 0.104), bmi = c(0.282, 0.390, 0.328), smoking = c(0.514, 0.341, 0.145), alcohol = c(0.409, 0.143, 0.195, 0.129, 0.124)) # Female univariate (i.e. marginal) prevalences pf <- list(height = c(0.166, 0.215, 0.286, 0.209, 0.09, 0.029, 0.004, 0.001), bmi = c(0.388, 0.299, 0.313), smoking = c(0.649, 0.252, 0.099), alcohol = c(0.542, 0.169, 0.171, 0.075, 0.043)) # A function to calculate the corresponding joint probabilities calc_prev <- function(sex, p.univar) { nval <- lapply(values, function(x) 1:length(x)) prev <- expand.grid(nval) p <- rep(1, nrow(prev)) for (i in 1:length(values)) p <- p * p.univar[[i]][prev[, i]] prev$p <- p prev$sex <- sex prev$country <- "UK" for (i in 1:length(values)) prev[, i] <- values[[i]][prev[, i]] prev } # Calculate the joint prevalences prev_UK <- rbind(calc_prev("M", pm), calc_prev("F", pf)) head(prev_UK) # The order of the columns and rows has no effect # Run CRISP2 with the custom incidences and prevalences dat_toy <- dat_UK[dat_UK$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg, inc=inc_UK, OR=OR_UK, prev=prev_UK) # toy example #out <- crisp2(dat_UK, ncores=2, monozyg=mzyg, inc=inc_UK, OR=OR_UK, prev=prev_UK) # full example out# Run CRISP2 on the sample data using the default options data("dat_sample") head(dat_sample) dat_toy <- dat_sample[dat_sample$family == "toy", ] out <- crisp2(dat_toy) # toy example that runs quickly #out <- crisp2(dat_sample) # full example out # Add identical twins and use parallel computing # Parallel computing is usually faster unless there are very few families # fot005 and fot007 are a pair of identical twins, and so are fzg005 and fzg006 mzyg <- c(list(c("fot005", "fot007")), list(c("fzg005", "fzg006"))) parallel::detectCores() # The number of cores available, but we use only 2 below out <- crisp2(dat_toy, monozyg=mzyg, ncores=2) # toy example #out <- crisp2(dat_sample, monozyg=mzyg, ncores=2) # full example out # Now suppose that all of the sample families are from the United Kingdom (UK) dat_UK <- dat_sample dat_UK$country <- "UK" # For the UK families, you could simply use the default incidences, # ORs and prevalences for one of the default countries, e.g. Australia. dat <- dat_UK dat$country <- "Aus" dat_toy <- dat[dat$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg) # toy example #out <- crisp2(dat, ncores=2, monozyg=mzyg) # full example out # Alternatively, you can create incidences, etc. for the UK as follows # Create incidences for the UK based on the default Australian rates # Use Australian incidences for major gene variant carriers and UK population rates data("crisp2_inc") head(crisp2_inc) keep <- grep("Aus", names(crisp2_inc), fixed=TRUE) inc_UK <- crisp2_inc[, keep] nm <- strsplit(names(inc_UK), ".", fixed=TRUE) newnm <- sapply(nm, function(x) paste0(x[1], ".UK.", x[3])) names(inc_UK) <- newnm # Country names now match the values of dat_UK$country head(inc_UK) # Note: row i corresponds to age i-1 # English incidences for colon and rectum combined from # https://www.the-iacr.net/en/ci5-2.0/dataviz/12/age_specific rawm <- c(0.01, 0.08, 0.62, 1.4, 1.9, 3.3, 6.9, 9.9, 13.3, 23, 45.4, 84.1, 148.9, 194.5, 282.7, 357.6) rawf <- c(0.01, 0.09, 1, 2.3, 2.9, 3.5, 7.2, 9.9, 12.7, 20.8, 36.1, 60.3, 89.9, 115.6, 171.9, 233) inc_UK$Pop.UK.M <- rep(rawm, each=5) / 10^5 inc_UK$Pop.UK.F <- rep(rawf, each=5) / 10^5 # No UK ORs or prevalences yet, so remove lifestyle risk factors before running dat <- dat_UK dat <- dat[, !names(dat) %in% c("height", "bmi", "smoking", "alcohol")] dat_toy <- dat[dat$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg, inc=inc_UK) # toy example #out <- crisp2(dat, ncores=2, monozyg=mzyg, inc=inc_UK) # full example out # Create UK ORs for the lifestyle risk factors based on the default ORs, # which are the same for Australia, Canada and USA data("crisp2_OR") head(crisp2_OR) all(crisp2_OR$OR[crisp2_OR$country=="Aus"] == crisp2_OR$OR[crisp2_OR$country=="Can"]) all(crisp2_OR$OR[crisp2_OR$country=="Aus"] == crisp2_OR$OR[crisp2_OR$country=="USA"]) OR_UK <- crisp2_OR[crisp2_OR$country == "Aus", ] OR_UK$country <- "UK" # Must match the values in dat_UK$country head(OR_UK) # Create UK prevalences for the lifestyle risk factors assuming uncorrelated risk factors # and given univariate prevalences for each risk factor data("crisp2_prev") head(crisp2_prev) values <- list(height = c("0-154", "155-159", "160-164", "165-169", "170-174", "175-179", "180-184", "185+"), bmi = c("0-24.9", "25-29.9", "30+"), smoking = c("Never", "Former", "Current"), alcohol = c("0", "0.1-4.9", "5.0-14.9", "15.0-29.9", "30+")) # Male univariate (i.e. marginal) prevalences pm <- list(height = c(0.001, 0.023, 0.056, 0.133, 0.235, 0.261, 0.187, 0.104), bmi = c(0.282, 0.390, 0.328), smoking = c(0.514, 0.341, 0.145), alcohol = c(0.409, 0.143, 0.195, 0.129, 0.124)) # Female univariate (i.e. marginal) prevalences pf <- list(height = c(0.166, 0.215, 0.286, 0.209, 0.09, 0.029, 0.004, 0.001), bmi = c(0.388, 0.299, 0.313), smoking = c(0.649, 0.252, 0.099), alcohol = c(0.542, 0.169, 0.171, 0.075, 0.043)) # A function to calculate the corresponding joint probabilities calc_prev <- function(sex, p.univar) { nval <- lapply(values, function(x) 1:length(x)) prev <- expand.grid(nval) p <- rep(1, nrow(prev)) for (i in 1:length(values)) p <- p * p.univar[[i]][prev[, i]] prev$p <- p prev$sex <- sex prev$country <- "UK" for (i in 1:length(values)) prev[, i] <- values[[i]][prev[, i]] prev } # Calculate the joint prevalences prev_UK <- rbind(calc_prev("M", pm), calc_prev("F", pf)) head(prev_UK) # The order of the columns and rows has no effect # Run CRISP2 with the custom incidences and prevalences dat_toy <- dat_UK[dat_UK$family == "toy", ] out <- crisp2(dat_toy, ncores=1, monozyg=mzyg, inc=inc_UK, OR=OR_UK, prev=prev_UK) # toy example #out <- crisp2(dat_UK, ncores=2, monozyg=mzyg, inc=inc_UK, OR=OR_UK, prev=prev_UK) # full example out
A data frame containing age-, sex- and country-specific
annual colorectal cancer incidences
for the general population and for carriers of pathogenic variants
in the genes MLH1, MSH2, MSH6, PMS2 and MUTYH.
This dataset contains the default incidences for crisp2. Note that the
Age variable and the order of the columns in this dataset are ignored by
crisp2.
crisp2_inccrisp2_inc
A data frame with 80 rows (corresponding to ages 0 to 79 years)
and 37 columns. All variables except Age contain age-specific colorectal
cancer annual incidences for the group of people
corresponding to the name of the variable. These names are all of the form
<gene>.<country>.<sex>, where: gene ranges over Pop, MLH1, MSH2,
MSH6, PMS2 and MUTYH, corresponding to the
general population and to carriers of pathogenic variants in the named
cancer-susceptibility gene (here, MUTYH carriers are biallelic carriers);
country ranges over Aus, Can and USA for Australia, Canada and
the United States, respectively; and sex ranges over M and F,
for male or female, respectively. In summary, the columns are:
Ages ranging from 0 to 79 years. Note that row i
corresponds to age i-1. This variable is ignored by crisp2.
Incidences for male Australian residents from the general population.
Incidences for female Australian residents from the general population.
Incidences for male Canadian residents from the general population.
Incidences for female Canadian residents from the general population.
Incidences for male US residents from the general population.
Incidences for female US residents from the general population.
Incidences for male Australian residents with pathogenic variants in MLH1.
Incidences for female Australian residents with pathogenic variants in MLH1.
Incidences for male Canadian residents with pathogenic variants in MLH1.
Incidences for female Canadian residents with pathogenic variants in MLH1.
Incidences for male US residents with pathogenic variants in MLH1.
Incidences for female US residents with pathogenic variants in MLH1.
Incidences for male Australian residents with pathogenic variants in MSH2.
Incidences for female Australian residents with pathogenic variants in MSH2.
Incidences for male Canadian residents with pathogenic variants in MSH2.
Incidences for female Canadian residents with pathogenic variants in MSH2.
Incidences for male US residents with pathogenic variants in MSH2.
Incidences for female US residents with pathogenic variants in MSH2.
Incidences for male Australian residents with pathogenic variants in MSH6.
Incidences for female Australian residents with pathogenic variants in MSH6.
Incidences for male Canadian residents with pathogenic variants in MSH6.
Incidences for female Canadian residents with pathogenic variants in MSH6.
Incidences for male US residents with pathogenic variants in MSH6.
Incidences for female US residents with pathogenic variants in MSH6.
Incidences for male Australian residents with pathogenic variants in PMS2.
Incidences for female Australian residents with pathogenic variants in PMS2.
Incidences for male Canadian residents with pathogenic variants in PMS2.
Incidences for female Canadian residents with pathogenic variants in PMS2.
Incidences for male US residents with pathogenic variants in PMS2.
Incidences for female US residents with pathogenic variants in PMS2.
Incidences for male Australian residents with biallelic pathogenic variants in MUTYH.
Incidences for female Australian residents with biallelic pathogenic variants in MUTYH.
Incidences for male Canadian residents with biallelic pathogenic variants in MUTYH.
Incidences for female Canadian residents with biallelic pathogenic variants in MUTYH.
Incidences for male US residents with biallelic pathogenic variants in MUTYH.
Incidences for female US residents with biallelic pathogenic variants in MUTYH.
Population incidences are from (Curado et al., 2007) and incidences for pathogenic variant carriers are as in (Win et al., 2017), based on (Baglietto et al., 2010; Dowty et al., 2013; Senter et al., 2008; Win et al., 2014).
Curado MP, Edwards B, Shin HR, Storm H, Ferlay J, Heanue M, Boyle P (editors). Cancer Incidence in Five Continents, Vol. IX. IARC Scientific Publications, No. 160. 2007.
Win AK, Jenkins MA, Dowty JG, Antoniou AC, Lee A, Giles GG, Buchanan DD, Clendenning M, Rosty C, Ahnen DJ, Thibodeau SN, Casey G, Gallinger S, Le Marchand L, Haile RW, Potter JD, Zheng Y, Lindor NM, Newcomb PA, Hopper JL, MacInnis RJ. Prevalence and Penetrance of Major Genes and for Colorectal Cancer. Cancer Epidemiol Biomarkers Prev. 2017;26(3):404-412.
Baglietto L, Lindor NM, Dowty JG, et al. Risks of Lynch syndrome cancers for MSH6 mutation carriers. J Natl Cancer Inst 2010;102:193-201.
Dowty JG, Win AK, Buchanan DD, et al. Cancer risks for MLH1 and MSH2 mutation carriers. Hum Mutat 2013;34:490-7.
Senter L, Clendenning M, Sotamaa K, et al. The clinical phenotype of Lynch syndrome due to germ-line PMS2 mutations. Gastroenterology 2008;135:419-28.
Win AK, Dowty JG, Cleary SP, et al. Risk of colorectal cancer for carriers of mutations in MUTYH, with and without a family history of cancer. Gastroenterology 2014;146:1208-11.
A data frame specifying the default colorectal cancer odds ratios for CRISP2's default lifestyle risk factors, separately for each sex and country.
crisp2_ORcrisp2_OR
A data frame with 114 rows and 5 columns:
The country of residence, taking the values
Aus, Can and USA for Australia, Canada and the United States, respectively.
Biological sex, taking the values M and F for male and female,
respectively.
The names of the default lifestyle risk factors, namely
bmi, smoking, alcohol and height.
The allowed values of the lifestyle risk factors, where adult
height (height) is in centimeters, body mass index (bmi) is in
kilograms per meters squared, the values of smoking status (smoking)
are self-explanatory, and alcohol consumption (alcohol) is in grams of
ethanol per day.
The odds ratio for the given risk.factor and val.
Meta-analyses of colorectal cancer risks for smoking (Liang et al., 2009), body mass index, alcohol and height (WCRF/AICR 2018).
World Cancer Research Fund/American Institute for Cancer Research. Continuous Update Project Expert Report 2018. Diet, nutrition, physical activity and colorectal cancer. Available at dietandcancerreport.org., 2018.
Liang PS, Chen TY, Giovannucci E. Cigarette smoking and colorectal cancer incidence and mortality: systematic review and meta-analysis. Int J Cancer 2009;124:2406-15.
A data frame specifying the joint prevalences for each possible combination of CRISP2's default lifestyle risk factors, separately for each sex and country.
crisp2_prevcrisp2_prev
A data frame with 2160 rows and 7 columns:
The country of residence, taking the values
Aus, Can and USA for Australia, Canada and the United States, respectively.
Biological sex, taking the values M and F for male and female,
respectively.
Adult height in centimeters.
Body mass index in kilograms per meters squared.
Smoking status.
Alcohol consumption in grams of ethanol per day.
The joint prevalence for each combination of the lifestyle risk factors, conditional on the given country and sex.
Australia 2022: Australian Bureau of Statistics. Microdata: National Health Survey, 2022.
Canada 2017-18: Canadian Community Health Survey (CCHS) - Annual Component. User Guide. 2017 microdata file. Ottawa: Statistics Canada, 2018.
USA 2017-20: www.cdc.gov/nchs/nhanes.
A data frame containing data on three families, suitable to be used as the
dat argument of crisp2 when using crisp2's default incidences,
odds ratios and prevalences.
dat_sampledat_sample
A data frame with 26 rows and 17 columns, with one row per person.
The columns are described in detail in the dat argument of crisp2, though the
optional column test.sens is omitted here, and four lifestyle risk factors
are included (namely the last four variables below; see crisp2_OR for the
allowed values of these risk factors). In summary, the columns are:
An identifier for each person's family.
An individual identifier for each person.
The individual identifier of each person's mother.
The individual identifier of each person's father.
The person's biological sex.
The person's colorectal cancer affected status, equal to 1 for
colorectal cancer cases and 0 for non-cases.
The person's age at diagnosis (for colorectal cancer cases) or last known age (for non-cases).
The person's country of residence.
A flag equal to 1 for all people for whom
future risks will calculated, and 0 for all others.
The age (in years) to which future risks will be calculated.
The z-score of the person’s polygenic risk score (PRS).
The alpha value for the particular PRS used to calculate the
person's prs variable.
An integer specifying the person's genetic
information for major colorectal cancer-susceptibility genes.
See Details at crisp2 for the meanings of the genotype codes.
Height in centimeters.
Body mass index in kilograms per meters squared.
Smoking status.
Alcohol consumption in grams of ethanol per day.
Simulated.