Description Usage Arguments Value References Examples
View source: R/carrier_probabilities.R
For each person in dat
and each methylation site in top_probes
,
this function calculates the probability that the person carries a rare
mutation at a hypothetical genetic locus that affects methylation
at the methylation site.
1 | carrier_probabilities(dat, M_values, top_probes, ncores = 1)
|
dat |
A data frame with rows corresponding to people and columns
corresponding to (at least) the following variables, which will be coerced to
|
M_values |
A matrix of M-values, with rows corresponding to methylation sites and columns corresponding to people. |
top_probes |
A data frame, usually the output of |
ncores |
The number of cores to be used, with |
A data frame containing the carrier probabilities described in (Joo et al., 2018),
with rows of the data frame corresponding to the people in dat
and columns corresponding to
the methylation sites in top_probes
. This calculation is based on the Mendelian model
of (Joo et al., 2018) with parameter values taken from top_probes
.
Joo JE, Dowty JG, Milne RL, Wong EM, Dugué PA, English D, Hopper JL, Goldgar DE, Giles GG, Southey MC, kConFab. Heritable DNA methylation marks associated with susceptibility to breast cancer. Nat Commun. 2018 Feb 28;9(1):867. https://doi.org/10.1038/s41467-018-03058-6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | str(ped)
str(M_values)
# Calculate genotype probabilities
typed_genos <- genotype_combinations(ped)
str(typed_genos)
# Compute Delta l
MLEs <- ML_estimates(typed_genos, M_values, ncores = 4)
# Select top probes
top_probes <- MLEs[MLEs$delta.l > 10, ]
# Calculate carrier probabilities
CP <- carrier_probabilities(ped, M_values, top_probes, ncores = 2)
str(CP)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.