dupBam: Duplicates operation in bam

View source: R/bamUtils.R

dupBamR Documentation

Duplicates operation in bam

Description

Mark or remove the duplicates in bam file.

Usage

  dupBam(inBam, outBam, operation=c("mark", "remove"))

Arguments

inBam

character(1): the input bam file.

outBam

character(1): the output bam file.

operation

character(1): either to mark or remove the duplicates in bam file.

Details

It use “sambamba” to mark and remove the duplicates, as the same criteria of “picard”.

Other alternatives are “samtools” with ‘fixmate’ and ‘markdup’, “picard”'s ‘MarkDuplicates’.

Value

invisible outBam file.

Author(s)

Ge Tan

Examples

  bamFile <- system.file("extdata", "ex1.bam", package="Rsamtools",
                         mustWork=TRUE)
  outBam <- tempfile(pattern="test-", fileext=".bam")
  dupBam(inBam=bamFile, outBam=outBam, operation="mark")
  dupBam(inBam=bamFile, outBam=outBam, operation="remove")

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