plotFragmentSizeDistributionEstimate {ramwas} | R Documentation

## Estimate and plot Fragment Size Distribution.

### Description

RaMWAS functions for estimation and plotting of the fragment size distribution.

### Usage

    estimateFragmentSizeDistribution(frdata, seqLength)
    plotFragmentSizeDistributionEstimate(
            frdata,
            estimate,
            col1 = "blue",
            col2 = "red")

### Arguments

`frdata` | Distribution of distances from the starts of isolated reads to the respective CpGs.
`seqLength` | The length of sequenced part of the fragments. The fragments are assument to not be smaller than `seqLength`.
`estimate` | Fragment size distribution estimate.
`col1` | Color of `frdata` points.
`col2` | Color of `estimate` curve.

### Value

The function `estimateFragmentSizeDistribution` returns the estimate of the fragment size distribution.

### Note

If the length of `frdata` is equal to `seqLength`, the fragments are assumed to all be of length `seqLength`.

### Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

### See Also

See vignettes: `browseVignettes("ramwas")`.

### Examples

    # Simulate data
    x = 0:250
    truemean = 1 - pnorm(x, mean = 150, sd = 50)
    frdata = rpois(n = length(x), lambda = truemean*300)

    # Estimate fragment size distribution
    estimate = estimateFragmentSizeDistribution(frdata, seqLength = 50)

    # Plot fragment size distribution estimate
    plotFragmentSizeDistributionEstimate(frdata, estimate)

[Package ramwas version 1.4.0 Index]