Learn R Programming

MethTargetedNGS (version 1.4.0)

methAvg: Calculate Methylation Average of given methylation matrix

Description

Methylation average of a CpG site is the percentage of unmethylated cytosine or methylated cytosine in a particular CpG site. The methylation average of a particular CpG site was calculated by number of cytosine divided by sum of total number of methylated and unmethylated cytosine at particular CpG site in a group of reads.

average = NC/(NC + NT)

Usage

methAvg(Sample, plot = FALSE)

Arguments

Sample
Matrix from methAlign. Also matrix where columns represents Cytosine of CpG sites and rows represents sequences.

plot
Boolean. TRUE if need a plot after calculation. Default FALSE

Value

Vector containing average methylation of given methylation matrix. Length of the vector represents the number of CpG sites in methylation matrix.

See Also

methAlign, compare_samples

Examples

Run this code
healthy = system.file("extdata", "Healthy.fasta", package = "MethTargetedNGS")
reference = system.file("extdata", "Reference.fasta", package = "MethTargetedNGS")
methP <- methAlign(healthy,reference)
avgMeth <- methAvg(methP,plot=TRUE)

Run the code above in your browser using DataLab