cpgdensity: Get CpG density for genomic regions

Description Usage Arguments Details Value Author(s) Examples

Description

Calculate the CpG density for a set of windows

Usage

1
cpgdensity(subject, chr, pos, windowSize = 500, sequence = "CG")

Arguments

subject

BSGenome object (e.g. Hsapiens)

chr

character vector

pos

numeric vector

windowSize

number value

sequence

character string

Details

Calculate the CpG density for a set of regions. chr and pos specify the region mid-points and windowSize specifies the size of the window to be centered on these mid-points. i.e. The window will stretch from pos-windowSize/2 to pos+windowSize/2.

Value

a numeric vector

Author(s)

Martin Aryee <aryee@jhu.edu>

Examples

1
2
3
4
5
6
	if (require(BSgenome.Hsapiens.UCSC.hg18)){
		chr <- c("chr1", "chr1", "chr2")
		pos <- c(100000, 100500, 100000)
		cpgd <- cpgdensity(Hsapiens, chr=chr, pos=pos, windowSize = 500)
		cpgd
	}

charm documentation built on May 6, 2019, 2:29 a.m.