compute_z_scores: Compute a Z-like score to estimate quality of DMRs

View source: R/compute_z_scores.R

compute_z_scoresR Documentation

Compute a Z-like score to estimate quality of DMRs

Description

Assayed CpG may differ from the sites used in AUC computation and segmentation. However, using the same assay for 'Normal' and 'Tumor' is strongly recommended.

Usage

compute_z_scores(
  tumor_table,
  control_table,
  dmr_table,
  reference_table,
  method = c("default", "custom"),
  fdr_thr = 0.05,
  min_sites = 5,
  ncores = 1
)

Arguments

tumor_table

A matrix of beta-values (fraction) from tumor samples.

control_table

A matrix of beta-values (fraction) from normal/control samples.

dmr_table

A data.frame reporting the genomic location of DMRs (chromosome, start, end) (likely produced by [find_dmrs]).

reference_table

A data.frame reporting the genomic coordinates of each CpG site in tumor and control matrices.

method

"default" reports only statistically significant DMRs: used for a DMR set generated with [find_dmrs]; "custom" compute Z-scores of regions covered by a minimum number of CpG sites: used to compare regions obtained with different tools

fdr_thr

Minimum fdr of a DMR to compute a Z-score (used only in "default" analysis; default = 0.05).

min_sites

Minimum required number of CpG sites within a DMR to compute a Z-score (used only in "custom" analysis; default = 5).

ncores

Number of parallel processes to use for parallel computing.

Value

A list of 5 tables: z-scores of DMRs, median beta of DMRs in tumor samples, median beta of DMRs in normal/control samples, fraction of NA CpG sites within DMRs and a dataframe with the comparison of beta values between groups for all segments.

Examples

auc <- compute_AUC(tumor_example, control_example)
dmr_set <- find_dmrs(tumor_example, control_example, auc, reference_example, min_sites = 10)
compute_z_scores(tumor_example, control_example, dmr_set, reference_example)

cgplab/ROCkerMeth documentation built on March 27, 2022, 9:57 p.m.