bam2bw: Bam to bigwig

View source: R/bamUtils.R

bam2bwR Documentation

Bam to bigwig

Description

Create bigwig file from bam file.

Usage

  bam2bw(file, destination = sub("\.bam$", ".bw", ignore.case = TRUE), 
         paired = FALSE, method = c("deepTools", "Bioconductor"),
         cores = ezThreads())

Arguments

file

character(1): the filepath of input bam file.

destination

character(1): the filepath of output bigwig file.

paired

boolean(1): the bam file is from paired-end or single-end reads.

method

character(1): use the “deepTools” or “Bioconductor”.

cores

integer(1): the number of threads to use.

Details

The “bamCoverage” tool from “deepTools” is faster, more memory efficient. By default, we export a bigwig file with bin size of 10.

The “Bioconductor” approach is more self-contained, slower and consuming much more memory. It output single-base resolution.

Value

An invisible destination.

Author(s)

Ge Tan

References

http://deeptools.readthedocs.io/en/latest/index.html

See Also

ezBam2bigwig

Examples

  file <- system.file("extdata", "ex1.bam", package="Rsamtools", 
                      mustWork=TRUE)
  destination <- tempfile(pattern="test-", fileext=".bw")
  bam2bw(file, destination, paired=FALSE, method="Bioconductor")

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.