ezSortIndexBam: Sorts and indexes a bam file

View source: R/bamio.R

ezSortIndexBamR Documentation

Sorts and indexes a bam file

Description

Sorts and indexes a bam file.

Usage

ezSortIndexBam(inBam, bam, ram=2, removeBam=TRUE, cores=2,
               method=c("sambamba", "samtools"))

Arguments

inBam

a character representing the file path of the input bam file to sort.

bam

a character representing the file path of the output bam file.

ram

max RAM to use in GB

removeBam

a logical indicating whether to remove the file specified in inBam.

cores

an integer specifying how many cores to use for the command.

method

character(1): either using “sambamba” for better performance or “samtools”.

Author(s)

Rehrauer, Hubert Schmid, Peter

Examples

  bamFile <- system.file("extdata", "ex1.bam", package="Rsamtools", 
                         mustWork=TRUE)
  outBam <- tempfile(pattern="test-", fileext=".bam")
  ezSortIndexBam(inBam=bamFile, bam=outBam, ram=0.5, 
                 removeBam=FALSE, cores = ezThreads())

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