Compute GC content in a certain region of a BSgenome object
Usage
GCcontent(obj, ..., view.width, as.prob = TRUE)
Arguments
obj
BSgenome object
...
Arguments passed to getSeq method for BSgenome package.
view.width
Passed to letterFrequencyInSlidingView, the
constant (e.g. 35, 48, 1000) size of the "window" to slide along
obj. The specified letters are tabulated in each window
of length view.width. The rows of the result (see value)
correspond to the various windows.
as.prob
If TRUE return percentage of GC content, otherwise
return counts.
Value
Details
GC content is an interesting variable may be related to various
biological questions. So we need a way to compute GC content in a
certain region of a reference genome. GCcontent function is a
wrapper around getSeq function in BSgenome package and
letterFrequency, letterFrequencyInSlidingView
in Biostrings package.
if the view.width is specified, the GC content will be computed
in the sliding view