ipla {rplec}R Documentation

Identify placental aging

Description

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.

Usage

ipla(
  aging,
  ga,
  phenotype,
  case = "Case",
  control = "Control",
  method = NULL,
  from = NULL,
  to = NULL
)

Arguments

aging

A data frame of residual DNA-methylation-based GA. This data frame must be the output of plec function with argument type="residual". The rows must be named according to the sample IDs.

ga

A data frame of GA. There is only one column, i.e., GA, as shown in ga. Use data(ga) to load this data frame. The rows must be named according to the sample IDs.

phenotype

A data frame of phenotype (optional. There is only one column, i.e., phenotype, as shown in phenotype. Use data(phenotype) to load this data frame. The rows must be named according to the sample IDs.

case

A character of of case name in phenotype (default="Case").

control

A character of of case name in phenotype (default="Control").

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.

Value

An ggplot object consisting the aging plot without or with statistical test results.

Examples


# 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)

[Package rplec version 0.1.3 Index]