rplec
is an R package designed to estimate placental
aging based on gestational age using DNA methylation levels, so called
placental epigenetic clock (PlEC). We developed a PlEC for the 2024
Placental Clock DREAM Challenge
(https://www.synapse.org/Synapse:syn59520082/wiki/628063). Our PlEC
achieved the top performance based on an independent test set. PlEC can
be used to identify accelerated/decelerated aging of placenta for
understanding placental dysfunction-related conditions, e.g., great
obstetrical syndromes including preeclampsia, fetal growth restriction,
preterm labor, preterm premature rupture of the membranes, late
spontaneous abortion, and placental abruption.
Normalize DNA methylation values: We provided normalization feature based on beta mixture quantile (BMIQ) method before using a PlEC.
Estimate DNA-methylation-based gestational age: A PlEC is available for estimating gestational age.
Perform quality control: A user can evaluate the PlEC accuracy based on calibration plot, root mean squared error (RMSE), mean absolute error (MAE), and correlation coefficient (Pearson’s r) before interpreting the DNA-methylation-based gestational age to identify placental aging.
Identify placental aging: Compare placental aging based on DNA-methylation-based gestational age between condition of interest and control.
You can install rplec
from CRAN with:
install.packages("rplec")
You can install the development version of rplec
from
GitHub with:
# install.packages("devtools")
::install_github("herdiantrisufriyana/rplec") devtools
Load necessary packages.
library(rplec)
Load our example data.
<- load_beta_values_case() beta_values_case
Normalize DNA methylation values.
<- bmiq_norm_450k(beta_values_case) norm_beta_values_case
Estimate DNA-methylation-based gestational age.
<- plec(norm_beta_values_case) dnam_ga_case
Explore detailed examples and methodologies in the following vignettes:
Placental
Aging Analysis: A data analysis pipeline to identify
placental aging using rplec
.
Reference
Manual: Comprehensive documentation of all functions and
features available in rplec
. Ideal for detailed reference
and advanced use cases.
rplec
is licensed under the MIT license. See the LICENSE
file for more details.
If you use rplec
in your research, please consider
citing it:
@misc{rplec2025,
author = {Herdiantri Sufriyana and Emily Chia-Yu Su},
title = {rplec: An R package of placental epigenetic clock to estimate aging by DNA-methylation-based gestational age},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\\url{https://github.com/herdiantrisufriyana/rplec}}
}
For questions or support, please contact herdi[at]nycu.edu.tw.
Install Docker desktop once in your machine. Start the service every time you build this project image or run the container.
Build the project image once for a new machine (currently support AMD64 and ARM64).
docker build -t rplec --load .
Run the container every time you start working on the project. Change left-side port numbers for either Rstudio or Jupyter lab if any of them is already used by other applications.
In terminal:
docker run -d -p 8787:8787 -p 8888:8888 -v "$(pwd)":/home/rstudio/project --name rplec_container rplec
In command prompt:
docker run -d -p 8787:8787 -p 8888:8888 -v "%cd%":/home/rstudio/project --name rplec_container rplec
Change port number in the link, accordingly, if it is already used by other applications.
Visit http://localhost:8787. Username: rstudio Password: 1234
Your working directory is ~/project.
Use terminal/command prompt to run the container terminal.
docker exec -it rplec_container bash
In the container terminal, run jupyter lab using this line of codes.
jupyter-lab --ip=0.0.0.0 --no-browser --allow-root
Click a link in the results to open jupyter lab in a browser. Change port number in the link, accordingly, if it is already used by other applications.