Meth_mean: Internal Use Function That calculates the mean methylation...

View source: R/Methmean_match.R

Meth_meanR Documentation

Internal Use Function That calculates the mean methylation difference.

Description

This function calculates the mean methylation difference along each read gene. Formula:The mean methylation of a gene of one treatment group was calculated by: E((E[MR]_ij )/(E[TR]_ij ))*W_ij and W_ij = (E[TR]_ij )/(EE[TR]_ij ), where [MR]_ij and [TR]_ij are methylated and total reads number of the involved CpG/DMC j at a given gene of individual i, n is the total individual number of one treatment group, m is total number of CpG/DMC involved in this gene and W_ij is the weight of reads of the involved CpG/DMC j of individual i. Firstly calculate methylation difference through reads of all cytosines along gene Secondly calculate methylation difference along each group When provide inputcpgifeaturefile to calculate the gene mean methylation difference , two features will be combined that CpG island and CpG island shore.

Usage

Meth_mean(inputmethfile_QC, regionchr, cpgifeaturefile = NULL)

Arguments

inputmethfile_QC

refers to the inputmethfile after quality control.

regionchr

refers to the filtered subset of inputrefseqfile or inputcpgifile.

cpgifeaturefile

refers to the whether have inputcpgifeaturefile or not.

Value

Outputs the mean methylation.

Examples

Meth_mean(inputmethfile_QC, regionchr)
Meth_mean(inputmethfile_QC, regionchr, cpgifeaturefile = inputcpgifeaturefile)


xiaowangCN/GeneDMRs documentation built on Nov. 22, 2023, 11:19 p.m.