A data frame of DNAm gestational age for both case and control groups.
aging
aging
A data frame vector with 10 rows and 1 column:
A numeric value of residual DNAm gestational age (weeks).
Derived from the 2024 Placental Clock DREAM Challenge.
A list of indices for rand.idx
in bmiq_norm_450k
function.
The input probes must be already filtered and ordered the same way to the
that when we developed our placental epigenetic clock. Run
data(probe_info_450k)
and find the required probes in
prob_info_450k$probeID
.
beta_v_indices
beta_v_indices
A list of 2 elements where each has a length of nfit of 10000:
An integer indicating the selected indices.
An integer indicating the selected indices.
Derived from ChAMP
R package.
This function normalize DNA methylation values from 450k probes. The probes are filtered and ordered the same way to the input when we developed our placental epigenetic clock.
bmiq_norm_450k(beta, cores = 1, verbose = FALSE)
bmiq_norm_450k(beta, cores = 1, verbose = FALSE)
beta |
A data frame of beta values where each column represents a
sample and each row represent a probe. The rows must be named according to
the probe IDs. They include all the required probes. Run
|
cores |
An integer indicating the number of threads. |
verbose |
A logical scalar indicating whether to show a progress bar. |
A data frame of normalized beta values.
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case)
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case)
Downloads and loads beta values for the case group. Data contains beta values for 5 samples and 452,453 probes.
download_beta_values_case()
download_beta_values_case()
A data frame with 452,453 rows and 5 columns:
Beta values for sample GSM1931565.
Beta values for sample GSM5114811.
Beta values for sample GSM2589558.
Beta values for sample GSM1842848.
Beta values for sample GSM1843045.
Derived from the 2024 Placental Clock DREAM Challenge.
beta_values_case <- download_beta_values_case() head(beta_values_case)
beta_values_case <- download_beta_values_case() head(beta_values_case)
Downloads and loads beta values for the control group. Data contains beta values for 5 samples and 452,453 probes.
download_beta_values_control()
download_beta_values_control()
A data frame with 452,453 rows and 5 columns:
Beta values for sample GSM7115144.
Beta values for sample GSM1702248.
Beta values for sample GSM3179749.
Beta values for sample GSM4281756.
Beta values for sample GSM5210472.
Derived from the 2024 Placental Clock DREAM Challenge.
beta_values_control <- download_beta_values_control() head(beta_values_control)
beta_values_control <- download_beta_values_control() head(beta_values_control)
A data frame of gestational age for 10 samples.
ga
ga
A data frame vector with 10 rows and 1 column:
A numeric value of gestational age (weeks' gestation).
Derived from the 2024 Placental Clock DREAM Challenge.
This function identifies placental aging based on the case-control aging difference. Placental aging is defined as the residual DNA-methylation-based (DNAm) gestational ages (GA). Only GA from 5 to 44 weeks' gestation are shown in the placental aging plot.
ipla( aging, ga, phenotype, case = "Case", control = "Control", method = NULL, from = NULL, to = NULL )
ipla( aging, ga, phenotype, case = "Case", control = "Control", method = NULL, from = NULL, to = NULL )
aging |
A data frame of residual DNA-methylation-based GA. This data
frame must be the output of |
ga |
A data frame of GA. There is only one column, i.e., |
phenotype |
A data frame of phenotype (optional. There is only one
column, i.e., |
case |
A character of of case name in |
control |
A character of of case name in |
method |
A character of of the method of statistical test (optional), i.e., "Mann-Whitney U" or "Permutation". |
from |
An integer from 5 to 44 indicating minimum GA (weeks) to be included in the statistical test. If it is undefined, the minimum GA in either case or control is applied. |
to |
An integer from 5 to 44 indicating maximum GA (weeks) to be included in the statistical test. If it is undefined, the maximum GA in either case or control is applied. |
An ggplot object consisting the aging plot without or with statistical test results.
# Prepare data data(aging) data(ga) data(phenotype) # Identify placental aging set.seed(1) ipla(aging, ga, phenotype) ## Conduct statistical test set.seed(1) ipla(aging, ga, phenotype, method = "Mann-Whitney U") ## Conduct statistical test for a specific range of GA set.seed(1) ipla(aging, ga, phenotype, method = "Mann-Whitney U", from = 5, to = 20)
# Prepare data data(aging) data(ga) data(phenotype) # Identify placental aging set.seed(1) ipla(aging, ga, phenotype) ## Conduct statistical test set.seed(1) ipla(aging, ga, phenotype, method = "Mann-Whitney U") ## Conduct statistical test for a specific range of GA set.seed(1) ipla(aging, ga, phenotype, method = "Mann-Whitney U", from = 5, to = 20)
A data frame of phenotype for 10 samples.
phenotype
phenotype
A data frame vector with 10 rows and 1 column:
A character value of phenotype (case/control).
Derived from the 2024 Placental Clock DREAM Challenge.
This function estimate gestational age (GA) using BMIQ-normalized beta values. The estimated GA is a sum of normal and residual GAs. The latter is a sum of condition- and trimester-specific, residual GAs.
plec(norm_beta, type = "stack", verbose = FALSE)
plec(norm_beta, type = "stack", verbose = FALSE)
norm_beta |
A data frame of normalized beta values where each column
represents a sample and each row represent a probe. This data frame must be
the output of |
type |
An character indicating the type of outputs which are primarily:
(1) "stack" (default) for the estimated GA; (2) "normal" for the estimated
normal GA; (3) "residual" for the estimated residual GA; (4)
"condition" for the condition-specific, estimated residual GA; and (5)
"trimester" for the trimester-specific, estimated residual GA. In addition,
a user can obtain the output of a single submodel using the column name
(except |
verbose |
A logical scalar indicating whether to show a progress bar. |
A data frame of the estimated GA.
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case) dnam_ga_case <- plec(norm_beta_values_case)
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case) dnam_ga_case <- plec(norm_beta_values_case)
A data frame of intercept and coefficients for all submodels in our placental epigenetic_clock.
plec_int_coef
plec_int_coef
A data frame with 10,447 rows and 32 columns:
A character value of predictor name.
Estimate normal GA.
Predict FGR.
Predict PE.
Predict PE onset.
Predict preterm delivery.
Predict anencephaly.
Predict spina bifida.
Predict GDM.
Predict diandric triploid.
Predict miscarriage.
Predict LGA.
Predict subfertility.
Predict HELLP.
Predict chorioamnionitis.
Estimate GA in FGR.
Estimate GA in PE.
Estimate GA in EOPE.
Estimate GA in preterm delivery.
Estimate GA in anencephaly.
Estimate GA in spina bifida.
Estimate GA in GDM.
Estimate GA in diandric triploid.
Estimate GA in miscarriage.
Estimate GA in LGA.
Estimate GA in subfertility.
Estimate GA in HELLP.
Estimate GA in chorioamnionitis.
Estimate residual GA.
Estimate residual GA for preterm.
Estimate residual GA for term before the date.
Estimate residual GA for term after the date.
Derived from the 2024 Placental Clock DREAM Challenge.
A data frame of mean values of the scalers for all submodels in our placental epigenetic_clock.
plec_scaler_mean
plec_scaler_mean
A data frame with 10,446 rows and 32 columns:
A character value of predictor name.
Estimate normal GA.
Predict FGR.
Predict PE.
Predict PE onset.
Predict preterm delivery.
Predict anencephaly.
Predict spina bifida.
Predict GDM.
Predict diandric triploid.
Predict miscarriage.
Predict LGA.
Predict subfertility.
Predict HELLP.
Predict chorioamnionitis.
Estimate GA in FGR.
Estimate GA in PE.
Estimate GA in EOPE.
Estimate GA in preterm delivery.
Estimate GA in anencephaly.
Estimate GA in spina bifida.
Estimate GA in GDM.
Estimate GA in diandric triploid.
Estimate GA in miscarriage.
Estimate GA in LGA.
Estimate GA in subfertility.
Estimate GA in HELLP.
Estimate GA in chorioamnionitis.
Estimate residual GA.
Estimate residual GA for preterm.
Estimate residual GA for term before the date.
Estimate residual GA for term after the date.
Derived from the 2024 Placental Clock DREAM Challenge.
A data frame of scale values of the scalers for all submodels in our placental epigenetic_clock.
plec_scaler_scale
plec_scaler_scale
A data frame with 10,446 rows and 32 columns:
A character value of predictor name.
Estimate normal GA.
Predict FGR.
Predict PE.
Predict PE onset.
Predict preterm delivery.
Predict anencephaly.
Predict spina bifida.
Predict GDM.
Predict diandric triploid.
Predict miscarriage.
Predict LGA.
Predict subfertility.
Predict HELLP.
Predict chorioamnionitis.
Estimate GA in FGR.
Estimate GA in PE.
Estimate GA in EOPE.
Estimate GA in preterm delivery.
Estimate GA in anencephaly.
Estimate GA in spina bifida.
Estimate GA in GDM.
Estimate GA in diandric triploid.
Estimate GA in miscarriage.
Estimate GA in LGA.
Estimate GA in subfertility.
Estimate GA in HELLP.
Estimate GA in chorioamnionitis.
Estimate residual GA.
Estimate residual GA for preterm.
Estimate residual GA for term before the date.
Estimate residual GA for term after the date.
Derived from the 2024 Placental Clock DREAM Challenge.
A list of 450K probe information for bmiq_norm_450k
function. The
probes are already filtered and ordered the same way to the input when we
developed our placental epigenetic clock.
probe_info_450k
probe_info_450k
A list of 2 elements where each has a length of 346407:
An integer indicating design type 1 or 2.
A character for each probe identifier.
Derived from ChAMP
R package.
This function evaluates the precision of DNA-methylation-based (DNAm) gestational age (GA) based on calibration, root mean square error (RMSE), mean absolute error (MAE), and Pearson's correlation coefficient (r). The sample identifiers (IDs) are automatically matched among the DNAm-GA, GA, and phenotype (optional). Only GA from 5 to 44 weeks' gestation are shown in the calibration plot.
qc(dnam_ga, ga, phenotype = NULL)
qc(dnam_ga, ga, phenotype = NULL)
dnam_ga |
A data frame of DNA-methylation-based GA. This data frame
must be the output of |
ga |
A data frame of GA. There is only one column, i.e., |
phenotype |
A data frame of phenotype (optional). There is only one
column, i.e., |
A ggplot object of calibration plot with RMSE, MAE, and r.
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case) dnam_ga_case <- plec(norm_beta_values_case) data(ga) ga_case <- ga[phenotype$phenotype == "Case", , drop = FALSE] set.seed(1) qc(dnam_ga_case, ga_case)
beta_values_case <- download_beta_values_case() norm_beta_values_case <- bmiq_norm_450k(beta_values_case) dnam_ga_case <- plec(norm_beta_values_case) data(ga) ga_case <- ga[phenotype$phenotype == "Case", , drop = FALSE] set.seed(1) qc(dnam_ga_case, ga_case)