markDuplicates: Program dispatchers to mark duplicated reads from a BAM file

Description Usage Arguments Details Value Examples

View source: R/markDuplicates.R

Description

markDuplicates Mark duplicated reads from a BAM file by calling widely used tools.

Usage

1
2
markDuplicates(dupremover = "bamutil", bam = NULL, out = gsub("\\.bam$",
  "_duprm.bam", bam), rminput = TRUE, path = ".", verbose = TRUE, ...)

Arguments

dupremover

The tool to be called. Currently, "picard" and "bamutils" are supported

bam

The bam file to mark duplicates from

out

Regular expression describing the transformation on the original filename to get the output filename. By default, a "_duprm" suffix is added before the bam extension

rminput

Whether to keep the original, non duplicate-marked, bam file

path

Path to the duplicate marker binaries

verbose

Redirect all the program output to the R console

...

Other parameters sent to the caller function

Details

This function works as a wrapper for several tools widely adopted tr mark duplicated reads in a BAM file. Currently, it supports PICARD and BamUtils.

Value

The output filename

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
bam <- system.file("extdata","sample1Aligned.out.bam",package="dupRadar")
gtf <- "genes.gtf"
stranded <- 2    # '0' (unstranded), '1' (stranded) and '2' (reverse)
paired   <- FALSE
threads  <- 4

# call the duplicate marker and analyze the reads
bamDuprm <- markDuplicates(dupremover="bamutil",bam,
                           path="/opt/bamUtil-master/bin",rminput=FALSE)
dm <- analyzeDuprates(bamDuprm,gtf,stranded,paired,threads)

## End(Not run)

dupRadar documentation built on Nov. 8, 2020, 5:41 p.m.