sortIndexBam: sortIndexBam

Description Usage Arguments Value Author(s) See Also Examples

Description

sortIndexBam sort the bam file by coordinates and index it.

Usage

1
2
  sortIndexBam(inputs, outputs, maxMem="4096M", removeBam=TRUE,
               mc.cores=getThreads(), binary="samtools")

Arguments

inputs

The filenames of input bam files.

outputs

The filenames of output bam files.

maxMem

The maximal memory per thread to use.

removeBam

Remove the input bam files or not after sorting and idnexing.

mc.cores

The number of threads to use. By default, we use a internal function NGS:::getThreads to decide.

binary

The name/filename of the binary "samtools" to call.

Value

The output is returned.

Author(s)

Ge Tan

See Also

indexBam and sortBam, asBam from Rsamtools

Examples

1
2
3
4
5
6
7
  
  ## This example is not tested because it requires external software "samtools"
  library(Rsamtools)
  bamfile <- system.file("extdata", "ex1.bam", package="Rsamtools",
                           mustWork=TRUE)
  sortIndexBam(inputs=bamfile, outputs="ex1_sorted.bam", removeBam=FALSE)
  

ge11232002/NGS documentation built on May 17, 2019, 12:13 a.m.