Description Usage Arguments Details Value Author(s) Examples
Function to calculate CpG density around a position.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'data.frame,BSgenome'
cpgDensityCalc(x, organism, ...)
## S4 method for signature 'GRangesList,BSgenome'
cpgDensityCalc(x, organism, verbose = TRUE, ...)
## S4 method for signature 'GRanges,BSgenome'
cpgDensityCalc(x, organism, seq.len = NULL, window = NULL,
w.function = c("none", "linear", "exp", "log"),
verbose = TRUE)
|
x |
A |
window |
Bases around the locations that are in the window. Calculation
will consider |
w.function |
Weighting function to use. Can be |
organism |
The |
seq.len |
The fragment size of the sequence reads in |
verbose |
Print details of processing. |
... |
Arguments passed into the |
If the version of the data frame with the start, end, and strand columns is given, the window will be created around the TSS.
For weighting scheme "none"
, this is equivalent to the number of CG matches
in the region. For "linear"
weighting, each match is given a score
1/x
where x
is the number of bases from the postition that the match occurred,
and the scores are summed. For exponential weighting and logarithmic weighting,
the idea is similar, but the scores decay exponentially (exp^-5x/window
)
and logarithmically (log2(2 - (distancesForRegion / window))
).
A numeric
vector of CpG densities for each region.
Dario Strbenac
1 2 3 4 5 | if(require(BSgenome.Hsapiens.UCSC.hg18))
{
TSSTable <- data.frame(chr = c("chr1", "chr2"), position = c(100000, 200000))
cpgDensityCalc(TSSTable, organism = Hsapiens, window = 600)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.