estFragmentLength: estimate the fragment length

Description Usage Arguments Value Author(s) Examples

View source: R/estFragmentLength.R

Description

estimate the fragment length for bam files

Usage

1
2
3
4
5
6
7
8
estFragmentLength(
  bamfiles,
  index = bamfiles,
  plot = TRUE,
  lag.max = 1000,
  minFragmentSize = 100,
  ...
)

Arguments

bamfiles

The file names of the 'BAM' ('SAM' for asBam) files to be processed.

index

The names of the index file of the 'BAM' file being processed; this is given without the '.bai' extension.

plot

logical. If TRUE (the default) the acf is plotted.

lag.max

maximum lag at which to calculate the acf. See acf

minFragmentSize

minimal fragment size to avoid the phantom peak.

...

Not used.

Value

numberic vector

Author(s)

Jianhong Ou

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    if(interactive() || Sys.getenv("USER")=="jianhongou"){
        path <- system.file("extdata", "reads", package="MMDiffBamSubset")
        if(file.exists(path)){
            WT.AB2 <- file.path(path, "WT_2.bam")
            Null.AB2 <- file.path(path, "Null_2.bam")
            Resc.AB2 <- file.path(path, "Resc_2.bam")
            estFragmentLength(c(WT.AB2, Null.AB2, Resc.AB2))
        }
    }
    

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.