estimateFragmentCenters: estimate center of fragments

Description Usage Arguments Value See Also Examples

View source: R/estimateFragmentCenters.R

Description

This function computes average shifts between forward and reverse strand, which is equivalent to the median fragment lengths. In case of single-end reads, it is applied it to estimate fragment centers. For paired-end reads, this step can be omitted, but it can be used to determine the median fragment length.

Usage

1
2
estimateFragmentCenters(MD, shift = NULL, draw.on = FALSE,
  bin.length = 10, rm.Ends = TRUE, strand.specific = FALSE)

Arguments

MD

DBAmmd Object. This Object can be created using DBAmmd().

shift

can be set if the offset between forward and reverse strand is known (e.g. 1/2 median fragment size). In this case shift will not be estimated (DEFAULT: NULL)

draw.on

plot scatterplots for counts on forward vs reverse strand and histograms of determined shifts (DEFAULT: FALSE)

bin.length

determines resolution with which fragment centers can be estimated. (DEFAULT: 10)

rm.Ends

if TRUE only center of fragments will be stored, Position of fragment ends will be removed. (DEAFULT: TRUE)

strand.specific

if strand specific reads should be kept apart. (DEFAULT:FALSE)

Value

DBAmmd object with updated slots Reads and MetaData.

See Also

DBAmmd, getPeakReads, compHists

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Example using a small data set provided with this package

data("MMD")
MMD.1 <- estimateFragmentCenters(MMD)

# To access centers of fragments:
Reads.C <- Reads(MMD.1,'Center')

# To access the determined shifts for each sample:
meta <- metaData(MMD.1)
meta$AnaData$Shifts

dhelekal/mmdiff3 documentation built on July 25, 2019, 8:18 p.m.