GCcontent {biovizBase} | R Documentation |
Compute GC content in a certain region of a BSgenome object
GCcontent(obj, ..., view.width, as.prob = TRUE)
obj |
BSgenome object |
... |
Arguments passed to getSeq method for BSgenome package. |
view.width |
Passed to |
as.prob |
If TRUE return percentage of GC content, otherwise return counts. |
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
Numeric value indicate count or percentage
Tengfei Yin
library(BSgenome.Hsapiens.UCSC.hg19) GCcontent(Hsapiens, GRanges("chr1", IRanges(1e6, 1e6 + 1000)))