fragSizesDist: fragSizesDist

View source: R/qc.R

fragSizesDistR Documentation

fragSizesDist

Description

fragSizesDist

Usage

fragSizesDist(
  x,
  what = 10000,
  flags = scanBamFlag(isProperPair = TRUE),
  BPPARAM = SerialParam(),
  returnPlot = TRUE
)

Arguments

x

A (named) vector of paths to bam files.

what

Either a positive integer (length 1) indicating how many reads to randomly sample, or a character vector (of length 1) indicating which chromosome to read.

flags

A 'scanBamFlag' object (see ScanBamParam)

BPPARAM

A BiocParallel BPPARAM object for multithreading.

returnPlot

Logical; whether to return a plot.

Value

If 'returnPlot=TRUE', returns a ggplot object, otherwise a data.frame of fragment lengths.

Examples

# example bam file:
bam <- system.file("extdata", "ex1.bam", package="Rsamtools")
fragSizesDist(bam, what=100)

ETHZ-INS/epiwraps documentation built on Dec. 22, 2024, 4:05 a.m.