getCposDensity {methylPipe} | R Documentation |
After having used getCpos (or getCposChr), getCposDensity determines the density of Cxx sites for each bin of each genomic region.
getCposDensity(GenoRanges, Cpos, nbins)
GenoRanges |
an object of class GRanges used to generate the Cpos list |
Cpos |
list returned by getCpos or getCposChr methods |
nbins |
numeric; the number of bins each region of genomic regions is divided |
Returns a list with the number of Cxx sites per bp of bin size for each region of the GRanges.
Mattia Pelizzola
require(BSgenome.Hsapiens.UCSC.hg18) gr_file <- system.file('extdata', 'GR_chr20.Rdata', package='methylPipe') load(gr_file) resC <- getCposChr(GenoRanges=GR_chr20, seqContext='CG', chrseq=unmasked(Hsapiens[['chr20']]), nbins=3) resd <- getCposDensity(GenoRanges=GR_chr20, Cpos= resC, nbins=3)