methAvg: Calculate Methylation Average of given methylation matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sequenceAlignment.R

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

1
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.

Author(s)

Muhammad Ahmer Jamil, Prof. Holger Frohlich, Priv.-Doz. Dr. Osman El-Maarri

Maintainer: Muhammad Ahmer Jamil engr.ahmerjamil@gmail.com

See Also

methAlign, compare_samples

Examples

1
2
3
4
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)

MethTargetedNGS documentation built on Nov. 8, 2020, 8:10 p.m.