bindDens2readDens {ChIPsim} | R Documentation |
Given a feature density this function produces two read densities, one for each strand.
bindDens2readDens(bindDens, fragment, nfrag = 1e+05, bind = 147, minLength = 150, maxLength = 180, ...)
bindDens |
Numeric vector with the feature density for one chromosome. |
fragment |
Function giving the fragment length distribution. |
nfrag |
Number of fragments that should be simulated to generate the read distribution. |
bind |
Length of binding site. |
minLength |
Minimum fragment length. |
maxLength |
Maximum fragment length. |
... |
Further arguments to |
A two column matrix. The first column contains the read density for the forward strand, the second column the read density for the reverse strand.
Peter Humburg
set.seed(1) ## generate a (relatively short) sequence of nucleosome features features <- placeFeatures(start=200, length=1e5) ## calculate feature density featureDens <- feat2dens(features, length=1e5) ## convert to read density readDens <- bindDens2readDens(featureDens, fragDens, meanLength=160)